21

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?

Bernd Weiss
  • 7,044
  • 28
  • 40
Steven L. Johnson
  • 375
  • 1
  • 3
  • 9

6 Answers6

20

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

Bernd Weiss
  • 7,044
  • 28
  • 40
  • 8
    (+1) It's merely a fork of Mx but it is quite good as free software for SEM. Another promising project is [lavaan](http://lavaan.ugent.be/) (which tries to provide Mplus compliant output, whenever possible). – chl May 19 '11 at 21:43
  • @chi Thank you for the suggestion, I'll check out lavaan, too. – Steven L. Johnson May 23 '11 at 14:44
7

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

Daniel
  • 71
  • 1
  • 1
4

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.

bfoste01
  • 342
  • 1
  • 9
4

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.

  • What would be the advantages of this model? – Andy Mar 02 '15 at 15:43
  • @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](http://www2.gsu.edu/~wwwmll/wkshop/MLChap_draftfinal.pdf). 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) – Aleksandr Blekh Mar 02 '15 at 16:18
  • @Andy: Here's [the User's Guide](https://www.researchgate.net/profile/Paras_Mehta4/publication/262067217_xxM_User%27s_Guide_MultilevelN-Level_Structural_Equation_Modeling/links/02e7e5368f01722eb6000000.pdf?ev=pub_int_doc_dl&origin=publication_detail&inViewer=true), which is handy, since otherwise you have to register to download the document. – Aleksandr Blekh Mar 02 '15 at 16:19
  • Thanks! I thought this information would make a more complete answer. – Andy Mar 02 '15 at 16:26
2

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

1

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.

Pål Bjartan
  • 133
  • 6