21
votes
$\begingroup$

I want to test a multi-stage path model (e.g., A predicts B, B predicts C, C predicts D) where all of my variables are individual observations nested within groups. So far I've been doing this through multiple unique multilevel analysis in R.

I would prefer to use a technique like SEM that lets me test multiple paths at the same time (A -> B -> C -> D) and still properly handle the 2-levels (individuals in groups).

I understand that MPLUS can handle this. Is there an R package I can use?

$\endgroup$

6 Answers 6

20
votes
$\begingroup$

It seems that OpenMx (based on Mx but it's now an R package) can do what you are looking for: "Multi Level Analysis"

$\endgroup$
2
  • 8
    $\begingroup$ (+1) It's merely a fork of Mx but it is quite good as free software for SEM. Another promising project is lavaan (which tries to provide Mplus compliant output, whenever possible). $\endgroup$
    – chl
    Commented May 19, 2011 at 21:43
  • $\begingroup$ @chi Thank you for the suggestion, I'll check out lavaan, too. $\endgroup$ Commented May 23, 2011 at 14:44
7
votes
$\begingroup$

You can do multilevel SEM in any package that supports multiple group analysis using Muthen's MUML method.

You model 2 groups, the first with the within-covariance matrix and the second with the between covariance matrix as data. Then you restrict the relevant parameters to be equal across groups (which depends on the model).

So yes, you can do multilevel SEM in lavaan and OpenMx.

See http://smr.sagepub.com/content/22/3/376.short

$\endgroup$
4
votes
$\begingroup$

If your model is complicated, I would recommend xxM, a package for R by Paras Mehta. http://xxm.times.uh.edu/

Mehta, P. D. (2013). n-level structural equation modeling. In Y. Petscher, C. Schatschneider & D. L. Compton (Eds.), Applied quantitative analysis in the social sciences (pp. 329-362). New York: Routledge.

$\endgroup$
4
  • $\begingroup$ What would be the advantages of this model? $\endgroup$
    – Andy
    Commented Mar 2, 2015 at 15:43
  • $\begingroup$ @Andy: I haven't used this package, but it appears to support a wide variety of models and situations as well as has no limit on number of levels. However, the package requires explicit specification of various matrices, which introduces excessive wordiness and is cumbersome. Another issues are that 1) it seems that xxM currently only supports Windows; 2) the package is not on CRAN; 3) the package seems to be free, but not an open source software (IMHO, big negative!). (to be cont'd) $\endgroup$ Commented Mar 2, 2015 at 16:18
  • $\begingroup$ @Andy: Here's the User's Guide, which is handy, since otherwise you have to register to download the document. $\endgroup$ Commented Mar 2, 2015 at 16:19
  • $\begingroup$ Thanks! I thought this information would make a more complete answer. $\endgroup$
    – Andy
    Commented Mar 2, 2015 at 16:26
4
votes
$\begingroup$

In regards to the ability to pull this off in any SEM program....yes, you don't always need specialized SEM software, but you might have a hell of a data wrangling job if you don't use SEM software that is specialized for this task. FYI: I don't find openmx to be intuitive.

Here's a reference for pulling this off in most any software, which wasn't referenced previously.

$\endgroup$
2
votes
$\begingroup$

Try searching for "structural equation modeling" on http://rseek.org. You'll find several helpful links, including links to several possible packages.

You might also check out the Task View for the social sciences, there's a section for structural equation modeling maybe a third of the way down. See http://cran.r-project.org/web/views/SocialSciences.html.

One package in particular you might find helpful is John Fox's sem package. http://cran.r-project.org/web/packages/sem/index.html

$\endgroup$
4
  • $\begingroup$ AFAIK none of these packages can estimate multilevel path/structural equation models. $\endgroup$ Commented May 20, 2011 at 2:06
  • $\begingroup$ Didn't realize that. Glad you spoke up about OpenMx. $\endgroup$ Commented May 20, 2011 at 2:07
  • $\begingroup$ (I'll keep the answer, because especially with Bernd's comment, it may be useful to others asking this same question.) $\endgroup$ Commented May 20, 2011 at 13:17
  • $\begingroup$ Thanks for the suggestions. I tried the first and third before posting my question and as @Bernd pointed out, there's nothing (obvious) there that has both multilevel and SEM. $\endgroup$ Commented May 23, 2011 at 14:43
1
vote
$\begingroup$

This post is old, but I thought I'd link the question I posted with the solution. It provides a description on how OpenMx can be used for fitting multilevel SEM.

$\endgroup$

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