rmvnorm: Generating from multivariate normal distribution with location vector \(\bold{\mu}\) and covariance matrix \(\Sigma_{d \times d}\).
Description
Using the well-recognized Cholesky decomposition, this function simulates from the density function of a \(d\)-dimensional random vector \(\bold{Y}=(Y_1,\cdots,Y_d)^{T}\) following a normal distribution with mean vector \(\bold{\mu}\) and covariance matrix \(\Sigma_{d \times d}\) is
$$
f_{\bold{Y}}(\bold{y})=\frac{1}{(2 \pi)^{\frac{d}{2}}\vert \Sigma\vert ^{-\frac{1}{2} } } \exp\biggl\{-\frac{(\bold{y}-\bold{\mu})^t\Sigma^{-1}(\bold{y}-\bold{\mu})}{2}\bigg\},
$$
Usage
rmvnorm(n, Mu, Sigma)
Value
an \(n \times d\) matrix of realizations from multivariate normal distribution with mean vector \(\bold{\mu}\) and covariance matrix \(\Sigma_{d \times d}\).