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] 0.893133 2.029687
var(x)
#> [,1] [,2]
#> [1,] 4.325769 2.020718
#> [2,] 2.020718 2.888071
plot(x)