rmmvnorm | R Documentation |
Interface functions to use rmvnorm
for
hyperSpec-class
objects.
rmmvnorm(n, mean, sigma)
## S4 method for signature 'numeric,hyperSpec,matrix'
rmmvnorm(n, mean, sigma)
## S4 method for signature 'numeric,hyperSpec,array'
rmmvnorm(n, mean, sigma)
## S4 method for signature 'numeric,matrix,matrix'
rmmvnorm(n, mean, sigma)
## S4 method for signature 'numeric,matrix,array'
rmmvnorm(n, mean, sigma)
n |
vector giving the numer of cases to generate for each group |
mean |
matrix with mean cases in rows |
sigma |
common covariance matrix or array ( |
The mvtnorm
method for hyperSpec objects supports producing multivariate normal data for
groups with different mean but common covariance matrix, see the examples.
rmvnorm
cov
and pooled.cov
about calculating covariance of hyperSpec objects.
## multiple groups, common covariance matrix
if (require ("mvtnorm")){
pcov <- pooled.cov (chondro, chondro$clusters)
rnd <- rmmvnorm (rep (10, 3), mean = pcov$mean, sigma = pcov$COV)
plot (rnd, col = rnd$.group)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.