Muthén & Muthén offer a MPLUS based syntax for calculating sample size and power on SEM, using a Monte Carlo simulation.


Is there any similar syntax available for R?


1 Answer 1


You don't say which package in R you want to use.

You have two choices.

First, calculate your population covariance matrix, and then generate data using the mvrnorm() function in the MASS package. Then estimate your models using your favorite SEM package within R (sem, Lavaan, openMX, etc).

Second, Lavaan, which has a function called simulateData(). This lets you specify a model to generate in Lavaan language, which you can then estimate.

  • 1
    $\begingroup$ Thanks for response, I am looking for a lavaan compatible approach! :) $\endgroup$
    – Jens
    Commented Jun 13, 2015 at 13:27
  • 2
    $\begingroup$ simulateData() it is then. $\endgroup$ Commented Jun 13, 2015 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.