genData.VM: genData.VM

View source: R/simulate.R

genData.VMR 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


semPower documentation built on Sept. 30, 2024, 9:24 a.m.