Generates random data conforming to a population variance-covariance matrix using the third-order polynomial method (Vale & Maurelli, 1983) specifying third and fourth moments of the marginals.
genData.VM(N = NULL, Sigma = NULL, nSets = 1, skewness = NULL, kurtosis = NULL)
Returns the generated data
sample size.
population covariance matrix.
number of data sets to generate
vector specifying skewness for each variable
vector specifying excess kurtosis for each variable
This function is a slightly adapted copy of lavaan
's ValeMaurelli1983 implementation
that avoids computing the intermediate correlation for each data sets
and uses Sigma as input.
For details, see Vale, C. & Maurelli, V. (1983). Simulating multivariate nonnormal distributions. Psychometrika, 48, 465-471.