Multilevel 3-2-1 Mediation Model

Posted on
No user picture. mediation Joined: 05/30/2018
Hi,

I am new in OpenMx.
Can OpenMx handle a 3-2-1 mediation model? Do you have any example codes for this?

Claire

Replied on Thu, 06/21/2018 - 22:17
Picture of user. jpritikin Joined: 05/23/2012

I'm unfamiliar with that terminology. What is a 3-2-1 mediation model?
Replied on Fri, 06/22/2018 - 16:24
No user picture. mediation Joined: 05/30/2018

In reply to by jpritikin

Hi, jpritikin.

Thank you for asking.
Level 3: X (Independent variable)
Level 2: M (mediator or intervening variable)
Level 1: Y (outcome variable)
The independent variable is at level 3, a mediator is at level 2, and an outcome variable is at level 1. Thus, it is a 3 -> 2 -> 1 multilevel mediation model.

I have seen someone built a 2-1-1 model using OpenMx (https://openmx.ssri.psu.edu/node/4258), but was not sure whether I can build a three-level SEM using OpenMx.

Claire

Replied on Fri, 06/22/2018 - 19:14
Picture of user. mhunter Joined: 07/31/2009

I don't have an example script for 3 -> 2 -> 1 mediation, but yes OpenMx can fit 3-level multilevel structural equation models. Here's an example of a 3-level model that could also be done with e.g. the lme4 package.

[xxm-3.R](https://github.com/OpenMx/OpenMx/blob/master/inst/models/passing/xxm-3.R)

But I think from this example it is relatively clear how one could have arbitrary SEMs at each level instead of the simple models in the example.

Of similar note, OpenMx's multilevel modeling can extent to a theoretically arbitrary number of levels. The paper Joshua wrote on this for instance uses a 5-level SEM.

[https://www.tandfonline.com/doi/full/10.1080/10705511.2017.1293542](https://www.tandfonline.com/doi/full/10.1080/10705511.2017.1293542)