25.3 Multivariate normal distribution, Cholesky parameterization
25.3.1 Probability density function
If K∈N, μ∈RK, and L∈RK×K is lower triangular and such that LL⊤ is positive definite, then for y∈RK, MultiNormalCholesky(y|μ,L)=MultiNormal(y|μ,LL⊤). If L is lower triangular and LLtop is a K×K positive definite matrix, then Lk,k must be strictly positive for k∈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