Longitudinal mediation PreviousNext
Mplus Discussion > Structural Equation Modeling >
 Jean Bradley posted on Friday, April 03, 2009 - 10:11 pm
I am assessing longitudinal mediation. I am new to MPLUS and am in need of some advice/guidance to make sure my code is correct & that my models include everything they should (and should not). I have 3 time points (1,2,3), X=intervention group assignment, M=mediator, and Y= outcome. Here is what I have for code:

names are X M1 M2 M3 Y1 Y2 Y3;

use variables are X M1 M2 Y1 Y2 Y3;
missing are all (-99);

Type = missing h1 meanstructure;
bootstrap = 1000;

M2 on X M1;
Y2 on Y1 X;
Y3 on Y2 M2 X;

Model Indirect:
Y3 on M2 X;

1. My first question is do I need to include a "with" statement, and if so, which variables should be included?

2. Can the following model statements be combined, or is it correct to separate them?
Y2 on Y1 X;
Y3 on Y2 M2 X;

OR combined to

Y3 on Y2 M2 Y1 X; (and should M1 be included in this statement as well if I should combined them?)

I appreciate any help you can provide! I do have MacKinnon's mediation book which has been great, but I am unsure about this issue based on his chapters.
 Bengt O. Muthen posted on Saturday, April 04, 2009 - 4:32 pm
1. y2 and m2 should have a residual covariance, so if you don't see that in the Mplus output you should add it. For the other DVs you cannot identify residual covariances because they are already regressed on each other.

Btw, are you sure you don't want to regress y2 on M1?

2. No you cannot combine them as you write it - your combined statement does not express y and m2 as dependent variables (dependent variables appear on the left-hand side of ON).
 Jean Bradley posted on Monday, April 27, 2009 - 5:49 pm
Dr. Muthen,
Thanks for your response, it was VERY helpful.
I get confused about specifying residual covariances. It looks like they only need to be specified among independent variables.. is that correct? This is already being done by MPLUS for DVs? Also, I have been told that the means, variances, or covariances of observed exogenous variables should not be included in the MODEL command... does this mean that I do not need to include the DVs in the WITH statements? Or am I misunderstanding?

Finally, the model above looked at only a single mediator and at true longitudinal relationships only. I am now extending the autotregressive model to include multiple mediators, and both longitudinal and contemporaneous relationships (2 lagged).(I am only including 2 mediators below but will be examining more in the actual models). Would you mind taking a look to see if my code is right (ON statements and WITH statements)?

M = mediator A (T1 T2 T3)
N = mediator B (T1 T2 T3)
X = group assignment
Y = outcome variable (T1 T2 T3)

M2 on X M1;
N2 on X N1;
M3 on X M2
N3 on X N2
Y2 on Y1 X M2 M1 N2 N1;
Y3 on Y2 X M3 M2 N3 N2;

M2 with N2 Y2;
N2 with Y2;

M3 with N3 Y3;
N3 with Y3;

Model Indirect:
Y3 on M2 X;(longitudinal relationship)
Y3 on M3 X;(contemporaneous relationship)
Thanks--- Jean
 Linda K. Muthen posted on Tuesday, April 28, 2009 - 10:40 am
Observed exogenous variables are independent variables and their means, variances, and covariances should not be included in the MODEL command.

Your WITH statements should be:

M2 with N2;
M3 with N3;

You cannot use the same pair of variables in both ON and WITH statements. Both parameters cannot be identified.
 Jean Bradley posted on Tuesday, April 28, 2009 - 12:04 pm
Thanks Dr. Muthen, again very helpful, and I appreciate your time and willingness to help a new user! I just want to confirm that I am understanding your comments above correctly. I include the observed exogenous variables in the ON statements (as shown above and below), but do not include them in the WITH statements, correct? So if I change my WITH statements, as suggested above, and shown below, is this Model command written correctly?

M2 on X M1;
N2 on X N1;
M3 on X M2
N3 on X N2
Y2 on Y1 X M2 M1 N2 N1;
Y3 on Y2 X M3 M2 N3 N2;

M2 with N2;
M3 with N3;

Thanks a lot... Jean
 Linda K. Muthen posted on Tuesday, April 28, 2009 - 4:08 pm
 Jean Bradley posted on Sunday, May 03, 2009 - 1:17 pm
I have a follow-up question with the Bengt O. Muthen posted on Saturday, April 04, 2009 - 4:32 pm post above.

You said that M2 and Y2 should have a covariance structure. When I run the model, it does not. Should I specify this in a WITH statement?

M2 on X M1;
Y2 on Y1 M1 X;
Y3 on Y2 M2 X;

Y2 with M2?

 Bengt O. Muthen posted on Sunday, May 03, 2009 - 3:37 pm
 Jean Bradley posted on Tuesday, May 05, 2009 - 8:56 am
Thanks Dr. Muthen,
I looked at my output again, and this is what it reads (without specifying M2 with Y2)
FRIEND24 0.045 0.013 3.442

FRIEND06 0.000 0.222 0.001
FRIEND24 2.062 0.302 6.823
FIT06R 1.669 0.263 6.357
FIT24R 1.598 0.262 6.107

Residual Variances
FRIEND06 0.275 0.020 13.674
FRIEND24 0.512 0.039 13.228
FIT06R 0.100 0.007 13.984
FIT24R 0.101 0.008 13.418

Does this mean that these 2 variable do have a residual covariance, so there is no need to specify M2 with Y2? I did not specify friend24 WITH fit24R but MPLUS automatically did it... I think it is a default. I wasn't sure if I should also see Fit06R WITH friend06 as well, or if this is correct. Thanks again. I know this is picky, but I want to make sure my models are correct.
 Bengt O. Muthen posted on Tuesday, May 05, 2009 - 7:34 pm
Yes, Mplus gives some WITH statements by default, but some others need to be given by the user - such as M2 WITH Y2 in this case. What you don't see in the output is not used in the model. So since you don't see M2 WITH Y2 you have to specify it. Once you have specified it in the input, it will show up in the output.
 Jean Bradley posted on Wednesday, May 06, 2009 - 7:50 am
Great! Thanks!
 anonymous Z posted on Friday, September 25, 2015 - 2:19 pm
Drs. Muthen,

I have a longitudinal data set including five time points. Basically, I want to see how x influences Y through M.

X (including 5 time points): relationship status change. The participant can be in relationship at time 1, and out of relationship at time 2, and back in relationship at time 3, and so on and so forth. How to model relationship status change (this is a dichotomous variable) in Mplus?
Y: including 5 time points
M: including 5 time points

I am not sure how to model this with Mplus.

Could you provide any advice?

Thank you very much!
 anonymous Z posted on Tuesday, October 06, 2015 - 8:17 am
Dear Drs. Muthen,

I posted a question on Sep 25. I appreciate if you could provide any guidance in regard to that questions.

Thanks so much!
 Bengt O. Muthen posted on Tuesday, October 06, 2015 - 5:46 pm
Sorry we missed this one.

I am not sure. Perhaps you can get inspiration from our Topic 3 handout, slides 157-159.

You may also want to ask on SEMNET.
 Brittany Rudd posted on Monday, February 06, 2017 - 6:33 am

I am testing a cross-sectional mediation model with 1 binary IV, 1 ordinal mediator, and 5 latent IVs. I'm using ML with 5000 bootstraps. I am using the Model Constraint command to test the indirect effect:

New (ab);
ab = a*b;

My questions are:

1. Can I test the mediation of the IV on all 5 latent outcomes simultaneously or do I need to run the model 5 times, once for each outcome?

2. If I can test simultaneously, can you point me in the right direction concerning MPlus code for these model?

3. I also plan to test this model as a longitudinal panel model (I have 3 waves of data). So same questions (1 and 2) regarding a panel version of this model.

Thank you very much in advance for your help.
 Bengt O. Muthen posted on Monday, February 06, 2017 - 8:25 am
1-2. You said "5 latent IV's" but I think you meant 5 latent DVs. Running them one at a time gives the same answer as running them all together.

Note that special modeling is needed with an ordinal mediator - see our new Regression and Mediation book. As explained there, ML isn't the best estimator for this. Bayes is good and WLSMV is also possible.

3. In the longitudinal setting new questions arise - e.g. y_t is influenced by m_t or m_t-1?

See also Maxwell et al 2011 in MBR.
Back to top
Add Your Message Here
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Options: Enable HTML code in message
Automatically activate URLs in message