25.3 Multivariate normal distribution, Cholesky parameterization
25.3.1 Probability density function
If \(K \in \mathbb{N}\), \(\mu \in \mathbb{R}^K\), and \(L \in \mathbb{R}^{K \times K}\) is lower triangular and such that \(LL^{\top}\) is positive definite, then for \(y \in \mathbb{R}^K\), \[ \text{MultiNormalCholesky}(y|\mu,L) = \text{MultiNormal}(y|\mu,LL^{\top}). \] If \(L\) is lower triangular and \(LL^{top}\) is a \(K \times K\) positive definite matrix, then \(L_{k,k}\) must be strictly positive for \(k \in 1{:}K\). If an \(L\) is provided that is not the Cholesky factor of a positive-definite matrix, the probability functions will raise errors.
25.3.2 Sampling statement
y ~
multi_normal_cholesky
(mu, L)
Increment target log probability density with multi_normal_cholesky_lupdf(y | mu, L)
.
Available since 2.0
25.3.3 Stan functions
real
multi_normal_cholesky_lpdf
(vectors y | vectors mu, matrix L)
The log of the multivariate normal density of vector(s) y given
location vector(s) mu and lower-triangular Cholesky factor of the
covariance matrix L
Available since 2.18
real
multi_normal_cholesky_lupdf
(vectors y | vectors mu, matrix L)
The log of the multivariate normal density of vector(s) y given
location vector(s) mu and lower-triangular Cholesky factor of the
covariance matrix L dropping constant additive terms
Available since 2.25
real
multi_normal_cholesky_lpdf
(vectors y | row_vectors mu, matrix L)
The log of the multivariate normal density of vector(s) y given
location row vector(s) mu and lower-triangular Cholesky factor of the
covariance matrix L
Available since 2.18
real
multi_normal_cholesky_lupdf
(vectors y | row_vectors mu, matrix L)
The log of the multivariate normal density of vector(s) y given
location row vector(s) mu and lower-triangular Cholesky factor of the
covariance matrix L dropping constant additive terms
Available since 2.25
real
multi_normal_cholesky_lpdf
(row_vectors y | vectors mu, matrix L)
The log of the multivariate normal density of row vector(s) y given
location vector(s) mu and lower-triangular Cholesky factor of the
covariance matrix L
Available since 2.18
real
multi_normal_cholesky_lupdf
(row_vectors y | vectors mu, matrix L)
The log of the multivariate normal density of row vector(s) y given
location vector(s) mu and lower-triangular Cholesky factor of the
covariance matrix L dropping constant additive terms
Available since 2.25
real
multi_normal_cholesky_lpdf
(row_vectors y | row_vectors mu, matrix L)
The log of the multivariate normal density of row vector(s) y given
location row vector(s) mu and lower-triangular Cholesky factor of the
covariance matrix L
Available since 2.18
real
multi_normal_cholesky_lupdf
(row_vectors y | row_vectors mu, matrix L)
The log of the multivariate normal density of row vector(s) y given
location row vector(s) mu and lower-triangular Cholesky factor of the
covariance matrix L dropping constant additive terms
Available since 2.25
vector
multi_normal_cholesky_rng
(vector mu, matrix L)
Generate a multivariate normal variate with location mu and
lower-triangular Cholesky factor of the covariance matrix L; may only
be used in transformed data and generated quantities blocks
Available since 2.3
vector
multi_normal_cholesky_rng
(row_vector mu, matrix L)
Generate a multivariate normal variate with location mu and
lower-triangular Cholesky factor of the covariance matrix L; may only
be used in transformed data and generated quantities blocks
Available since 2.18
vectors
multi_normal_cholesky_rng
(vectors mu, matrix L)
Generate an array of multivariate normal variates with locations mu
and lower-triangular Cholesky factor of the covariance matrix L; may
only be used in transformed data and generated quantities blocks
Available since 2.18
vectors
multi_normal_cholesky_rng
(row_vectors mu, matrix L)
Generate an array of multivariate normal variates with locations mu
and lower-triangular Cholesky factor of the covariance matrix L; may
only be used in transformed data and generated quantities blocks
Available since 2.18