View on GitHub


R package for simulated structural equation modeling

Download this project as a .zip file Download this project as a tar.gz file

simsem: SIMulated Structural Equation Modeling

This R package has been developed for facilitating simulation and analysis of data within the structural equation modeling (SEM) framework. This package aims to help analysts create simulated data from hypotheses or analytic results from obtained data. The simulated data can be used for different purposes, such as power analysis, model fit evaluation, and planned missing design.

  1. Building simulated sampling distribution for fit indices. This package will help researchers tailor fit indices cutoffs based on a priori alpha level and a priori definition of trivial model misspecification. In other words, this package will help researchers simulate data based on their actual model with their defined trivial model misspecification. Then, the fit indices from the simulated data can be used to create empirical sampling distributions and find the fit indices cutoff based on the sampling distributions. Model parameters can be specified manually or obtained from the results of data analysis. If model parameters are obtained from the results of data analysis, this approach is also called the parametric bootstrap or Monte Carlo approach. The Bollen-Stine bootstrap approach for data generation is also available, as well as creating nonnormal distribution by Gaussian copula.
  2. Power analysis. This package will help analysts find power of both parameter estimates and model evaluation. This package can find power when data are missing. Missing data imposed into simulated data can be 1) missing completely at random (MCAR), 2) missing at random (MAR), 3) missing not at random (NMAR), and 4) planned missing data (n-form design or two-method design). Longitudinal missing data (i.e., attrition) can be modeled as a MCAR or MAR process. Missing data can be handled through multiple imputation of Full Information Maximum Liklihood. Sample size and percent missing can be varied continuously and power plots given values of sample size or percent missing can be built.
  3. Methodological investigations. This package can be used for methodological studies concerning SEM. Researchers can easily vary parameter values and model misspecification across parameters and easily summarize results from simulations. Nested models can be easily tested by comparing the results from two simulation runs. The powerful and flexible missing data options available in simsem make the package extremely useful in methodological investigations concerning SEM and missing data.


[June 06, 2016] Latest Update: simsem, Version 0.5-13

This version is available on CRAN. This is simply a maintenance version.

[February 29, 2016] Latest Update: simsem, Version 0.5-12

This version is available on CRAN. The contact information is updated. This is simply a maintenance version.

[June 29, 2015] Latest Update: simsem, Version 0.5-11

This version is available on CRAN. Because lavaan changes the way to deal with equality constraints in parameter tables, the simsem package needs to change the codes that involves with lavaan parameter tables. This package does not have reverse compatibility. That is, the script in running simsem remains the same. However, the objects created from previous version may not run or produce erroneous results in this version.

Main Developers

Sunthud Pornprasertmanit

Patrick Miller

Alexander Schoemann


The project is still under development. The package can be installed by copying this line into R:


If you are interested in the source code, please click here.

You may install the recently developed test version by downloading the latest version from the following link into the current R directory:

Make sure that you have the lavaan package in your personal library and then copy the following line into R:

install.packages("simsem_latestVersion.tar.gz", repos = NULL, type = "source")

Note that latestVersion is the appropriate number of the latest version. For example, "simsem_0.5-11.tar.gz" is used.

Here is how to install simsemClassic (version 0.2-8 of simsem) from KRAN only:

install.packages("simsemClassic", repos="", type="source")
If users wish to use the OpenMx package for data generation or data analysis, please follow this link to check the download instruction.

Please report any bugs or give me any suggestions by email.


Presentations and Papers

Version History


The development of simsem has been supported by the University of Kansas Center for Research Methods and Data Analysis.

Partial support for this project was provided by grant NSF 1053160 (Wei Wu & Todd D. Little, co-PIs) and the Center for Research Methods and Data Analysis at the University of Kansas (Todd D. Little, director). Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the funding agencies.