This project includes supplemental materials to reproduce the Monte Carlo simulation sutddy and analyses of its results in the article:
Jak, S., Jorgensen, T. D., & Rosseel, Y. (2021). Evaluating cluster-level factor models with lavaan and M*plus*. *Psych, 3*(2), 134–152. https://doi.org/10.3390/psych3020012
The files include a PDF of the open-access article itself, and a Simulation directory with the following contents:
- an R script for generating data for the simulation study
- 2 subdirectories, which contain results of analyzing simulated data using [lavaan][1] and [M*plus*][2], respectively. They also include R scripts for pooling and analyzing the Monte Carlo results (as reported in the article's tables)
Readers can search the Mplus and R scripts for how to fit 2-level models to individual data sets (which can be generated using the provided R script). See the linked project from a 2017 publication, which provides more example Mplus and R scripts to fit 2-level CFAs to an example data set from the European Social Survey.
[1]: https://lavaan.ugent.be/
[2]: https://www.statmodel.com/html_ug.shtml