View source: R/MultivariateRandomGenerator.R
mgetDist | R Documentation |
Multivariate Random observations generator selected from several distributions with user defined mean and variance.
mgetDist( n, nv, mu = 0, sigma = NULL, correlation = 0, s = NULL, dists = NULL, dists.par = NULL )
n |
scalar. Number of observations to be generated. |
nv |
scalar. Number of variables to be generated. |
mu |
scalar. Expected value of the desired distribution. |
sigma |
scalar. Standard deviation of the desired distribution. |
correlation |
scalar. Corralation between variables. |
s |
matrix. Correlation matrix of the variables |
dists |
vector of character string. Distribution of each variable. The length mus be the same as the number of variables. Select from:
|
dists.par |
matrix For each variable (column), specify
The number of columns must be the same as the number of variables. |
A matrix x
with n
observations generated following the selected distribution with its parameters.
mgetDist(n=5, nv=2, dists=c("Normal", "Normal"),dists.par= matrix(c(0,1,1,0,1,1), ncol=2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.