mvrnorm.svd | R Documentation |
Produces one or more samples from the specified multivariate distribution.
mvrnorm.svd(n = 1, mu = NULL, Sigma = NULL, tol = 1e-06, empirical = FALSE, Dist = "normal", skew = 5, skew.mean = 0, skew.sd = 1, poisson.mean = 5)
n |
the number of samples required. |
mu |
a vector giving the means of the variables. |
Sigma |
a positive-definite symmetric matrix specifying the covariance matrix of the variables. |
tol |
tolerance (relative to largest variance) for numerical lack of positive-definiteness in Sigma. |
empirical |
logical. If true, |
Dist |
desired distribution. |
skew |
amount of skew for skewed distributions. |
skew.mean |
mean for skewed distribution. |
skew.sd |
standard deviation for skewed distribution. |
poisson.mean |
mean for poisson distribution. |
"mvrnorm.svd"
The matrix decomposition is done via svd
Nelson Lee Afanador (nelson.afanador@mvdalab.com)
Sigma <- matrix(c(1, .5, .5, .5, 1, .5, .5, .5, 1), 3, 3) Means <- rep(0, 3) Sim.dat.norm <- mvrnorm.svd(n = 1000, Means, Sigma, Dist = "normal") plot(as.data.frame(Sim.dat.norm)) Sim.dat.pois <- mvrnorm.svd(n = 1000, Means, Sigma, Dist = "poisson") plot(as.data.frame(Sim.dat.pois)) Sim.dat.exp <- mvrnorm.svd(n = 1000, Means, Sigma, Dist = "exp") plot(as.data.frame(Sim.dat.exp)) Sim.dat.skew <- mvrnorm.svd(n = 1000, Means, Sigma, Dist = "skewnorm") plot(as.data.frame(Sim.dat.skew))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.