- mod1
A lavaan model to specify the CFA.
- mod2
Another lavaan model for a model comparison. If missing and merge.mod = TRUE, a merged model from function merge_factors is estimated based on mod1.
- x
A dataset for the model of nrow observations (minimum: 50) and ncol indicators (minimum: 4)
- n
A sample size specified instead of a dataset (minimum: 50, maximum: 50000). Requires a population model via pop.mod1.
- rep
Number of replications to be simulated (default: 500, minimum: 10, maximum: 5000)
- type
Type of underlying population model. Based on the model(s) provided, a population model is derived to simulate the fit indices by function pop_mod. The type determines
the factor loadings and covariances assumed for this population model. NM (the default when only one model is provided): Uses the factor loadings and
covariances from Niemand & Mai's (2018) simulation study. HB: Uses the factor loadings and covariances from Hu & Bentler's (1999) simulation study.
EM: Empirical (the default when two models are provided or merge.mod is TRUE), uses the given factor loadings and covariances.
- dv
Should the fit statistics be calculated for discriminant validity testing? If no (the default), this is not assumed. If yes, consider the arguments of merge.mod, dv.factors and cutoff.
So far, two options of discriminant validity testing are supported. Constraining: A factor correlation between two factors can be constrained as selected by the dv.factors argument. In this case, dv.cutoff applies and merge.mod is not required.
Merging: Two factors can be merged into one, again controlled by the dv.factors argument. In this case, merge.mod applies and dv.cutoff is not required (as cutoff = 1 is implied).
- dv.factors
Names of the factors to be considered. Must be equal to 2. If missing (the default), the first and second factor of the model are selected.
- merge.mod
This is used for merging. If FALSE (the default), fit measures for mod1 are estimated for a single model as long as no mod2 is provided. If TRUE, a merged model from function merge_factors is estimated based on mod1. In this case, no mod2 is required.
- dv.cutoff
This is used for constraining. It determines the critical correlation assumed to be a cutoff for discriminant validity testing.
For example, based on Rönkkö & Cho (2020), a cutoff of .9 indicates a severe issue in discriminant validity between the selected factors. Cutoffs between .8 and 1 are recommended.
The function returns a warning, if the cutoff is below .8.
- standardized
Are factor loadings assumed to be standardized and covariances to be correlations (default: TRUE)?
- assume.mvn
Should multivariate normality (mvn) be assumed? If TRUE (the default), kurtosis and skewness are set to 1 for simulated data.
If FALSE, kurtosis and skewness are estimated from dataset x via semTools::mardiaKurtosis and semTools::mardiaSkew.
- multi.core
Should multiple cores be used to simulate fit indices?
If TRUE (the default), mclapply (on Linux or Mac machines) or parLapply (on Windows machines) from parallel package with the number of specified cores is used. If FALSE, a single core is used.
- cores
How many cores should be used for multiple cores? The default is 2. Consider the available number of cores of your system.
- seed
The seed to be set to obtain reproducible cutoffs (default: 1111). Defines a vector of length rep with the seed being the first value.
- pop.mod1
For flexibility reasons, an optional lavaan population model can be provided. This is required together with n if x is missing.
- pop.mod2
Another optional lavaan population model.