| sampleMVN | R Documentation |
This function samples MVN based on a given covariance matrix
sampleMVN(n, Sigma, sparse = TRUE, n_cores = 1, fastmvn = FALSE)
n |
The sample size. |
Sigma |
The covariance matrix. |
sparse |
The indicator of sparse sampling or not. |
n_cores |
The number of cores used. |
fastmvn |
The indicator of fast sampling or not. |
The data matrix sampled from the covariance matrix.
## generate data from a block diagonal covariance matrix structure
n <- 50
p <- 30
data.true.cov <- block.true.cov(p)
data <- sampleMVN(n, data.true.cov, sparse=TRUE)
data[1:10, 1:10]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.