Piecewise PreviousNext
Mplus Discussion > Growth Modeling of Longitudinal Data >
Message/Author
 Anonymous posted on Tuesday, May 04, 2004 - 4:14 pm
I'm trying to specify a growth model of my contiuous DV measured yearly from age 13 to age 22. I want to specify a piecewise model that captures linear growth from age 13-15, 16-19, and 20-22. Can you help me to determine how I should specify this model in mplus?
 Linda K. Muthen posted on Tuesday, May 04, 2004 - 5:53 pm
Example 6.11 shows how to set up a piecewise model for two parts. This can be generalized to three.
 Anonymous posted on Wednesday, May 05, 2004 - 2:01 pm
Thank you. Would you please take a look at this to make sure that I'm generalizing to 3 pieces correctly?

i BY y13-y22@1;
s1 BY y13@0 y14@1 y15@2 y16-y22@2;
s2 BY y13-y15@0 y16@0 Y17@1 y18@2 Y19@3 y20-y22@3;
s3 BY y13-y19@0 y20@0 y21@1 y22@2;

I'm confused about whether the y16-y22 for s1 should be @2 or @0. Likewise, should y20-y22 for s2 be @0 or @3? Thanks for your help.
 Linda K. Muthen posted on Wednesday, May 05, 2004 - 5:45 pm
The end point of one piece should be the beginning point for the next piece if they are sequential. In the user's guide example, the timescores are:

01222
00012

so the first piece ends at 2 for the third repeated measure. The second piece starts at the end of the first piece.

Your time scores are:

0 1 2 2 2 2 2 2 2 2
0 0 0 0 1 2 3 3 3 3
0 0 0 0 0 0 0 0 1 2

I'm not sure which measures are part of which piece given your time scores.
 Matthew McBee posted on Wednesday, August 30, 2006 - 10:11 am
I am creating a similar model and have a couple of questions.

I have seven timepoints. I am interested in understanding the effect of an intervention which would have occured between timepoints 6 and 7. The outcome is the percentage of students in a school that enter college.

Overall college enrollment rates have been slowly increasing in my state each year. I want to seperate this effect from the possible effect of the treatment. Should I specify my time scores as:

0 1 2 3 4 5 6
0 0 0 0 0 0 1

or

0 1 2 3 4 5 5
0 0 0 0 0 0 1 ?


Finally, will the model be identified given that the second slope will apply to only a single timepoint?
 Linda K. Muthen posted on Thursday, August 31, 2006 - 8:08 am
You are correct that the second piece would not be identified. I would use a single model and add a direct effect of the time 7 outcome on the dummy variable of intervention. So

y7 ON intervention;
 Geoffrey Hammond posted on Thursday, November 30, 2006 - 9:29 am
Hello.

I have been recently trying to specify a piecewise paramterization. The observations are in months/10 and are at initiation, 3, 6, 12 ,18, 24, 30, and 36 months. I have been trying to specify two parts, with four observations each, one over the first year and the second over the remaining two years. Is the following correct?

i1 s1 Q1| pos1@0 pos2@0.3 pos3@0.6 pos4@1.2 pos5@1.8 pos6@1.8
pos7@1.8 pos8@1.8;

s2 Q2| pos1@0 pos2@0 pos3@0
pos4@0 pos5@0.6 pos6@1.2
pos7@1.8 pos8@2.4;

Thanks in advance
 Linda K. Muthen posted on Friday, December 01, 2006 - 10:01 am
Note that you need to mention the intercept growth factor in both parts of the growth model. Just use the same name. The way you have your second model specified, Mplus would interpret it as a linear model because it has two growth factors. In Chapter 16, there is a table that shows a piecewise growth model. I would specify the timescores for the piecewise growth model as follows.

Piece 1: 0 .5 1 2 2 2 2 2

Piece 2: 0 0 0 0 0 1 2 3
 Geoffrey Hammond posted on Sunday, December 03, 2006 - 5:38 pm
Thanks for the reply Linda.

Hovever for my second piece, shouldn't the order be:

Piece 1: 0 0.5 1 2 2 2 2 2

Piece 2: 0 0 0 0 1 2 3 4

In your proposed paramterization, I am not modelling the movement between 12 and 18 months?


Sorry, still a bit confused.
 Linda K. Muthen posted on Monday, December 04, 2006 - 8:28 am
Yes, the second piece should be as you state when there is one intercept growth factor.
 Dustin Pardini posted on Thursday, April 12, 2007 - 11:35 am
Hello Muthens,

I have some intervention data collected at pre, post 6, 12, 24, 36 month follow-ups. I want to compare two randomized intervention conditions on various externalizing outcomes. The problem is there is a large drop in externalizing problems from pre to post, then only modest linear change in the outcome across the follow-up assessments. A quadratic does not fit the data well. It is more like a piecewise model with the first slope consisting of change from pre-post, and the second consisting of linear change occuring after the intervention has been completed.

Because there are only two timepoints for the first piece the model it is not identified. I have considered leaving out the baseline assessment since random assignment makes the two treatment groups of interest equal prior to treatment. However, I was wondering if you had any suggestions for dealing with this problem.
 Bengt O. Muthen posted on Friday, April 13, 2007 - 9:11 am
One approach that I have used is to work with piecewise growth as you say, where the first piece has only a random intercept (centered at the baseline) but a fixed slope. This is then identified from 2 time points. The second piece can have its own intercept and slope which are both random. So part of the intervention effect is on the fixed slope of the first piece and part is on the random intercept and slope of the second piece.

I would not leave out the baseline assessment from the growth modeling.
 Dustin Pardini posted on Friday, April 13, 2007 - 11:01 am
Bengt,

I am having problems getting it to run. Is this how it would be specified for six equally spaced time points:

i1 s1 | ext1@0 ext2@1 ext3@1 ext4@1 ext5@1 ext6@1;

i2 s2 | ext1@0 ext2@0 ext3@1 ext4@2 ext5@4 ext6@6;

[ext1-ext6@0 i1 i2 s1 s2];

s1@0;
s1 with i1@0 s2@0 i2@0;


So would the interpretation for the first slope (which is fixed) be the the average pre-post intervention effect for all participants, and the second intercept would represent individual deviations from this average effect.
 Bengt O. Muthen posted on Friday, April 13, 2007 - 3:44 pm
No, when you have separate intercept factors, you work with 2 separate (but correlated) growth processes, e.g.:

i1 s1 | ext1@0 ext2@1;
s1@0;

i2 s2 | ext3@-3 ext4@-2 ext5@-1 ext6@0;

where you center i2 at the last time point. Nothing else needs to be said, except of course

s1 i2 s2 on tx;

Check Tech1 to make sure you get i1 correlated with i2, s2.
 Dustin Pardini posted on Sunday, April 15, 2007 - 7:08 am
Bengt,

Thanks. Just to clarify the regression should be

i1 i2 s2 on tx; Correct? Because S1 has a variance fixed to 0.

D
 Bengt O. Muthen posted on Sunday, April 15, 2007 - 10:31 am
You don't want to regress i1 on tx because i1 refers to the pre-intervention time point.

You can regress s1 on tx even though s1 has variance zero. The regression implies that the s1 mean is different for controls and tx subjects, so that describes the first drop that you mentioned.
 Katherine A. Johnson posted on Tuesday, June 19, 2007 - 2:54 pm
I am modeling change over time with 6 equally spaced time points each 2 years apart. My means are:
1.557
1.587
1.590
1.613
1.624
1.588

Would it be inappropriate to have a piecewise growth model with 4 pieces?

For example:
0 2 2 2 2 2
0 0 2 2 2 2
0 0 0 2 4 4
0 0 0 0 0 2

Thank you!
 Linda K. Muthen posted on Tuesday, June 19, 2007 - 5:47 pm
This would not be identified. We recommend at least three repeated measures for each piece.
 Gwen Marchand posted on Sunday, April 06, 2008 - 8:05 pm
Hello,

I am using a piecewise growth model to describe late elementary school and the transition to middle school. The linear model for each piece estimates fine, but when I add a quadratic function, the model will not converge.

To ask for the quadratic function, I am adding a "q" as I would in a traditional growth model. Do I need to do something different? Here is an example of the syntax...

i s1 q1| g3fasxex@0 g3sasxex@1 4fasxex@2 g4sasxex@3 g5fasxex@4 g5sasxex@5 g6fasxex@5 g6sasxex@5 g7fasxex@5 g7sasxex@5;

i s2 q2|g3fasxex@0 g3sasxex@0 g4fasxex@0 g4sasxex@0 g5fasxex@0 g5sasxex@0 g6fasxex@1 g6sasxex@2 g7fasxex@3 g7sasxex@4;

If it helps, this data has planned missingness, so I have had to set the covariance coverage to 0 to account for no students having data in both the 3rd and the 7th grade.
 Gwen Marchand posted on Sunday, April 06, 2008 - 10:11 pm
A second question: if both slopes of a piecewise model appear similar, is there a way to test (through some kind of constraint) whether a single slope, rather than two slopes, fits the model just as well as two processes? Would you consider these models nested?

Thank you for any insight.

Gwen
 Linda K. Muthen posted on Monday, April 07, 2008 - 9:10 am
If you have no data for certain timepoints, you reflect this through the time scores, for example, if you measured in years 1, 2, and 4, the time scores would be 0, 1, and 3. You don't do this through missing data.

Usually a piecewise model is used to break a growth curve that is not linear into linear pieces so I don't understand why you are adding a quadratic growth factor.

You can test if the slope of the two pieces are equal by chi-square difference testing of the two nested models or by using MODEL TEST.
 Bill Dudley posted on Thursday, July 03, 2008 - 9:26 am
I have longitudinal data on recovery from cancer treatment. There are six time points (0, 6, 12, 18, 24 and 36). The time = 0 is prior to treatment and then starting with 6 months we have the recovery phase. The means show a jump between T1 and t2 so it makes sense to fit a two piece model. The first linear piece has only two time points so I have looked at the notes below re fixing s1 variance and the s1, i covariance. I assume that in the second piece that the time 2 serves as the intercept for that curve. I also want to include covariates - age and treatment type (a binary variable).
Question1 - So I wonder if I should model an i2 as well as i.
Question2 - If s1 and i are fixed then it makes no sense to look for predictors of s1…. Correct?
Question 3 - I also can fit a nice quadratic curve to the data without the piecewise approach. I assume that although this fits, it is not valid given the nature of the data collection and the mean and that I should stick with the piecewise… Correct?
 Bengt O. Muthen posted on Thursday, July 03, 2008 - 4:45 pm
Q1 Yes

Q2 You can. Think of a gender dummy variable where s1 is different for males and females - that can be identified. But the residual variance for s1 then needs to still be zero.

Q3 If the second piece does not need a quadratic and if having only one piece that is quadratic fits the data well I would do one piece quadratic. My experience is that 2 pieces are needed - and they might have different covariate influence.
 Bill Dudley posted on Tuesday, July 08, 2008 - 6:58 am
Thanks for the reply to my post on July 3rd. Just a follow up if I might.

With regard to Q3 - are you saying that I should use a one piece quadratic model rather than a two piece or are you saying that in cases such as mine two piece models are preferred?
 Bengt O. Muthen posted on Tuesday, July 08, 2008 - 8:52 am
Use the 1-piece quadratic if it fits well. If it doesn't, use 2 pieces.
 Tim Stump posted on Friday, October 30, 2009 - 8:12 am
I'm specifying a linear growth model with 5 unequally-spaced time points--baseline and then followup at 2, 4, 8, and 12 wks from baseline.

I'd like to specify a piecewise model since most of the change in individuals occurs between baseline and 2 wks and then they don't exhibit as much change after that. Would the timescores in the following statements be correct:

i s1 | var0@0 var2@2 var4@2 var8@2 var12@2;
i s2 | var0@0 var2@0 var4@2 var8@6 var12@10;

I'm most unsure about the second slope factor.

Thanks.
 Bengt O. Muthen posted on Friday, October 30, 2009 - 8:41 am
This looks right. Note that the s1 variance cannot be identified from only 2 time points and will have to be fixed at zero.

You can also consider a more flexible model with 2 different intercepts:

i1 s1 | var@0 var2@2;
s1@0;
i2 s2 | var4@0 var8@4 var12@8;
 Tim Stump posted on Monday, November 02, 2009 - 6:53 am
Thanks for your reply to my post on 30oct2009. I have a follow-up question. By specifying s1@0, I'm setting the variance of the slope factor s1 to be zero. Can I still make comparisons on the mean of the slope factor s1? Say I have a binary covariate named group coded 0 or 1. If I add: i s1 s2 on group; to the model, does it still make sense to test for differences in the mean s1 across group even though the variance is contstrained to zero?
 Bengt O. Muthen posted on Monday, November 02, 2009 - 7:55 am
Yes, because it simply says that the s1 mean is different for the two groups.
 Jennifer Augustine posted on Monday, March 08, 2010 - 10:33 am
Hello,

I would like to continue with this thread by asking some additional questions:

I would like to run a piecegrowth model. The reason I'd like to do this is because I have four time points, but a linear model does not fit the data. Specifically, there is a big change between time 1 and time 2. The change between time 2-4 is less dramatic. Substantively, time 1-2 represents the transition into elementary school and var is achievement. The data points are measured in two-year increments.

My model looks like this:

i1 s1 | var1@-1 var2@0 ;
s1@0 ;
i1 s2 | var2@0 var3@2 var4*4 ;

I have found I have to free the time 4 factor loading to get the model to run. The estimated time score for this model is 2.067.

Here are my questions:

First, should this var4 time score alarm me? If I run a gc from times 2-4 and free the time 4 loading, the model runs and has good model fit. The estimated time 4 factor loading for this model is 2.65. If I estimate a quadratic using times 1-4, I get an error message.

Secondly, I’d like to allow the intercepts to be different (specifying i1 and i2), but this model does not run. Could you suggest why this might be and how I can fix it?


Thank you very much for your help!
 Linda K. Muthen posted on Tuesday, March 09, 2010 - 10:43 am
For a piecewise model, you need to include all outcomes in both pieces. Your piecewise model is set up incorrectly. See Example 6.11.

If you want different intercepts, you could try:

i1 s1 |var1 var2;
i2 s2 |var3 var4;
s1@0 s2@0;

With only two measures, you cannot identify the variances of the slope growth factors. You can't include the same outcome in more than one growth model.
 Jennifer Augustine posted on Tuesday, March 09, 2010 - 12:38 pm
Linda,

Thank you for your help. So, if I wanted to estimate a piecewise model with the same intercept for each piece (as above), my model should actually look like:

i1 s1 | var1@-1 var2@0 var3@0 var4@0;
i1 s2 | var1@0 var2@0 var3@2 var4*4 ;

Also, you mention that with only two measures, I cannot identify the variances of the slope growth factors. This is why I need to set s1@0, which I understand, but as I think about it, is beginning to seem problematic because I'd like to look at the covariance of s1 with s2. Moreover, I am assuming that everyone has the same s1, which is not the correct.

Are there other ways of dealing with this issue that you might suggest? Perhaps I could calculate a deviation score between t1 and t2, and use that to predict i1 and s2? As I mentioned in my previous post, I was considering a piecewise approach because there is considerable growth between t1 and t2, and more modest growth between t2-t4.
 Linda K. Muthen posted on Wednesday, March 10, 2010 - 9:46 am
If s1 is zero, the covariance between s1 and s2 is also zero.

See the Topic 3 course handout starting at Slide 106 where six ways to model non-linear growth are described. Maybe something there will help you.
 Dustin Pardini posted on Tuesday, April 13, 2010 - 9:07 am
Hello Muthens,

I would like to do a GMM identifying latent classes of individuals who have differential responses to treatment (e.g., responders, non-responders). I have intervention data collected at pre, post 6, 12, 24, 36 month follow-ups. When I initially modeled the data using a traditional growth curve approach, a quadratic growth did not fit the data well. Instead, I found that a two process model fit well with the first process consisting of change from pre-post, and the second process of linear change occuring after the intervention has been completed (see below).

Now that I am moving toward a GMM, I am not sure how to include both processes to define different latent classes across all assessment points. Is it possible to use both processes to define a latent trajectory classes.

i1 s1 | ext1@0 ext2@1;
s1@0;

i2 s2 | ext3@-3 ext4@-2 ext5@-1 ext6@0;
 Linda K. Muthen posted on Wednesday, April 14, 2010 - 7:56 am
A sequential process growth model can be used in GMM.
 Gregory Kirkner posted on Sunday, April 18, 2010 - 7:04 pm
I assume that "Piecewise Growth Modeling" is not an option when a dependent variable is measured at only three time points, correct?
 Linda K. Muthen posted on Sunday, April 18, 2010 - 8:26 pm
That is true.
 Jon Elhai posted on Thursday, May 19, 2011 - 6:04 pm
I'm not sure if piecewise growth modeling would be appropriate... But I have 4 timepoints in a growth model, each of which are equidistant (measured every 2 weeks). But for the scores over the four weeks, the slope looks unlike the slopes I usually see in the Mplus forum. In this example, the observed scores would take the shape of something like: 100 (time1), 50 (time2), 80 (time3), 65 (time4). Would a piecewise model be appropriate, or some transformation of the time scores?
 Linda K. Muthen posted on Friday, May 20, 2011 - 9:22 am
Four time points is not enough to identify a piecewise model. Perhaps the outcome is not suitable to a developmental model given the up and down nature of the data.
 Anne Chan  posted on Sunday, April 15, 2012 - 4:59 am
Hello!

I specified two models. The first model is just a basic linear one-slope model:

i s| Y75@0 Y76@1 Y77@2 Y79@4 Y82@7;

The second one is a piecewise (two-pieces) model, constraining the slope 1 and slope 2 to be the same:

i s1| Y75@0 Y76@1 Y77@2 Y79@2 Y82@2;
i s2| Y75@0 Y76@0 Y77@0 Y79@2 Y82@5;

[s1] (p1);
[s2] (p2);

MODEL CONSTRAINT:
p1 = p2;



May I ask if they are basically the SAME model? Thanks a lot!
 Linda K. Muthen posted on Sunday, April 15, 2012 - 5:05 pm
The two models are the same with respect to the means but not the variances and covariances.
 Marina Milyavskaya posted on Monday, May 21, 2012 - 12:09 pm
Hi,
I am trying to model data on students' well-being across the school year, and have 6 time points. What I am finding is that well-being decreases from September-December, then jumps back up in January, and decreases again throughout the second semester (January-April). My means are as follows:

4.764
4.421
4.378
5.058
4.659
4.386

I tried a piecewise model, with 3 pieces, one for each of the semesters, and then one for the change during the break (December-January), which I constrained to 0 as suggested above
i s1 | t1wb@0 t2wb@1 t3wb@2 t4wb@2 t5wb@2 t6wb@2;
i s2 | t1wb@0 t2wb@0 t3wb@0 t4wb@1 t5wb@1 t6wb@1;
s2@0;
i s3 | t1wb@0 t2wb@0 t3wb@0 t4wb@0 t5wb@1 t6wb@2;

Is this correct? The fit is not great...

thank you!
 Bengt O. Muthen posted on Monday, May 21, 2012 - 8:37 pm
How about having 2 intercepts so you easily capture the Xmas break jump:

i s1 | t1wb@0 t2wb@1 t3wb@2;
i2 s2 | t4wb@0 t5wb@1 t6wb@2;
 JMC posted on Wednesday, July 03, 2013 - 7:08 am
I am running into a similar problem as a post above. I have three time points (time 1-time 2 with traditional instruction and time 2-time 3 with an intervention). I wanted to compare the direction and rate of change for significance, but I don't think there are enough time points to do this. Is there any work around for this? I saw above a suggestion for setting up an intervention dummy variable, but I don't know how to set this up. Thank you.
 Bengt O. Muthen posted on Wednesday, July 03, 2013 - 3:05 pm
If the intervention happens between the second and third time points, you can have a dummy variable pointing to Y3.
 Kara Thompson posted on Thursday, September 05, 2013 - 9:15 am
Dear Drs. Muthen,

I am running multivariate piecewise growth models. I have been using a single intercept with 2 slopes, but someone has recommended I use 2 intercepts instead. Are there any advantages/disadvantages to using 2 intercepts rather than 1 intercept in a piecewise model?

Thanks
Kara
 Linda K. Muthen posted on Thursday, September 05, 2013 - 10:33 am
Using two intercepts is not really a piecewise model. With two intercepts, you have two sequential processes. Your theory should guide your decision.
 Anne Chan  posted on Wednesday, July 30, 2014 - 7:56 am
I have six waves of data. I specified

(1)a curvilinear model with one slope and one quadratic term across the six measurement points:

I S Q| Y1@0 Y2@1 Y3@2 Y4@3 Y5@4 Y6@5;

(2)a piecewise model which estimate the slope for the first three measurement points and the last three measurement points:

I S1| Y1@0 Y2@1 Y3@2 Y4@0 Y5@0 Y6@0;
I S2| Y1@0 Y2@0 Y3@0 Y4@1 Y5@2 Y6@3;


May I ask if these two models are nested? If they are not, how can I test if one of them significantly fit the data better?

Thanks!
 Bengt O. Muthen posted on Wednesday, July 30, 2014 - 4:08 pm
If you instead write the piecewise model as

I S1| Y1@0 Y2@1 Y3@2 Y4@2 Y5@2 Y6@2;
I S2| Y1@0 Y2@0 Y3@0 Y4@1 Y5@2 Y6@3;

you obtain the first model as a special case where the mean and variance of s1 are the same as for s2, but the covariance for s1 and s2 would need to lead to correlation 1 which is on the border of the admissible parameter space. So I don't think nested chi-square testing works. Use BIC instead to compare and absolute fit (for each model) to decide which one is good enough.
 Anne Chan  posted on Saturday, August 09, 2014 - 4:38 am
Hello! Thanks for your reply. May I ask what is "absolute fit" for each model? Are there any indices on absolute fit showing on the output files?

Thanks a lot!
 Bengt O. Muthen posted on Saturday, August 09, 2014 - 12:04 pm
By absolute fit I mean the fit of your H0 model compared to the unrestricted H1 model, that is, the usual chi-square/RMSEA/CFI testing - as opposed to relative fit measured by BIC where you compare two different H0 models.
 Anne Chan  posted on Monday, August 18, 2014 - 7:29 am
Hello! May I ask if the following two models are nested or not:

A basic LGC model:
I S| Y1@0 Y2@1 Y3@2 Y4@3 Y5@4 Y6@5;

A piecewise model:
I S1| Y1@0 Y2@1 Y3@2 Y4@2 Y5@2 Y6@2;
I S2| Y1@0 Y2@0 Y3@0 Y4@1 Y5@2 Y6@3;

Thanks a lot!
 Bengt O. Muthen posted on Monday, August 18, 2014 - 11:43 am
You can try this out yourself by using the two-piece model with the further constraints:

[s1] = [s2]

s1 = s2

s1 with i = s2 with i

If that gives the same loglikelihood as the single-piece model, the single-piece model is nested within the two-piece model
 Heather Rickels posted on Wednesday, December 10, 2014 - 9:31 am
Is it possible to specify a model with two different intercepts and the same slope (so parallel growth trajectories)?

I'm not sure how to change the syntax, but I have a score change between SC9 and SC10.


This is my current model:

Intcpt Slope | SC7@0 SC8@1 SC9@2 SC10@3 SC11@4;
Intcpt Slope ON M6 GENDER;
[Intcpt Slope];





This is my other model for 2 slopes:

Intcpt Slope1 | SC7@0 SC8@1 SC9@2 SC10@2 SC11@2;
Slope2 BY SC7@0 SC8@0 SC9@0 SC10@1 SC11@2;
Intcpt Slope1 ON M6 GENDER;
[Intcpt Slope1 Slope2];
Slope2@0;
slope2 with slope1@0;
slope2 with Intcpt@0;


Thank you for any help you can provide!
 Bengt O. Muthen posted on Wednesday, December 10, 2014 - 2:58 pm
How about

int1 slope | sc7@0 sc8@1 sch9@2;
int2 slope | sc10@0 sc11@1;
 Heather Rickels posted on Wednesday, December 10, 2014 - 9:24 pm
Thank you so much for your help!

When I used your suggested code, I received an error message that the growth process was previously defined.

However, the following code seems to be working--do you think it looks ok?

Intcpt1 Slope | sc7@0 sc8@1 sc9@2 sc10@3 sc11@4;
Intcpt2 | sc10@0 sc11@1;
Intcpt1 Intcpt2 Slope ON M6 GENDER;

[Intcpt1 Intcpt2 slope];
Intcpt2@0;
Intcpt2 with Intcpt1@0;
Intcpt2 with slope@0;
 Jon Heron posted on Thursday, December 11, 2014 - 4:57 am
So you want consistent linear change with a vertical jump midway through the process? that's a little unusual. If you're happy for everyone to have the same vertical jump and you don't actually want to be able to predict it with covariates you could capture this through a non-zero but constrained equal intercept for the last two measures.

Excuse the awkward double use of intercept there.

Intcpt Slope | sc7@0 sc8@1 sc9@2 sc10@3 sc11@4;
[sc10* sc11*] (fix);
 Bengt O. Muthen posted on Thursday, December 11, 2014 - 6:35 pm
Heather - I think your version looks ok. But do you really get identification problems unless you say intcpt2@0?

Our Topic 3 handout, slide 122 refers to your situation. That slide shows two slopes (one for each piece), but you could hold their means and variances equal. Your situation is a little harder because the second piece has just 2 time points.
 Varsha Gupta posted on Thursday, May 14, 2015 - 12:12 am
Hello Mplus Team,

I am trying to fit piecewise linear model to the trajectories and get the classes. I want the break point to be determined automatically from the fit rather than the user input as I have done below:
MODEL:%OVERALL%
i1 s1 | x1@0 x2@0.25 x3@0.5 x4@0.5 x5@0.5 x6@0.5 x7@0.5 x8@0.5 x9@0.5 ;
i2 s2 | x1@0 x2@0 x3@0 x4@0.25 x5@0.5 x6@0.75 x7@1 x8@1.5 x9@2.5 ;

How should I define my model so that the break point is also determined automatically?
 Bengt O. Muthen posted on Thursday, May 14, 2015 - 11:05 am
We don't offer change-point analysis yet, which is the common way to deal with this.
 fred posted on Wednesday, June 17, 2015 - 2:05 am
Hello,
I am fitting a piecewise model with two intercepts to a 6 timepoints (baseline, 4 months, 8 months, 12 months, 18 months, and 24 months) assessment wheere there is a steep decrease from the first to second assesment followed by an increase from T2 to T6. Here are the sample means:


T1= 60.662 T2=56.489 T3=68.144 T4=70.304 T5= 71.445 and T6= 71.472

This is my model

i1 s1| aQL2@0 bQL2@4;
s1@0;
i2 s2| cQL2@8 dQL2@12 eQL2@18 fQL2@24;

The model fit is excellent, but the estimated intercepts have means at s1 = 60.649 and i2 67.204.

I cannot make sense of why the second intercept is not corresponding to the second assement which would be lower than the first asessment.
The plot of sample and estimated means show excellent correspoendence.

Thanks in advance for gudiance
 Bengt O. Muthen posted on Wednesday, June 17, 2015 - 6:11 pm
This is because you have cQL2@8 instead of @0, which means that the s mean influences the outcome too.
 fred posted on Thursday, June 18, 2015 - 3:44 am
Thank you Bengt,

What I am missing is a way to model the slope from 4 months to 8 months (that is bQL2@4 to cQL2@8)

I am interpreting the current model as addressing base line to 4 months change, and then from 8 months to 24 months.

How can I go about for getting the 4 to 8 months slope included in the model?
 Bengt O. Muthen posted on Thursday, June 18, 2015 - 12:00 pm
I think you are asking for 3 pieces. So try something like this where the s1 and s2 pieces share the same intercept:

i1 s1| aQL2@0 bQL2@4 cQL2@4;
s1@0;
i1 s2| aQL2@0 bQL2@0 cQL2@4;
s2@0;
i2 s2| dQL2@0 eQL2@6 fQL2@12;
 Andrea Ted posted on Wednesday, August 19, 2015 - 10:58 am
Dear Drs,

I have 6 time points, the first 4 sequential, separated by the latter 2 by 48 hours. The treatment is introduced at time 2 and is effective until time 4.
I'd estimate a piecewise model with each piece having its own intercept.

tm1@0 tm2@1 tm3@2 tm4@3 tm5@3 tm6@3
tm1@0 tm2@0 tm3@0 tm4@0 tm5@0 tm6@1

I've read an older post here where you specify that for models with two intercepts, two separate but correlated processes should be specified, as:

tm1@0 tm2@1 tm3@2 tm4@3
tm5@0 tm6@1

Could you kindly detail on why the first model is not set up correctly?

For the second piece, would it be appropriate to fix both the slope and the intercept variance to 0?

For the first piece I specified linear growth. Would it be adequate to freely estimate timepoints 2 and 3 if this renders a better fit? Then, I also want to add a quadratic factor for the treatment group.

Thank you!
 Bengt O. Muthen posted on Wednesday, August 19, 2015 - 3:11 pm
In both setups you want to start the second piece with tm5@1, or else you don't have an increase from 4 to 5. So for the top you'd have

tm1@0 tm2@1 tm3@2 tm4@3 tm5@3 tm6@3
tm1@0 tm2@0 tm3@0 tm4@0 tm5@1 tm6@2

and for the bottom

tm1@0 tm2@1 tm3@2 tm4@3
tm4@0 tm5@1 tm6@2


But to answer your question, the top approach computes the mean of i2 over all 6 outcomes, while the bottom approach computes the mean over those 3 outcomes. So the definitions of the intercept are different.
 fred posted on Monday, October 05, 2015 - 12:53 am
Dear Bengt,
when you say "I think you are asking for 3 pieces. So try something like this where the s1 and s2 pieces share the same intercept:

i1 s1| aQL2@0 bQL2@4 cQL2@4;
s1@0;
i1 s2| aQL2@0 bQL2@0 cQL2@4;
s2@0;
i2 s2| dQL2@0 eQL2@6 fQL2@12;"
The last line should include s3 not s2, am I correct?

all the best
Fred
 Bengt O. Muthen posted on Monday, October 05, 2015 - 2:36 pm
right
 fred posted on Tuesday, October 06, 2015 - 1:32 am
Thank you Bengt!
Implementing the 3 slopes model gives a fairly good model fit (CFI=994), although with a Chi2 still being signficant (at p=0.019).
The slope S3 from cQl2 to dQl2 and onward is close to 0 and flat (mean for S3 is 0.097 and non-signficant). By allowing an error covariance between cQl2 and dQl2 the modell indices turn to excellent. Would you consider this modification reasonable when the slope is closie to zero?
 Bengt O. Muthen posted on Tuesday, October 06, 2015 - 5:54 pm
I can't say off-hand.
 fred posted on Thursday, February 11, 2016 - 3:51 am
Dear Bengt amd Linda,
Is there a way to save the individual values per subject for each slope in a piecewise model?
Thanks
Fred
 Linda K. Muthen posted on Thursday, February 11, 2016 - 9:53 am
You can use the FSCORES option of the SAVEDATA command to save factor scores for the growth factors.
 Jordan davis  posted on Friday, October 21, 2016 - 11:05 am
Hello!
I have a question regarding sequential parallel process modeling. I have run the three step process for an LCA with baseline data (4 classes). We would like to look at developmental differences (growth) within each of these classes. Our data are in accelerated longitudinal design - 14 years old to 24 years old

we would also like to look at developmental shifts in parallel growth processes within each class. We can, conceptually, look at growth during adolescence and then growth during young adulthood (starting at 19 years old).

Our question:
1) would we set our growth models up with two separate intercepts and
2) if so, what would the intercept and slope regressions look like within each class?

ibADO sbADO | b14@0 b15@1 b16@2...b19@5 b20@5...
ibYA sbYA | b14@0 b15@0 b16@0 b17@0 b18@0 b19@1 b20@2...
 Bengt O. Muthen posted on Friday, October 21, 2016 - 12:46 pm
To use separate intercepts, try

ibADO sbADO | b14@0 b15@1 b16@2...b19@5
ibYA sbYA | b18@0 b19@1 b20@2...
 Jordan davis  posted on Friday, October 21, 2016 - 2:10 pm
ah - so the second intercept and slope start with the "cut-off"

since we plan to have parallel processes within each Latent class

ibADO sbADO | b14@0 b15@1 b16@2...b19@5
ibYA sbYA | b18@0 b19@1 b20@2...

icADO scADO | c14@0 c15@1 c16@2...c19@5
icYA scYA | c18@0 c19@1 c20@2...

does this coding scheme allow us to regress the slope of one construct in adolescence(sbADO) onto the intercept of the other construct in young adulthood (icYA)? etc...

much appreciated
Jordan
 Bengt O. Muthen posted on Friday, October 21, 2016 - 4:07 pm
There are a lot of possibilities here. First, I think you mean regress icYA on sbADO and not the other way around (so sbADO predicts icYA). I think you worry about the time overlap at 18 and 19 - so why have that overlap? Also, you can also let the intercept defined at the end of the earlier process be the predictor of the later process.
 Jordan davis  posted on Saturday, October 22, 2016 - 9:45 am
Thanks Dr. Muthen,

You are right, I did mean to say "icYA on sBADO"
I'm not quite sure what you mean by the "overlap" do you mean we should start the second slope for young adulthood at 19 and not have overlap? that is:

ibADO sbADO | b14@0 b15@1 b16@2 b17@3 b18@4 b19@5 b20@5 b21@5 b22@5 b23@5 b24@5;

ibYA sbYA | b19@0 b20@1 b21@2 b22@3 b23@4
b24@5;

in your last sentence do you mean in the parallel process model we should also let the adolescent intercept (ibADO) predict the adolescent slope (sbADO) ? if that is the case , you are right we are facing numerous possibilities - especially across 4 latent classes
 Jordan davis  posted on Monday, October 24, 2016 - 6:49 am
it may be a moot point. When estimating simple growth within each class I get the following:
THE ESTIMATED COVARIANCE MATRIX FOR THE Y VARIABLES IN CLASS 3 COULD NOT BE INVERTED. PROBLEM INVOLVING VARIABLE BINGE1. COMPUTATION COULD NOT BE COMPLETED IN ITERATION 11. CHANGE YOUR MODEL AND/OR STARTING VALUES. THIS MAY BE DUE TO A ZERO ESTIMATED VARIANCE, THAT IS, NO WITHIN-CLASS
VARIATION FOR THE VARIABLE.

CLASSES = C1(3);


ANALYSIS:
TYPE = Mixture;
STARTS = 0;


MODEL:

%OVERALL%

I S | BINGE1@0 BINGE2@1 BINGE3@2 BINGE4@3 BINGE5@4 BINGE6@5 BINGE7@6;


%C1#1%
[CL#1@1.588];
[CL#2@-1.358];

I(I1);
S(S1);

%C1#2%
[CL#1@-0.801];
[CL#2@0.476];

I(I2);
S(S2);

%C1#3%
[CL#1@-1.783];
[CL#2@-1.893];

I(I3);
S(S3);
 Bengt O. Muthen posted on Monday, October 24, 2016 - 2:46 pm
I meant

ibADO sbADO | b14@0 b15@1 b16@2 b17@3 b18@4;

ibYA sbYA | b19@0 b20@1 b21@2 b22@3 b23@4
b24@5;

You may want to simplify the model and hold the residual variances equal across time and also not request the the i, s variances differ across classes.
 Jordan davis  posted on Wednesday, October 26, 2016 - 7:56 am
That did it! you are a huge help Dr. Muthen - can't thank you enough
 matthew finster posted on Friday, February 24, 2017 - 1:21 pm
Hello,

I am trying to replicate the model in slide 121 of topic 3 using the following:

Model: i s | MAP1@0 MAP2@1 MAP3@2 MAP4@3 MAP5@4 MAP6@5 MAP7@5 MAP8@5 MAP9@5;
i2 s2 | MAP1@0 MAP2@0 MAP3@0 MAP4@0 MAP5@0 MAP6@0 MAP7@0 MAP8@1 MAP9@2;

MAP1-MAP8 PWITH MAP2-MAP9;

But I receive the following error:
THE STANDARD ERRORS OF THE MODEL PARAMETER ESTIMATES COULD NOT BE
COMPUTED. THE MODEL MAY NOT BE IDENTIFIED. CHECK YOUR MODEL.
PROBLEM INVOLVING THE FOLLOWING PARAMETER:
Parameter 20, [ I2 ]

THE CONDITION NUMBER IS 0.171D-17.

Any suggestions? Thank you.
 Linda K. Muthen posted on Friday, February 24, 2017 - 4:10 pm
Please send the output and your license number to support@statmodel.com.
 Jeff Labban posted on Thursday, March 23, 2017 - 7:44 am
Hello - I am trying to fit a 2-piece growth model with 5 time points, knoted at the 3rd point. The difficulty is that the time between assessments changes from an order of hours to weeks:
baseline, 24hrs, 72hrs (knot), 2wks, 12wks.
I would really appreciate some guidance on how to handle this change in scale. Thanks in advance!
 Onsen Juiko posted on Tuesday, August 08, 2017 - 6:00 pm
I have a piecewise growth model that consists of an intercept factor, the first slope factor with two time points (T1 & T2) and the second slope factor with four time points (T2-T5).

To identify the model, instead of fixing the variance of the first slope factor at 0, would it be possible to constrain to be equal the residual variance of the observed scores from T1 to T5?

Thanks
 Bengt O. Muthen posted on Wednesday, August 09, 2017 - 3:51 pm
I don't think holding residual variances equal helps identification in this case - try it. The issue has to do with covariances among variables rather than variances.
 Patrick Gaudreau posted on Tuesday, October 24, 2017 - 5:11 pm
I am testing two piecewise models with a distal categorical outcome.

In model 1, I want to estimate the effect of time 1 (as the intercept) on the distal outcome. Hence, I use the following coding:

I S1 | t1@0 t2@1 @t3@1;
I S2 | t1@0 t2@0 @t3@1;

Outcome ON s1;
s2@0;

In model 2, I want to estimate the effect of time 2 on the distal outcome. Hence, I use the following code.

I S1 | t1@-1 t2@0 @t3@0;
I S2 | t1@0 t2@0 @t3@1;

Outcome ON s1;
s2@0;

RESULT: The value of the intercept indeed changes across the two models. However, the effect of the intercept to predict the outcome is exactly the same in both models.

(a) How should I interpret this result? Does it represent the effect of average t1/t2 (or average t1/t2/t3) on the outcome?
(b) Any way of specifically obtaining the effect of a specific time point (as an intercept) on the distal outcome?

Many thanks,

Patrick Gaudreau
 Bengt O. Muthen posted on Tuesday, October 24, 2017 - 5:50 pm
Your ON statements show the effect of a slope on the outcome, not the effect of an intercept. In both cases, your s1 slope reflects the change from time 1 to time 2. Say Outcome ON I if you want to use the intercept. The intercept is defined where both pieces have zero time score. See also our article on our website under Papers:

Muthén, B. & Muthén, L. (2000). The development of heavy drinking and alcohol-related problems from ages 18 to 37 in a U.S. national sample. Journal of Studies on Alcohol, 61, 290-300.
download paper contact first author show abstract
 Patrick Gaudreau posted on Tuesday, October 24, 2017 - 6:01 pm
Thanks for your rapid respond.

-1-
I made a mistake. Sorry about that. I really meant to say:

Outcome ON I;

-2-
I know the intercept is where both pieces have zero time score. However, for some reasons, we get the same effect of the intercept on the outcome across the two models.

Patrick
 Bengt O. Muthen posted on Wednesday, October 25, 2017 - 10:50 am
Send the 2 outputs - plus data - to Support along with your license number so we can see what's going on.
 Pawel Grygiel posted on Thursday, March 15, 2018 - 2:08 am
I am interested piecewise growth model (3 time points; 2 piece):

i s1 | t1@0 t2@1 t3@1;
i s2 | t1@0 2@0 t3@1;

where
s1 – change between t1 and t2;
s2 – change between t2 and t3.

With MLR estimator this model is not identified (until s1@0 s2@0), but with bayes this model estimated without any problems.

My quation:
why there are differences between two estimators (MLR and Bayes)?

Best,

Pawel
 Bengt O. Muthen posted on Thursday, March 15, 2018 - 4:49 pm
The Bayes prior of positive variances may help - but I would not rely on it. The model isn't identified.
 You-kyung Lee posted on Tuesday, April 24, 2018 - 2:12 pm
I am comparing three different spline models.

Model 1 (knot = Y2):
s1 BY Y1@0 Y2@1 Y3@1 Y4@1 Y5@1;
s2 BY Y1@0 Y2@0 Y3@1 Y4@2 Y5@3;

Model 2 (knot = Y4):
s1 BY Y1@0 Y2@1 Y3@2 Y4@3 Y5@3;
s2 BY Y1@0 Y2@0 Y3@0 Y4@0 Y5@1;

Model 3 (two knot points = Y2 & Y4):
s1 BY Y1@0 Y2@1 Y3@1 Y4@1 Y5@1;
s2 BY Y1@0 Y2@0 Y3@1 Y4@2 Y5@2;
s3 BY Y1@0 Y2@0 Y3@0 Y4@0 Y5@1;

Are Model 1&2 nested within Model 3 (chi-square or CFI difference tests for model comparisons), or not (AIC/BIC comparisons)?
 Tihomir Asparouhov posted on Tuesday, April 24, 2018 - 10:39 pm
Model 1&2 are nested within Model 3, but beware that chi-square testing is a bit questionable because the null hypothesis involves fixing parameters at the border of admissible space ... so use also BIC.

https://www.tandfonline.com/doi/abs/10.1080/10705510701301891?src=recsys&journalCode=hsem20
 Nicole Watkins posted on Wednesday, June 12, 2019 - 1:23 pm
I am running a piece-wise model and I have a question about how the slopes should be labeled after I change the intercept.

1st model:

i s1| a1415@0 a1617@1 a1819@2 a2021@2 a2223@2 a2425@2;
i s2| a1415@0 a1617@0 a1819@0 a2021@1 a2223@2 a2425@3;

But I wanted to change the intercept from a1415 to a2021, so I did:

i s1| a1415@-3 a1617@-2 a1819@-1 a2021@0 a2223@0 a2425@0;
i s2| a1415@0 a1617@0 a1819@0 a2021@0 a2223@1 a2425@2;


I assumed that the estimates of the means for s1 and s2 would not change because they should still be the same slope. However, in the first model, my estimates for the S1 mean was non-sig in the first model, but sig in the second. Did I do something wrong or am I not understanding something? Thanks
 Bengt O. Muthen posted on Wednesday, June 12, 2019 - 4:11 pm
I think you want the time scores

a2021@1 a2223@2 a2425@3;

also when you change the intercept.
 Nicole Watkins posted on Friday, June 14, 2019 - 1:04 pm
Dr. Muthen,
To clarify, would the syntax you provided be for s2?

With that understanding, I ran this model:

i s1| a1415@-3 a1617@-2 a1819@-1 a2021@0 a2223@0 a2425@0;
i s2| a1415@0 a1617@0 a1819@0 a2021@1 a2223@2 a2425@3;

For some reason, the parameter estimates for the slopes and slope variances were not exactly the same as when the intercept was at 14/15. I would expect them to be the same (with the exception of a sign change for s1). Am I incorrect?

Thanks.
 Bengt O. Muthen posted on Saturday, June 15, 2019 - 11:40 am
In your original model you have

i s1| a1415@0 a1617@1 a1819@2 a2021@2 a2223@2 a2425@2;
i s2| a1415@0 a1617@0 a1819@0 a2021@1 a2223@2 a2425@3;

When you changed the intercept and said

i s1| a1415@-3 a1617@-2 a1819@-1 a2021@0 a2223@0 a2425@0;

you changed the meaning of the i s1 part of the model in the sense that your original model had no increase from a1819 to a2021 (the time scores are 2 for both) but the changed intercept model does by saying a1819@-1 a2021@0. So perhaps you want to have the zero time score for a1819 instead. Then worry about the i s2 part.
 Nicole Watkins posted on Saturday, June 15, 2019 - 12:08 pm
Thank you, Dr. Muthen.
I would like to have my intercept be at 20/21, and that is also where I see the change in linear slope in my data. So I would also like s1 to go from 14/15-20/21, and s2 go from 20/21-24/25.

Would the first one be:
i s1| a1415@0 a1617@1 a1819@2 a2021@3 a2223@3 a2425@3;
i s2| a1415@0 a1617@0 a1819@0 a2021@1 a2223@2 a2425@3;

And when I move the intercept to 2021 would it be:

i s1| a1415@-3 a1617@-2 a1819@-1 a2021@0 a2223@0 a2425@0;
i s2| a1415@0 a1617@0 a1819@0 a2021@0 a2223@1 a2425@2;

Thank you very much for your help and clarification.

Nicole
 Bengt O. Muthen posted on Sunday, June 16, 2019 - 12:45 pm
In your statement:

i s1| a1415@0 a1617@1 a1819@2 a2021@3 a2223@3 a2425@3;
i s2| a1415@0 a1617@0 a1819@0 a2021@1 a2223@2 a2425@3;

both the s1 and the s2 parts say that there is change between 1819 and 2021 (time scores increase). You don't want that confounding of s1 and s2. If your s1 part is what you want then the s2 part should say:

i s2| a1415@0 a1617@0 a1819@0 a2021@0 a2223@1 a2425@2;

which means that s2 refers to change from 2021 to 2223 etc.
 Richard E. Zinbarg posted on Monday, September 28, 2020 - 9:06 am
What syntax would one use to test whether the slopes differ significantly from each other of the two pieces in a two piece model such as that in Example 6.11 in the User's Guide? Many thanks in advance!
 Richard E. Zinbarg posted on Monday, September 28, 2020 - 9:21 am
and let me also pose a follow-up question to my previous one. I suppose the average slope of the two pieces might not differ but their variances might. So, I would also like to know how to test whether their variances differ. Thanks!
 Bengt O. Muthen posted on Monday, September 28, 2020 - 5:51 pm
You can express those difference in Model Constraint which will give you a regular Z-test of the difference.
 Richard E. Zinbarg posted on Tuesday, September 29, 2020 - 9:30 am
Many thanks for the speedy reply Bengt. I'm not sure though what how to refer to the mean slope and to the variance of the slope in the Model Constraint statement. Would you be willing to articulate what that statement would look like in example 6.11 to test for the differences in slopes and variances of the two pieces?
 Bengt O. Muthen posted on Tuesday, September 29, 2020 - 4:56 pm
In the Model command you use parameter labels such as for the two slope means:

[s1] (p1);
[s2] (p2);

And then in Model Constraint, you say

new(diff);
diff = p2-p1;
 Richard E. Zinbarg posted on Wednesday, September 30, 2020 - 1:38 pm
many, many thanks Bengt!
Back to top
Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: