Last chance! 50% off unlimited learning
Sale ends in
Sampler derived using the eigendecomposition of the covariance
matrix Sigma
. The function uses the Armadillo random normal generator
mvrnorm(n, mu, Sigma)
an n
sample from a multivariate Normal distribution
sample size
mean vector. Will set the dimension
a square covariance matrix, of same dimension as mu
.
No sanity check is performed to validate that the matrix is p.s.d., so use at own risk
mvrnorm(n=10, mu=c(0,2), Sigma=diag(2))
Run the code above in your browser using DataLab