Cross-lagged multilevel model? PreviousNext
Mplus Discussion > Structural Equation Modeling >
 WAM posted on Wednesday, November 23, 2011 - 6:47 am
I tested a reciprocal relationship between two variables (measured at 3 occasions). One of the reviewers insists that the cross-lag model must be tested using M+ by taking the multi-level structure of the data (occasions nested within students, which are nested within classrooms) in to account. Is there such a possibility?
 Linda K. Muthen posted on Wednesday, November 23, 2011 - 1:37 pm
Yes, see Example 9.12.
 Natalie Wright posted on Monday, April 21, 2014 - 4:42 pm
I have a question similar to the one asked by the previous poster. I want to test an autoregressive latent trajectory model incorporating 2 variables measured on 3 occasions. However, the data has a nested structure (students within classrooms). The higher-order units aren't of substantial research interest. I know that multilevel latent growth models and multilevel cross-lagged models can be tested in Mplus, but I haven't seen anything, either in the Mplus documentation or elsewhere, regarding multilevel ALT models. Can this model be specified in Mplus? If so, would TYPE=TWOLEVEL or TYPE=COMPLEX option be more appropriate?

Thanks for any help that you can provide!
 Linda K. Muthen posted on Tuesday, April 22, 2014 - 10:07 am
Mplus can estimate multilevel ALT models. I don't have an example. You might want to ask if someone on SEMNET has one. I think TYPE=TWOLEVEL would be the best choice.
 Wonho Jeung posted on Sunday, May 17, 2015 - 9:46 am
I am testing a reciprocal and time-lagged relationship between two variables (both variables are time-varying measured at 3 occasions). The data has a multilevel structure such that occasions for both variables are nested in person and person nested in teams. You mentioned to see Example 9.12 but I don't know how to apply that example to my model. It has only one time-varying variables.

The following is how I enterd the model.

USEVARIABLES ARE v001 v220 v221 v222 v244 v245 v246 ;
Missing are all (999);
Cluster is v001;

TYPE IS Twolevel Random;


iw1 sw1 | v220@0 v221@1 v222@2;
iw2 sw2 | v244@0 v245@1 v246@2;
iw2 sw2 on iw1;
iw1 sw1 on iw2;
iw1 with sw1;
iw2 with sw2;
iw1 with sw2;
iw2 with sw1;

ib2 sb2 | v244@0 v245@1 v246@2;


Would you please tell me if it is appropriate?
 Bengt O. Muthen posted on Monday, May 18, 2015 - 12:28 pm
This looks ok assuming the 2 sets of outcomes are lagged in time. I don't understand why your Between level specification is for only 1 of the 2 processes.
 ZHANG Liang posted on Monday, August 10, 2015 - 8:12 pm

If I'm doing a 2 time กม 2 variable (A and B) cross-lagged analysis, and trying to examine the effect of a BETWEEN level moderator (M) on one of the cross-lagged paths (A1 to B2), is it correct to write the syntax like below?

usevar = a1 a2 b1 b2 m;
within = a1 b1;
between = m;
cluster = cls;

s | b2 on a1;
b2 on b1;
a2 on a1 b1;

s b2 on m;
And, is it recommended that to write the last line as "s on m;" instead of "s b2 on m;", when I'm not interested in how the level 2 variable M predict B2?

Thank you in advance!
 Bengt O. Muthen posted on Tuesday, August 11, 2015 - 1:37 pm
Q1. Yes.

Q2. That's fine. Just make sure you estimate the variance of b2 on between (and perhaps covariance with s).
 Ai Ye posted on Wednesday, August 12, 2015 - 1:00 pm

I tested a bidirectional relationship between two mathematical learning measures (measured at five time points) using a cross-lagged panel model. Correlation analysis reveal a positive relationships between the two measures across time. I used the following codes:


dcas5f with con5f ;
dcas4f with con4f ;
dcas3f with con3f ;
dcas2f with con2f ;
dcas1f with con1f ;

dcas5f on dcas4f con4f ;
dcas4f on dcas3f con3f ;
dcas3f on dcas2f con2f ;
dcas2f on dcas1f con1f ;

con5f on con4f dcas4f ;
con4f on con3f dcas3f ;
con3f on con2f dcas2f ;
con2f on con1f dcas1f ;

However, there is one coefficient (con3f predicting dcas4f) that is (unexpectedly) negatively significant. I would like to ask under what circumstance two positively correlated measures could be negatively related in a cross-lagged model and how should I interpret it (as I know that conceptually a higher score in one math measure leads to a higher score in the other math measure)?

Thank you very much!
 Bengt O. Muthen posted on Wednesday, August 12, 2015 - 5:15 pm
You may want to direct this general modeling question to SEMNET.
 Ute Hulsheger posted on Monday, February 15, 2016 - 2:38 am
I have a diary study with 2 measurement occasions per day over 5 days. I would like to test cross-lagged effects WITHIN days (thus the effect of Variable A at time 1 on Variable B at time 2 controlling for B at time 1). I would like to model this simultaneously at the within- and between-person level.
Since I have only 2 measurement occasions per day, I test it with type is twolevel rather than with a latent growth model.


Bt2 ON At1;
Bt2 ON Bt1;
At1 WITH Bt1;

Bt2 ON At1;
Bt2 ON Bt1;
At1 WITH Bt1;

My question is whether it makes sense to control for Bt1 at the between-person level. I am in doubt because the sign of the effect of At1 on Bt2 changes when I control for Bt1 and this seems to be due to a suppressor effect.

Many thanks in advance!
 Bengt O. Muthen posted on Tuesday, February 16, 2016 - 6:52 pm
I suggest that you try SEMNET for this question.
 Margarita  posted on Wednesday, October 19, 2016 - 4:42 am
Dear Dr. Muthen,

I am testing a 3x3 (9 variables) cross-lag model with (6) latent variables and WLSMV estimator. I'd like to account for the clustering in my data (schools) but also compare nested models. My understanding is that DIFFTEST is not available with Type = twolevel, so I am not sure how to approach this. Should I

1) use WLSM instead?
2) use the Satorra-Bentler test or
2) use type = complex that allows for DIFFTEST? All variables used in the model were assessed on the individual level (within), so I have no variables in the between level. Would complex be enough to account for the clustering in this case?

Thank you for your time.
 Bengt O. Muthen posted on Wednesday, October 19, 2016 - 5:40 pm
I assume that your latent variable indicators are categorical. Note that you can use ML or Bayes. With ML you can use likelihood-ratio chi-2 testing of nested models. Twolevel WLSMV does not come with Difftest.
 Margarita  posted on Thursday, October 20, 2016 - 1:11 am
Thank you for your response.

Basically I am trying to run a multigroup (gender) multilevel (to account for the clustering -schools) cross lagged model with 6 latent factors with categorical indicators (loadings held constant across the three time points) , and I also want to compare nested models using the chi-square statistic. Is it possible to account for all of this in a model?

I did not use ML because I have 6 latent factors ( 5 categorical indicators in each) which makes it very computationally heavy. I read that likelihood ratio chi-square under integration = montecarlo might be imprecise. I tried using ML with integration = standard (7) but I wasn't sure if it was the right approach and it was taking long to run. Any suggestions would be greatly appreciated!
 Bengt O. Muthen posted on Friday, October 21, 2016 - 11:06 am
See Web Note 16.
 Tihomir Asparouhov posted on Monday, October 24, 2016 - 1:47 pm
Consider using "Model Test:" also as an alternative to difftest. Most nested hypothesis can be tested using the model test command (but not all).
 Margarita  posted on Monday, November 14, 2016 - 1:28 am
Dear Bengt and Tihomir thank you for your responses.

Tihomir - I used the Model Test to explore nested models, but I believe it cannot be used to compare groups due to the fact that Grouping does not work with WLSMV and type=twolevel.

Bengt - For this reason I tried using ML with twolevel (without any grouping) and also as suggested by Web Note 16 (appendix B) but I keep getting this error:



I tried searching other threads as to what this error means but I was unlucky.
 Bengt O. Muthen posted on Monday, November 14, 2016 - 5:08 pm
It sounds like one of your variances on Between is approaching zero, that is, it does not need a Between level presence.

If this doesn't help, please send your ML output to Support along with your license number.
 Kelly Harper posted on Friday, February 09, 2018 - 12:11 pm
I would like to run a twolevel cross-lagged analysis where x and y were measured 3 times a day for 7 days for 140 people. My data are in long format and time of day is coded 0, 1, 2. I was wondering if there is away to examine only the lags within the day (time0 to time1, and time1 to time2) and not include lags across days (time2 on day 1 to time0 on day 2)?
 Tihomir Asparouhov posted on Friday, February 09, 2018 - 6:41 pm
You can set it up as a multivariate model
y1 on y2; y2 on y3;
It will be a two-level model with cluster=id and 7 obs in each cluster, there won't be further time-series in it.
You can take a look at Part 6, page 48-53
but your example is much simpler really.
 Kelly Harper posted on Saturday, February 10, 2018 - 9:13 am
Thank you. That is helpful.

Just to clarify, it seems like I cannot use the lagged command with my data and have to convert the data to wide format with variables for the specific time points?
 Tihomir Asparouhov posted on Monday, February 12, 2018 - 9:22 am
This is what my suggestion above is, however, on a second thought I would instead recommend that you don't do that and instead used the lagged command. If you have the precise times of measurements use those, if not, you can use something like that, 0,1,2 (for day 1), 6,7,8 (for day two) leaving the periods 3, 4, 5 to represent night, etc ... When you have this kind of setup, the correlation across day will be minimal due to the extended distance between the times of observations. You can choose two periods instead of 3 to represent the night interval or whatever makes the most sense.
 ssamimy posted on Monday, August 10, 2020 - 6:53 am

Similar to some of the posters above, I am testing a cross-lagged panel model with 2 time points in a nested dataset: time points nested within participants nested within families nested within study sites. I am only interested in effects at the participant level, but I would like to account for the non-independence of observations.

My input file is organized in wide format (one row per subject; each subject has a family id and site id; variables measured at both time points each have one column - adhd1; adhd2).

Below is the syntax I used to specify this model. Does this seem correct? Thank you so much!

CLUSTER is site family;


adhd2 ON adhd1 pst1;
pst2 ON adhd1 pst1;

adhd1 WITH pst1;
adhd2 WITH pst2;

 Bengt O. Muthen posted on Monday, August 10, 2020 - 3:02 pm
Looks right.
 ssamimy posted on Thursday, August 13, 2020 - 6:45 am
Thank you so much for your quick reply!

I have two follow-up questions:

1)If I am interested in looking at moderators of these paths (e.g., sex), would it make sense to create a product variable and include this in the syntax:

adhd2 ON adhd1 pst1*sex;

2)If I am interested in including a categorical variable, which is measured at 2 timepoints and functions as both a predictor and an outcome in these paths, is it sufficient to modify the syntax like this:

CLUSTER is site family;


WITHIN = adhd2 adhd1 CAT1 CAT2;

adhd2 ON adhd1 CAT1;
CAT2 ON adhd1 CAT1;

Thank you!
 Bengt O. Muthen posted on Thursday, August 13, 2020 - 6:17 pm
1. Yes

2. Yes.
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