rmvn | R Documentation |
Simulate from a multivariate normal distribution.
rmvn(n, mu = 0, cov = matrix(1))
n |
Number of simulation replicates. |
mu |
Mean vector. |
cov |
Variance-covariance matrix. |
Uses the Cholesky decomposition of the matrix cov
, obtained by
base::chol()
.
A matrix of size n x length(mu)
. Each row corresponds to a
separate replicate.
stats::rnorm()
rmvn(100, c(1, 2), matrix(c(1, 1, 1, 4), ncol = 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.