# RE: st: Thinking through best way to do a longitudinal analysis

 From "Kieran McCaul" To Subject RE: st: Thinking through best way to do a longitudinal analysis Date Mon, 17 Aug 2009 06:48:11 +0800

```Hi Chelsea,

I analysed some data a while ago which was collected from a large number of people (identified by the variable id) who had their aortic diameters (a_size) measured repeatedly over a number of time (years).  The aim of the analysis was to examine the change in aortic diameter over time.

I used GLMM for the final models, but initially one descriptive analysis that I ran simply calculated the slope and intercept of a regression fitted to each person in the data.  I scatter plotted these.

statsby inter=_b[_cons] slope=_b[years], by(id) clear: reg  a_size years
twoway scatter slope inter, msize(small)

Kieran

______________________________________________
Kieran McCaul MPH PhD
WA Centre for Health & Ageing (M573)
University of Western Australia
Level 6, Ainslie House
48 Murray St
Perth 6000
Phone: (08) 9224-2701
Fax: (08) 9224 8009
email: Kieran.McCaul@uwa.edu.au
http://myprofile.cos.com/mccaul
http://www.researcherid.com/rid/B-8751-2008
______________________________________________
If you live to be one hundred, you've got it made.
Very few people die past that age - George Burns

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Polis, Chelsea B.
Sent: Monday, 17 August 2009 4:23 AM
To: statalist@hsphsun2.harvard.edu
Subject: RE: st: Thinking through best way to do a longitudinal analysis

Thanks so much to both of you for the suggestions and all of these great references!  I will download all of these articles and read them.  In the meantime, do you think calculating individual slopes is a bad idea?  If not, do you know how I might go about doing this in STATA?

Thank you!
Chelsea

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Cameron McIntosh
Sent: Friday, August 14, 2009 10:36 PM
To: STATA LIST
Subject: RE: st: Thinking through best way to do a longitudinal analysis

Chelsea,

I'll try and point you in what I think might be a good direction. You may want to read up on growth mixture modeling:

Wang, M., & Bodner, T.E. (2007). Growth Mixture Modeling: Identifying and Predicting Unobserved Subpopulations With Longitudinal Data. Organizational Research Methods, 10(4), 635-656.

Dolan, C.V., Schmittmann, V.D., Lubke, G.H. & Neale, M.C. (2005). Regime switching in the latent growth curve mixture model. Structural Equation Modeling, 12, 94-119
http://users.fmg.uva.nl/cdolan/semmix.pdf

Muthén, B.O. (2004). Latent variable analysis: Growth mixture modeling and related techniques for longitudinal data. In D.Kaplan (Ed.), Handbook of quantitative methodology for the social sciences (pp. 345-368). Newbury Park, CA: Sage.

In this case you "know" your "latent classes" (hormonal contraception or not), but that's no problem. The varying assessment times and missing data could be a bit tricky but there is some literature out there:

Blozis, S.A., & Cho, Y.I. (2008). Coding and centering of time in latent curve models in the presence of interindividual time heterogeneity. Structural Equation Modeling, 15(3), 413-433.

Biesanz. J.C., Deeb-Sossa, N., Papadakis, A.A., Bollen, K.A., Curran, P..J. (2004). The role of coding time in estimating and interpreting growth curve models. Psychological Methods, 9(1), 30-52.

Duncan, S.C., & Duncan, T.E. (1994). Modeling incomplete longitudinal substance use data using latent variable growth curve methodology. Multivariate Behavioral Research, 29(4), 313-338.

-gllamm- might be able to do what you want (if not, Mplus for sure). Hope this is helpful,

Cam

----------------------------------------
> Date: Fri, 14 Aug 2009 13:27:15 -0700
> From: srmillis@yahoo.com
> Subject: Re: st: Thinking through best way to do a longitudinal analysis
> To: statalist@hsphsun2.harvard.edu
>
> Another option is to use a linear mixed model approach.
>
> Scott Millis
>
>
>
>
> --- On Fri, 8/14/09, Polis, Chelsea B.  wrote:
>
>> From: Polis, Chelsea B.
>> Subject: st: Thinking through best way to do a longitudinal analysis
>> To: "statalist@hsphsun2.harvard.edu"
>> Date: Friday, August 14, 2009, 2:38 PM
>> I am trying to do an analysis on the
>> CD4 decline trajectory of 190 HIV+ women, comparing
>> those who were on hormonal contraception around the time of
>> HIV seroconversion against those
>> who weren't.  Each subject in my sample has at least
>> two (and as many as six) CD4 measurements,
>> the first and the last of which include a time span of at
>> least one year.  I created a
>> variable to anchor the CD4 measurements in time by
>> generating a variable that indicates how
>> many days since HIV seroconversion the CD4 measurement was
>> taken.  The data are not balanced
>> (since women have anywhere between 2 to 6 measurements) and
>> CD4 counts were not measured for
>> each individual at the same point in time after
>> seroconversion (for example, the first measurement
>> available for each woman ranges in days since
>> seroconversion from 69 to 1919).
>>
>> individual slope for each subject and
>> compare the slopes between contraceptive users and
>> non-users using a t-test.  Is there a command
>> to obtain those kind of individual regression slopes for
>> each woman, and would my data have to be
>> in long or wide format?
>>
>> better to construct a longitudinal marginal
>> model with generalized estimating equations, and if so, can
>> someone point me in the direction of
>> a text that might help me figure out how to do that with
>> what I think is probably an unusual data
>> structure (many of the examples I have seen in coursework
>> use data measured at regular intervals)?
>>
>> Many thanks,
>> Chelsea
>>
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/statalist/faq
>> *   http://www.ats.ucla.edu/stat/stata/
>>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/

_________________________________________________________________
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```