rmvnorm | R Documentation |
Random generation function from the multivariate Normal distribution with mean equal to mean and covariance matrix sigma.
rmvnorm( n = 10, mean = rep( 0, length = ncol( sigma ) ), sigma = diag( length( mean ) ) )
n |
Number of observations. |
mean |
Mean vector, default is rep( 0, length = ncol( sigma ) ). |
sigma |
positive definite covariance matrix, default is diag( length( mean ) ) . |
A numeric matrix with rows equal to n and columns equal to length( mean ).
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 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.