powered by
Simulate a multivariate normal random matrix.
rmvnorm(n, mu, Sigma, Sigma.chol = chol(Sigma))
number of mvnormal vectors to simulate.
mean vector.
covariance matrix.
Cholesky decomposition of Sigma.
Sigma
This function simulates multivariate normal random vectors.
# NOT RUN { # Simulate several matrices and compute the mean. Y <- tensr:::rmvnorm(100, c(1, 2, 3), matrix(c(3, 0, 1, 0, 1, -1, 1, -1, 2), 3, 3)) colMeans(Y) cov(Y) # }
Run the code above in your browser using DataLab