Multivariate Distributions
Arguments
- n
number of observations
- ...
forwarded to rmvnorm
Value
numeric matrix of multivariate normal distributed variables
Examples
sigma <- matrix(c(4,2,2,3), ncol=2)
x <- dqrmvnorm(n=500, mean=c(1,2), sigma=sigma)
colMeans(x)
#> [1] 1.042140 2.110983
var(x)
#> [,1] [,2]
#> [1,] 4.395725 2.079882
#> [2,] 2.079882 2.828486
plot(x)