monte1: Simulate Multivariate Non-normal Data by Vale & Maurelli...

View source: R/monte1.R

monte1R Documentation

Simulate Multivariate Non-normal Data by Vale & Maurelli (1983) Method

Description

Function for simulating multivariate nonnormal data by the methods described by Fleishman (1978) and Vale & Maurelli (1983).

Usage

monte1(seed, nvar, nsub, cormat, skewvec, kurtvec)

Arguments

seed

An integer to be used as the random number seed.

nvar

Number of variables to simulate.

nsub

Number of simulated subjects (response vectors).

cormat

The desired correlation matrix.

skewvec

A vector of indicator skewness values.

kurtvec

A vector of indicator kurtosis values.

Value

data

The simulated data.

call

The call.

nsub

Number of subjects.

nvar

Number of variables.

cormat

The desired correlation matrix.

skewvec

The desired indicator skewness values.

kurtvec

The desired indicator kurtosis values.

seed

The random number seed.

Author(s)

Niels Waller

References

Fleishman, A. I (1978). A method for simulating non-normal distributions. Psychometrika, 43, 521-532.

Olvera Astivia, O. L. & Zumbo, B. D. (2018). On the solution multiplicity of the Fleishman method and its impact in simulation studies. British Journal of Mathematical and Statistical Psychology, 71 (3), 437-458.

Vale, D. C., & Maurelli, V. A. (1983). Simulating multivariate nonnormal distributions. Psychometrika, 48, 465-471.

See Also

monte, summary.monte, summary.monte1

Examples



## Generate dimensional data for 4 variables. 
## All correlations = .60; all variable
## skewness = 1.75; 
## all variable kurtosis = 3.75
 
cormat <- matrix(.60,4,4)
diag(cormat) <- 1

nontaxon.dat <- monte1(seed = 123, nsub = 100000, nvar = 4, skewvec = rep(1.75, 4),
               kurtvec = rep(3.75, 4), cormat = cormat)
 
print(cor(nontaxon.dat$data), digits = 3)
print(apply(nontaxon.dat$data, 2, skew), digits = 3)
print(apply(nontaxon.dat$data, 2, kurt), digits = 3)               


fungible documentation built on May 29, 2024, 8:28 a.m.