Stores information necessary to simulate and visualize datasets based
on underlying distribution multivariate normal distribution Z.
Usage
simdesign_mvtnorm(
relations_initial,
mean_initial = 0,
sd_initial = 1,
is_correlation = TRUE,
method = "svd",
name = "Multivariate-normal based simulation design",
...
)Arguments
- relations_initial
Correlation / Covariance matrix of the initial multivariate Normal distribution
Z.- mean_initial
Vector of mean values of the initial multivariate Normal distribution
Z. Dimension needs to correspond to dimension ofrelations.- sd_initial
Vector of standard deviations of the initial multivariate Normal distribution Z. Dimension needs to correspond to dimension of
relations. Overriden by suqare root of diagonal elements ofrelationsifis_correlationis FALSE.- is_correlation
If TRUE, then
relationsspecifies a correlation matrix (default, this type of specification is usually more natural than specifying a covariance matrix). Otherwise,relationsspecifies a covariance matrix whose square root diagonal elements overridesd_initial.- method
methodargument ofmvtnorm::rmvnorm.- name
Character, optional name of the simulation design.
- ...
Further arguments are passed to the
simdesignconstructor.
Value
List object with class attribute "simdesign_mvtnorm" (S3 class), inheriting
from "simdesign". It contains the same entries as a simdesign
object but in addition the following entries:
mean_initialsd_initialcor_initialInitial correlation matrix of multivariate normal distribution
Details
This S3 class implements a simulation design based on an underlying
multivariate normal distribution by creating a generator function
based on mvtnorm::rmvnorm.
Note
Note that relations specifies the correlation / covariance
of the underlying Normal data Z and thus does not directly translate into
correlations between the variables of the final datamatrix X.
Data Generation
Data will be generated by simulate_data using the
following procedure:
The underlying data matrix
Zis sampled from a multivariate Normal distribution (number of dimensions specified by dimensions ofrelations).Zis then transformed into the final datasetXby applying thetransform_initialfunction toZ.Xis post-processed if specified.