Message/Author 


I'm running GMM for a symptom variable for six assessments. First is immediately following treatment, 2nd is at an expected high point for maximum symptoms, 3rd is after symptoms are reduced, and just prior to next treatment. The second set of three assessments repeats this pattern. I think a piecewise model will fit this data best with two quadratic curves like ^ ^ . I confirmed this pattern fit the data best with a pw latent growth model using isq (compared to simple linear, LQ, & LQC), and have gotten GMM solutions with the pw model. I have individually varying times of assessement available. Is it possible to estimate a piecewise model like this also using IVT of assessment for LG and GMM models? Thanks! Bruce 


The AT option is available for GMM models. 


Thanks, Linda! I know how to do that, but I'm puzzled about how to set up a piecewise model to identify two series, while also using the AT command for the varying times. Right now, my code for a pw latent growth model without the AT command is: i s1 q1  y0@0 y1@1 y2@2 y3@2 y4@2 y5@2 ; i s2 q2  y0@0 y1@0 y2@0 y3@1 y4@2 y5@3 ; Do I still just add the AT t1t6 at the end of each line? (I tried it and it didn't work, so if that's the correct procedure I'm doing something wrong.) Thanks, Bruce 


See Example 6.12 which uses the AT option. See the TSCORES option and the data set which shows how the TSCORE variables are scored. To use AT with a piecewise model, you would have to generalize the time scores from the piecewise model to the TSCORE variables. 

Jon Heron posted on Monday, March 17, 2014  8:06 am



Hi Bruce I banged my head against this for ages and finally found a solution. This was for LGM but I expect it extends to GMM readily enough. There's a trick to it. Here's my post: http://www.statmodel.com/discussion/messages/14/478.html?1332152261 (scroll down to March 19th 2012) cheers, Jon 


Thanks Linda & Jon  This is terrific solution, Jon  Thanks! Best, Bruce 


Hi Linda & Jon  If I may take advantage of your suggestion, Jon ... I tried the model with the improved syntax you provided, and it worked (!) but the model did not fit as well conceptually as the regular pw model with "averaged" assessment times. :( Oh, well. But, what do you think about using a factor approach to allow the program to provide the means across time? I tried: MODEL: i BY rg0rg5@1 ; s BY rg0@0 rg1@1 rg2* rg3* rg4* rg5* ; rg0rg4 PWITH rg1rg5 ; [ rg0rg5@0 ] ; [ i s ] ; s@0 ; i WITH s@0 ; and the pattern of means for S BY ... was just what I expected for these symptoms, with a piecewiselike ^^ pattern with 2 quadratic frowns! Any thoughts would be great! Thanks, Bruce 

Jon Heron posted on Wednesday, March 19, 2014  2:05 am



Hi Bruce not sure what I feel about a freecurve approach. Have you read this? http://www.ncbi.nlm.nih.gov/pubmed/23880389 Can you obtain your frownmodel by fitting a highorder polynomial? I'm also wondering whether you might benefit from splitting your data into more time points  I recently managed to fit a 4 time point "ATmodel" as a 50 time point model with no age variability. There you have a simple way of building in some of the additional information on actual age. 

Back to top 