R: Generate Non-normal Data using Vale and Maurelli (1983)...

mvrnonnorm {semTools} | R Documentation

## Generate Non-normal Data using Vale and Maurelli (1983) method

### Description

Generate Non-normal Data using Vale and Maurelli (1983) method. The function is designed to be as similar as the popular `mvrnorm` function in the `MASS` package. The codes are copied from `mvrnorm` function in the `MASS` package for argument checking and `lavaan` package for data generation using Vale and Maurelli (1983) method.

### Usage

    mvrnonnorm(n, mu, Sigma, skewness = NULL, kurtosis = NULL, empirical = FALSE)

### Arguments

`n` | Sample size
`mu` | A mean vector
`Sigma` | A positive-definite symmetric matrix specifying the covariance matrix of the variables
`skewness` | A vector of skewness of the variables
`kurtosis` | A vector of excessive kurtosis of the variables
`empirical` | If `TRUE`, `mu` and `Sigma` specify the empirical not population mean and covariance matrix

### Value

A data matrix

### Author(s)

The original function is the `simulateData` function written by Yves Rosseel in the `lavaan` package. The function is adjusted for a convenient usage by Sunthud Pornprasertmanit (psunthud@gmail.com)

### References

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

### Examples

    mvrnonnorm(100, c(1, 2), matrix(c(10, 2, 2, 5), 2, 2),
    	skewness = c(5, 2), kurtosis = c(3, 3))

[Package semTools version 0.4-14 Index]