mvrnormR_bis | R Documentation |
Custom function to simulate multivariate normal distribution
mvrnormR_bis(n, p, rho)
n |
sample size (integer) |
p |
number of variables (integer) |
rho |
correlation between variables (between 0 and 1) |
A nxp matrix of simulated data
https://gallery.rcpp.org/articles/simulate-multivariate-normal/
dat <- mvrnormR(n = 100, p = 10, rho = 0.8) heatmap(cor(dat))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.