powered by
Sampler derived using the eigendecomposition of the covariance matrix Sigma. The function uses the Armadillo random normal generator
Sigma
mvrnorm(n, mu, Sigma)
an n sample from a multivariate Normal distribution
n
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
mu
mvrnorm(n=10, mu=c(0,2), Sigma=diag(2))
Run the code above in your browser using DataLab