21.3 Multivariate Normal Distribution, Cholesky Parameterization
21.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.
21.3.2 Sampling Statement
y ~
multi_normal_cholesky
(mu, L)
Increment target log probability density with multi_normal_cholesky_lpdf(y | mu, L)
dropping constant additive terms.
21.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
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
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
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
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
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
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
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