Message/Author 


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; Model: 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. Thanks. Jean 


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 lefthand side of ON). 


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) Model: 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 


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. 


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? Model: 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 


Yes. 


I have a followup 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? Model: M2 on X M1; Y2 on Y1 M1 X; Y3 on Y2 M2 X; Y2 with M2? Thanks. 


Yes. 


Thanks Dr. Muthen, I looked at my output again, and this is what it reads (without specifying M2 with Y2) FIT24R WITH FRIEND24 0.045 0.013 3.442 Intercepts 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. 


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. 


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! 


Sorry we missed this one. I am not sure. Perhaps you can get inspiration from our Topic 3 handout, slides 157159. You may also want to ask on SEMNET. 

Back to top 