genr8 | R Documentation |
Speed up the use of MASS::mvrnorm
.
genr8(n = 1, R = diag(10), mean = rep(0, ncol(R)), ...)
n |
the number of samples required. |
R |
a positive-definite symmetric matrix specifying the covariance matrix of the variables. |
mean |
an optinal vector giving the means of the variables. Default is 0. |
... |
arguments for |
A data frame of size n
by ncol(R)
.
set.seed(19)
R <- caron2016$mat1
mydata <- genr8(n = nrow(R)+1, R = R, empirical = TRUE)
round(mydata, 2)
round(cov(mydata), 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.