Description Usage Arguments Details Value Author(s) References See Also Examples
Generates an n \times k multivariate data matrix
or a list of n \times k multivariate data matrices of length R
from the multivariate normal distribution
\mathbf{X} \sim \mathcal{N}_{k} ≤ft( \boldsymbol{μ}, \boldsymbol{Σ} \right) . %(\#eq:dist-X-mvn)
This function is a wrapper around MASS::mvrnorm()
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
n |
Integer. Sample size. |
mu |
Numeric vector. Location parameter mean vector \boldsymbol{μ} of length k. |
Sigma |
Numeric matrix. k \times k variance-covariance matrix \boldsymbol{Σ}. |
tol |
Numeric.
Tolerance (relative to largest variance)
for numerical lack of positive-definiteness in |
empirical |
Logical.
If |
df |
Logical.
If |
varnames |
Character string.
Optional column names with the same length as |
R |
Integer.
Number of Monte Carlo replications. If |
par |
Logical.
If |
ncores |
Integer.
Number of cores to use if |
mc |
Logical.
If |
lb |
Logical.
If |
cl_eval |
Logical.
Execute |
cl_export |
Logical.
Execute |
cl_expr |
Expression.
Expression passed to |
cl_vars |
Character vector.
Names of objects to pass to |
The multivariate normal distribution has two parameters, namely
the k \times 1 mean vector mu
≤ft( \boldsymbol{μ} \right)
and the k \times k variance-covariance matrix Sigma
≤ft( \boldsymbol{Σ} \right).
If mu
is not provided,
it is set to a vector of zeroes with the appropriate length.
Options for explicit parallelism are provided when R > 1
especially when R
is large. See par
and suceeding arguments.
If R = NULL
or R = 1
, returns an n \times k
multivariate normal data matrix or data frame .
If R
is an integer greater than 1, (e.g., R = 10
)
returns a list of length R
of n \times k
multivariate normal data matrix or data frame.
Ivan Jacob Agaloos Pesigan
Venables, W. N., Ripley, B. D., & Venables, W. N. (2002). Modern applied statistics with S. New York, N.Y: Springer.
Wikipedia: Multivariate normal distribution
jeksterslabRdist::mvnpdf()
, jeksterslabRdist::mvnll()
,
and jeksterslabRdist::mvn2ll()
,
for more information on the multivariate normal distribution.
Other multivariate data functions:
mvnramsigma2()
,
mvnram()
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.