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?


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.

| cite | improve this answer | |
  • $\begingroup$ Thanks for response, I am looking for a lavaan compatible approach! :) $\endgroup$ – Jens Jun 13 '15 at 13:27
  • 1
    $\begingroup$ simulateData() it is then. $\endgroup$ – Jeremy Miles Jun 13 '15 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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