genData.VM {semPower}R Documentation

genData.VM

Description

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.

Usage

genData.VM(N = NULL, Sigma = NULL, nSets = 1, skewness = NULL, kurtosis = NULL)

Arguments

N

sample size.

Sigma

population covariance matrix.

nSets

number of data sets to generate

skewness

vector specifying skewness for each variable

kurtosis

vector specifying excess kurtosis for each variable

Details

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.

Value

Returns the generated data


[Package semPower version 2.1.0 Index]