rmnorm {QRMlib} | R Documentation |
generates random sample from multivariate normal
rmnorm(n, Sigma=equicorr(d, rho), mu=rep(0, d), d=2, rho=0.7)
n |
number of realizations |
Sigma |
a covariance matrix |
mu |
a mean vector |
d |
dimension of distribution |
rho |
correlation value to build equicorrelation matrix |
function is set up to quickly simulate equicorrelation structures by specifying d and rho
an n by d matrix
documentation by Scott Ulman for R-language distribution
Sigma <- diag(c(3,4,5)) %*% equicorr(3,0.6) %*% diag(c(3,4,5)); mu <- c(1,2,3); ndata <- rmnorm(1000,Sigma,mu); fit.norm(ndata);