Description Usage Arguments Value Author(s) References See Also Examples
Create a data distribution object. There are two ways to specify nonnormal data-generation model. To create nonnormal data by the copula method, margins and ... arguments are required. To create data by Vale and Maurelli's method, skewness and/or kurtosis arguments are required.
| 1 2 | 
| margins | A character vector specifying all the marginal distributions. The characters in argument margins are used to construct density, distribution, and quantile function names. For example,  | 
| ... | A list whose each component is a list of named components, giving the parameter values of the marginal distributions. See the description of  | 
| p | Number of variables. If only one distribution object is listed, the  | 
| keepScale | A vector representing whether each variable is transformed its mean and standard deviation or not. If TRUE, transform back to retain the mean and standard deviation of a variable equal to the model implied mean and standard deviation (with sampling error) | 
| reverse | A vector representing whether each variable is mirrored or not. If  | 
| copula | A copula class that represents the multivariate distribution, such as  | 
| skewness | A vector of skewness of each variable. The Vale & Maurelli (1983) method is used in data generation. | 
| kurtosis | A vector of (excessive) kurtosis of each variable. The Vale & Maurelli (1983) method is used in data generation. | 
SimDataDist that saves analysis result from simulate data.
Sunthud Pornprasertmanit (psunthud@gmail.com)
Mair, P., Satorra, A., & Bentler, P. M. (2012). Generating nonnormal multivariate data using copulas: Applications to SEM. Multivariate Behavioral Research, 47, 547-565.
Vale, C. D. & Maurelli, V. A. (1983) Simulating multivariate nonormal distributions. Psychometrika, 48, 465-471.
SimResult for the type of resulting object
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 	
# Create data based on Vale and Maurelli's method by specifying skewness and kurtosis
dist <- bindDist(skewness = c(0, -2, 2), kurtosis = c(0, 8, 4))
## Not run: 
library(copula)
# Create three-dimensional distribution by gaussian copula with 
# the following marginal distributions
#   1. t-distribution with df = 2
# 	2. chi-square distribution with df = 3
#	3. normal distribution with mean = 0 and sd = 1
# Setting the attribute of each marginal distribution
d1 <- list(df=2)
d2 <- list(df=3)
d3 <- list(mean=0, sd=1)
# Create a data distribution object by setting the names of each distribution
# and their arguments
dist <- bindDist(c("t", "chisq", "norm"), d1, d2, d3)
# Create data by using Gumbel Copula as the multivariate distribution
dist <- bindDist(c("t", "chisq", "norm"), d1, d2, d3, copula = gumbelCopula(2, dim = 3))
# Reverse the direction of chi-square distribution from positively skew to negatively skew
dist <- bindDist(c("t", "chisq", "norm"), d1, d2, d3, copula = gumbelCopula(2, dim = 3),
	reverse = c(FALSE, TRUE, FALSE))
## End(Not run)
 | 
Loading required package: lavaan
This is lavaan 0.6-3
lavaan is BETA software! Please report any bugs.
 
#################################################################
This is simsem 0.5-14
simsem is BETA software! Please report any bugs.
simsem was first developed at the University of Kansas Center for
Research Methods and Data Analysis, under NSF Grant 1053160.
#################################################################
Attaching package: 'simsem'
The following object is masked from 'package:lavaan':
    inspect
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.