Generate data from the multivariate Normal distribution
Random generation function from the multivariate Normal distribution with mean equal to and covariance matrix .
rmvnorm( n = 10, mean = rep( 0, length = ncol( sigma ) ), sigma = diag( length( mean ) ) )
n
: Number of observations.mean
: Mean vector, default is .sigma
: positive definite covariance matrix, default is .A numeric matrix with rows equal to and columns equal to .
Reza Mohammadi a.mohammadi@uva.nl
bdgraph.sim
, rwish
, rgwish
mean <- c( 5, 20 ) sigma <- matrix( c( 4, 2, 2, 5 ), 2, 2 ) # covariance matrix sample <- rmvnorm( n = 500, mean = mean, sigma = sigma ) plot( sample )