Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: Mixed model for longitudinal data: Time discrete or continuous?


From   Abdelouahid Tajar <[email protected]>
To   statalist <[email protected]>
Subject   RE: st: Mixed model for longitudinal data: Time discrete or continuous?
Date   Mon, 4 Jun 2012 16:45:04 +0100


Thanks David,
 
I agree with you. Using time a continuous makes the assumption that the relation between time and the outcome is linear, in my case while the obeerved data shows that it is  the case. 
 
I have fitted models with time both as continuous and as discrete variable and I have calculated the predicted probabilities. The model with time as discrete gives  better predicted probabilities in the sense that the observed and the predicted probabilities were  close to each other at each time point. While the model with time as continuous does not predcit the probabilities as well as the model with time as discrete does.
 
I have also calculated the ORs at each time point using lincom (note that the OR at each time point needs to be interpreted with caution because one needs to take into account the random
 effect when interpreting the OR between groups) . The ORs from lincom give wide CIs (this is my only concern when fitting a model with time as discrete), this may be due to my small sample size: 39 subjects for 11 parameters in the discrete case.
I think for large dataset (not sure how large it should be) and small number time points (again not sure how many), using time as discrete can be a raisonable choice if the the relation between the outcome and time is not linear.
 
The addition of time square term and its interaction with group did not perform well. 
 
BW,
Abdelouahid
----------------------------------------
> Date: Mon, 4 Jun 2012 10:41:49 -0400
> Subject: Re: st: Mixed model for longitudinal data: Time discrete or continuous?
> From: [email protected]
> To: [email protected]
>
> Hi, Abdelouahid.
>
> Using time as a continuous variable assumes that the contribution of
> time (adjusting for the contribution of group) is linear.
>
> If you fit the model in which time is categorical, you can then
> examine the relation between the coefficients for the four categories
> (taking 0 as the coefficient for time = 0) and assess whether the
> pattern is linear. Similarly for the coefficients for the interaction
> between group and time.
>
> If the pattern is not linear, adding a quadratic term should not be an
> automatic choice. That is only one pattern of nonlinearity, and it
> may not be suitable (or even a reasonable approximation) in your data.
>
> A more-formal approach would ask how much better the categorical-time
> model fits than the linear-time model.
>
> David Hoaglin
>
> On Fri, Jun 1, 2012 at 5:52 AM, Abdelouahid Tajar <[email protected]> wrote:
> > Hi,
> >
> >
> >
> > For mixed models (using xtmixed, xtlogit ect...) with
> > longitudinal data in the standard situation with two covariates: time (0,1,2,3)
> > (as an example) and a binary variable (0,1) for group.
> >
> > People often use time as a CONTINUOUS variable.
> >
> >
> >
> > In models which include an interaction term between time and group (which often
> > is the case) we have three fixed effect parameters b1=time, b2=group and
> > b3=interaction_time_group.
> >
> >
> >
> > Now if time is treated as DISRETE
> > with time (0,1,2,3) we have 7 parameters: 1 for group, 3 for the 3
> > dummies of time and the 3 for interaction terms between time and group.
> >
> >
> >
> > Compared to the model with discrete time, the model with time as continuous
> > (which could also have a time^2 term) has clearly fewer parameters even when
> > time^2 is included.
> >
> >
> >
> > My question is how to choose between the two models? The continuous time model and
> > discrete time model?
>
> *
> * 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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index