Latent difference score PreviousNext
Mplus Discussion > Latent Variable Mixture Modeling >
 Magda Chmiel posted on Monday, April 23, 2012 - 7:03 am
Dear Dr. Muthèn:
I have to compute a latent variable (ABS – affective balance score) that represents the latent difference of two latent variables (PA – positive affect and NA negative affect). Then I need to regress the obtained latent score (ABS) on another latent variable (IQ). I have heard of computing latent difference score which should be NA = PA@1 and then computing NA on IQ – where NA represents now the ABS. Is that syntax correct? OR do you have other suggestions how to best compute the difference of two latent variables?
Thank you



NA by Q_NA_1_2

PA by Q_PA_1_2

NA on PA@1;

NA on IQ;
 Linda K. Muthen posted on Monday, April 23, 2012 - 1:42 pm

NA on PA@1;

NA on IQ;


diff BY;
diff ON pa@1 na@-1;
 Jiawen Chen posted on Tuesday, August 26, 2014 - 4:04 pm
Dear Dr. Muthèn:

I wonder if I can model the latent difference score of two different variables because so far all I have come across is about modeling latent difference score of the same variable across different waves. I have a variable called intrinsic work values, measured by three items: "if you are to look for a full-time job, how important are the following job characteristics (5 point scale): a)job is interesting; b)I make most of the decisions; c)I feel accomplished." I have another variable called intrinsic work rewards, measured by exactly the same items, only the question was asked differently, "describe how strongly you agree with the following characteristics about your current job (5 point scale)." So if I want to study how the discrepancy between work values and rewards predicts a host of outcome variables, is it appropriate to model the latent difference score between them at the same wave? Can I also do a third-order latent growth model of the latent difference score across multiple waves? Or some other method may be more suitable for what I want to study? Thank you very much!
 Bengt O. Muthen posted on Tuesday, August 26, 2014 - 5:05 pm
It seems to me that one can do some version of latent difference modeling also with different variables, but I haven't tried.
 Lixin Jiang posted on Wednesday, September 03, 2014 - 9:07 pm
I have two time points measures (NSsad, SSsad), which have been counter-balanced in my study. Now I want to use gender and personality trait to predict this latent change. See below that I have used it as latent growth model. However, it seems to be misleading as it is not growth itself. How do I model this "latent difference/change score model"? Thanks.

i s|NSsad@0 SSsad@1;
s on sex CA;
 Linda K. Muthen posted on Thursday, September 04, 2014 - 9:06 am
A linear growth model cannot be identified with only two time points. I would instead create a change score as follows:

f BY nssad@1 sssad@-1;
f ON sex ca;
 Roger Brown posted on Thursday, September 04, 2014 - 9:39 am
I worked up this simple difference test with a covariate the other day and checked it against a group test on a difference vector. Is this what you are thinking of?

title: LCS used to estimate paried t-test with covariate
data: file is ttest.txt;
variable: names are x y1 y2;
lcs on y1@0;
lcs by y2@1;
y2 on lcs@1;
y2 on y1@1;
lcs on x;
 Bengt O. Muthen posted on Thursday, September 04, 2014 - 2:39 pm
Shouldn't there be a negative sign somewhere?
 Lixin Jiang posted on Thursday, September 04, 2014 - 4:21 pm
Thank you, Roger. The results based on your codes were more consistent with the regression results from SPSS.
 Meike Slagt posted on Thursday, November 13, 2014 - 9:43 am
Dear Dr. Muthen,

I'm trying to estimate latent change scores, using ordinal data.

I can get one part of that model to work (the measurement part), I can get the other part of that model to work (the difference scores, using factor scores saved from the measurement part as input for the difference scores), but I can't get the complete model to converge. That is, I get parameter estimates, but no standard errors. I'm providing the Mplus code I used in the next post, because it doesn't fit in this post anymore.

I would really appreciate advice on this: Why is my model not converging; Is my sample size just to small for this (N=190); Am I forgetting certain parameter constraints leading my model to be unidentified?

Thank you so much in advance!
 Meike Slagt posted on Thursday, November 13, 2014 - 9:47 am
!Measurement Part, factorial invariance across time

neg1 BY PreN_Boos PreN_Ver PreN_Bang (1-3);
neg2 BY PostN_Boos PostN_Ver PostN_Bang (1-3);

[PreN_Boos$1 PostN_Boos$1] (4);
[PreN_Boos$2 PostN_Boos$2] (5);
[PreN_Ver$1 PostN_Ver$1] (6);
[PreN_Ver$2 PostN_Ver$2] (7);
[PreN_Bang$1 PostN_Bang$1] (8);
[PreN_Bang$2 PostN_Bang$2] (9);

{PreN_Boos@1 PreN_Ver@1 PreN_Bang@1};

!Difference scores
!Works when I save factor scores of neg1 and neg2 and use those as input. Doesn’t work when I try to estimate measurement part and difference scores in one model.

Dif_Neg BY neg2@1; !define latent change by T2
neg2 ON neg1@1; !autoregression T2 T1
neg2@0 neg1; !var at T2=0, estimate var T1 & change
[neg2@0 Dif_Neg neg1]; !mean at T2=0, estimate mean T1 & change
Dif_Neg ON neg1; !intercept change association

 Bengt O. Muthen posted on Friday, November 14, 2014 - 1:25 pm
We discourage postings in several windows. For a longer question like this, please send your problematic outputs, data, and license number to
 Dmitriy Poznyak posted on Monday, March 16, 2015 - 12:28 pm
Hi, Mplus team,

I need to model a difference/change in the factor scores between the baseline model T and the model at T2. Both models are based on the same set of respondents. The goal is to estimate the change and save the corresponding score to further use in the regression analysis.

I wonder whether you could comment on the following approach or, perhaps, point me at the better alternatives. My intuition was to test for the invariance in two measurement models to ensure the scales have identical metric at T and T2, save the factor scores and compute the difference. This being said, I am not sure whether this approach would be perfectly appropriate. I think I stumbled upon Linda's answer somewhere on the forum that invariance should not be tested on the same sample of respondents. I'd appreciate any suggestions.

For what it's worth, the model to be estimated is hierarchical CFA, in which several constructs load on a general construct.
 Bengt O. Muthen posted on Monday, March 16, 2015 - 4:03 pm
Analyze a model for the 2 time points jointly. Check scalar measurement invariance. Fix the factor mean(s) at zero for the first time point and let them be free to be estimated for the second time point. No need for factor scores. The factor mean(s) at the second time point represent(s) the difference from the first time point.
 Dmitriy Poznyak posted on Monday, March 16, 2015 - 6:58 pm
Excellent! Thank you so much for the prompt reply.
 Andre Marchand posted on Thursday, May 21, 2015 - 8:37 am
Hi Mplus team,

I am new to Mplus, so please excuse my basic question. I would like to calculate latent difference scores for two latent constructs in the following model: y = (a-b) + (c-d) with a = construct with the indicators a1,a2,a3, b with b1,b2,b3, c with c1,c2,c3, and d with d1,d2,d3.

How can I translate this to a mplus model?

Thank you!
 IW posted on Monday, June 15, 2015 - 12:20 pm
Hello Dr. Muthen,

Can you explain your previous answer a bit more or perhaps point me to a resource that goes into depth(re: Monday, March 16, 2015 - 4:03 pm)?

McArdle (2009) seem to be suggesting a different approach.

McArdle, J. J. (2009). Latent variable modeling of differences and changes with longitudinal data. Annual review of psychology, 60, 577-605.
 Bengt O. Muthen posted on Monday, June 15, 2015 - 2:10 pm
Time points are analogous to groups in that scalar measurement invariance makes it possible to identify a factor mean difference. That was my reply. I don't know about specific references. With 2 time points there is not much else one can do.
 Sara Geven posted on Monday, September 07, 2015 - 10:32 am
Dear Prof Muthen,
I would like to analyze a change in a factor measured at two time points. However, I would also like to incorporate the effect of the factor score at wave 1 on the change in factor scores.

This is not possible when I use the code described above (as the path from delin1 to diff is constrained):

diff BY;
diff ON delin1@1 delin2@-1;

I was wondering whether there is a way to do this in Mplus.

I know it is possible when the difference score is a latent variable (in line with MCardle's (2009) paper that is also mentioned above):

delin2 ON delin1@1;
delin1 delin2@;
[delin1 delin2@0];
delta_b BY delin2@1;

However, somehow this model seems to be unidentified when I use factors to construct delin1 and delin2 (instead of scales).

Do you know what might be going on? Or do you know another way to analyze this?

Thank you in advance

Sara Geven
 Lance Rappaport posted on Tuesday, September 08, 2015 - 12:05 pm
Dear Professor Muthen,

I am hoping to use latent difference score modeling to examine changes in two processes, however variables at each time point are theoretically and empirically binomial. Do you know of a resource for latent difference score modeling with binomial variables?

Thank you.

Lance Rappaport
 Bengt O. Muthen posted on Tuesday, September 08, 2015 - 5:47 pm
Sarah, please send your output, data, and license number to support.
 Bengt O. Muthen posted on Tuesday, September 08, 2015 - 5:48 pm
Lance - you may want to ask this on SEMNET.
 Sara Geven posted on Wednesday, September 09, 2015 - 1:19 pm
Dear Bengt,

Thank you for your willingness to help. I just solved the problem. One item intercept had to be fixed for identification.

 Seth Frndak posted on Friday, December 18, 2015 - 8:18 am
I am attempting to create a LDS model with 4 timepoints. The first three timepoints 1-3 are 1-year apart. The 4th timepoint is 4 years after the 3rd timepoint. So you could explain it as timepoints 1-3 & 7.

I know that one assumption of the LDS model is that the autoregressive paths are constrained to 1. If an autoregressive path is modeled between 3 and 7, is there a way to estimate the longer time gap without violating model assumptions?

Furthermore, would additional parameterization be necessary to estimate the time 7 difference score after taking the adjusted autoregressive path into account?
 Bengt O. Muthen posted on Friday, December 18, 2015 - 5:47 pm
You may want to ask that question on SEMNET.
 Seth Frndak posted on Friday, February 19, 2016 - 8:08 am
What are the implications of skewed data in a latent difference score framework?

It seems (Burt and Obradovic 2012) that skewness of the baseline scores can create spurious relationships with covariates. I have been unable to find any resources on LDS and highly skewed data. Can you point me in the right direction?
 Bengt O. Muthen posted on Friday, February 19, 2016 - 6:21 pm
Don't know - try SEMNET.
 Mark Prince posted on Friday, February 26, 2016 - 9:31 am
Hi there,

I am attempting to run a monte carlo simulation for a bivariate latent change score model and am getting the error:


My syntax works with real data (using code I got from a workshop with Jack McArdle). I am using the parameter estimates from that output in the simulation to look at power, but I get the error above when I do that.

Do you have any suggestions?
 Bengt O. Muthen posted on Friday, February 26, 2016 - 11:14 am
Send output to Support along with your license number.
 Raghav Ramachandran posted on Friday, March 18, 2016 - 9:07 am
Drs. Muthen,

I was wondering if it would be possible to run a latent difference score (LDS) model in MPlus with individually-varying times for each of the latent variables. Also, the time points are not necessarily consecutive since an individual can have data at up to four time points (covering a span of roughly four years) and in that case, I would use only the earliest and latest time points for the LDS. I'm using one construct at two different time points for the LDS with covariates and a distal outcome. If you could point me to suitable references/MPlus code for a LDS model with individually-varying times, I would really appreciate it. Thanks for your help.

 Bengt O. Muthen posted on Saturday, March 19, 2016 - 4:28 pm
I don't have such a script - try SEMNET. And if you find it, please post it.
 SM posted on Tuesday, April 19, 2016 - 5:13 am

I am trying to calculate the latent difference between informants, on the same variable, which difference I then want to predict. I tried two different ways. First the way Linda wrote on April 23, 2012:

diff BY;
diff ON f1@1 f2@-1;

In this case the mean of the Diff does not appear on "Model Results" but only on "Sample Statistics for Estimated Factor Scores".

Second, I tried:
[f1] (a);
[f2] (b);
diff BY;
diff BY f1@1 f2@1;
[diff] (c);
Model Constraint:
c = a-b;

In the latter case, the Mean of the Diff appears in the model results.

Although the estimate of the mean Diff is almost identical in both methods (they differ by 0,001 unstandardized), the SE's are totally different (0,246 and 0,027 respectively). According to the first method, mean Diff is not significant.

Furthermore, comparing "a" and "b" by means of Wald test also results in significant difference.

How do you explain this difference in methods? Since I would like to predict the Diff, how should I proceed?

Thank you.
 Joe posted on Thursday, July 28, 2016 - 12:32 pm
Can I run a latent change score model if both variables have a Poisson distribution? that is, something like the following?

COUNT IS t1 t2;

f BY t1@1 t2@-1;
 Bengt O. Muthen posted on Friday, July 29, 2016 - 3:12 pm
Poisson modeling considers the log mean for the count variable. I therefore don't think a linear model of the difference makes sense.
 Seth Frndak posted on Monday, August 01, 2016 - 12:17 pm
There seems to have been some work in a two-part modeling framework with latent change scores. This is with zero-inflated data, however. See:
 Bengt O. Muthen posted on Monday, August 01, 2016 - 4:29 pm
 Lior Abramson posted on Wednesday, January 25, 2017 - 11:42 pm
Dear Drs. Muthen,
I am trying to conduct a bivariate latent difference score analysis, and I have two variables estimated at only two time points.
I tried to adjust a syntax I found that refer to several time points, but I think I am doing something wrong. I get the message that "THE DEGREES OF FREEDOM FOR THIS MODEL ARE NEGATIVE. THE MODEL IS NOT IDENTIFIED".
I attach the syntax. I would appreciate your help in understanding my mistake:
(chy and chx are the latent change variables).

y2 on y1;
chy by y2;

x2 on x1;
chx by x2;

chy on y1;
chy on x1;

chx on x1;
chx on y1;

Thank you
 Bengt O. Muthen posted on Thursday, January 26, 2017 - 5:05 pm
You want to ask this question on SEMNET.
 Barbara Thumann posted on Wednesday, February 08, 2017 - 12:24 am
Dear Drs. Muthén,

I have two wave data and would like to examine the effect of sleep on change in various cardio-metabolic parameters.

First of all, I fitted a model to obtain the latent change in waist circumference:

z_wst_T3 on z_wst_T1@1;
z_wst_T1 z_wst_T3@;
[z_wst_T1 z_wst_T3@0];
dewst BY z_wst_T3@1;

I get a warning that the latent variable covariance matrix is not positive definite and see that the variance of my delta (dewst) is significantly negative.

Is there any solution to this problem? I used the same code for blood pressure and this worked fine.

 Bengt O. Muthen posted on Wednesday, February 08, 2017 - 4:05 pm
SEMNET will be a good outlet to help you with this.
 Philipp Jugert posted on Friday, March 10, 2017 - 10:19 am
I am trying to estimate a random slope for the effect of a latent difference score on the slope of a multilevel latent growth model. However, it seems that thiis not possible as I get fatal error messages. Here's my syntax for the within part. What am I doing wrong?


CHperprb by peerprb3@1;
peerprb3 on peerprb@1;
CHperprb with peerprb;
[CHperprb peerprb peerprb3@0];
CHperprb peerprb;

iw sw | homo@-2 homo2@-1 homo3@0;

s1 | sw ON CHperprb;
 Bengt O. Muthen posted on Friday, March 10, 2017 - 6:14 pm
We need to see the fatal error message - send your output to Support along with your license number.
 Philipp Jugert posted on Saturday, March 11, 2017 - 10:27 am
Maybe I should be more precise. The error message I received was:


I am assuming this has to do with the fact that I am trying to estimate a random slope for an effect of a latent variable (CHperprb) on another latent variable (slope). So I would like to know whether this is in theory possible. If it is, then it may have to do with my particular data and I am willing to send it to support.
 Manuel Heinrich posted on Wednesday, May 24, 2017 - 3:20 am
Dear all,
I am trying to estimate McArdles Latent Difference Score model on two levels using the following code.

diffa BY;
t2_att ON t1_att@1
diffa@1 ;
t1_att WITH diffa;
diffa_b BY;
t2_att ON t1_att@1
diffa_b@1 ;
t1_att WITH diffa_b;

I am somehow surprise that the Chi_Square is zero (which makes sense since the model is just identified), but the between SRMR is .oo4 (changing the estimator from MLR to WLSMV resolves the problem, but i can't explain why).
Is something wrong with the syntax? Many thanks in advance!
 Bengt O. Muthen posted on Wednesday, May 24, 2017 - 4:35 pm
An SRMR value of 0.004 may be zero given the numerical/estimation precision. As for the syntax, please check with SEMNET.
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