Simulate from a Multivariate Normal Distribution
mvrnorm.Rd
Produces one or more samples from the specified multivariate normal distribution.
mvrnorm(n = 1, mu, Sigma, tol = 1e-06, empirical = FALSE)
Arguments
- 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, mu and Sigma specify the empirical not population mean and covariance matrix.
Value
If n = 1 a vector of the same length as mu, otherwise an n by length(mu) matrix with one sample in each row.
Details
The matrix decomposition is done via eigen; although a Choleski decomposition might be faster, the eigendecomposition is stabler.* Causes creation of the dataset .Random.seed if it does not already exist, otherwise its value is updated.
See also
Other Auxiliary:
IQRloadCSVdata()
,
IQRsaveCSVdata()
,
and()
,
aux_explode()
,
aux_explodePC()
,
aux_fileparts()
,
aux_fileread()
,
aux_filewrite()
,
aux_getRelPath()
,
aux_mkdir()
,
aux_na_locf()
,
aux_postFillChar()
,
aux_preFillChar()
,
aux_quantilenumber()
,
aux_rmdir()
,
aux_simplifypath()
,
aux_splitVectorEqualPieces()
,
aux_strFindAll()
,
aux_strrep()
,
aux_strtrim()
,
aux_unlevel()
,
aux_version()
,
calcAICBIC()
,
clusterX()
,
compare_IQRmodel_IQRsysModel_simulation()
,
fit_EmaxModel()
,
format_GUM()
,
ge()
,
gen_aux_version()
,
geocv()
,
geomean()
,
geosd()
,
ginv()
,
gt()
,
interp0()
,
interp1()
,
interpcs()
,
inv_logit()
,
le()
,
logit()
,
lt()
,
mod()
,
norm_M3()
,
or()
,
piecewise()
,
progressBar()
,
remove_duplicates()
,
run_silent_IQR()
,
stopIQR()
,
tempdirIQR()
,
tempfileIQR()
,
warningIQR()