Multivariate Distributions

dqrmvnorm(n, ...)

Arguments

n

number of observations

...

forwarded to rmvnorm

Value

numeric matrix of multivariate normal distributed variables

See also

Examples

sigma <- matrix(c(4,2,2,3), ncol=2)
x <- dqrmvnorm(n=500, mean=c(1,2), sigma=sigma)
colMeans(x)
#> [1] 1.026244 2.036632
var(x)
#>          [,1]     [,2]
#> [1,] 4.064124 1.976961
#> [2,] 1.976961 2.604071
plot(x)