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.003538 1.934564
var(x)
#> [,1] [,2]
#> [1,] 3.491749 1.690429
#> [2,] 1.690429 2.765608
plot(x)