[R-sig-ME] longitudinal with 2 time points

Jarrod Hadfield j.hadfield at ed.ac.uk
Thu Aug 12 10:49:11 CEST 2010


Hi John,

If there are only two time points per subject I think model 2 should  
throw an error because the residual variance and (time|Subject)  
(co)variances cannot be uniquely estimated. You can get around this  
problem  by moving the (time|Subject) term into the residual term and  
dropping it from the random terms using MCMCglmm or ASReml:

MCMCglmm(y ~ treatment + gender + age + time, rcov=~  
us(as.factor(time)):subject,  ...

This route was also suggested by Ben Bolker and John Maindonald for  
coping with negative variances.


However, when I try:

set.seed(1)
subject<-gl(50,2)
time<-gl(2,1,100)
y<-rnorm(100)
summary(lmer(y~time+(time|subject)))

I get estimates of all terms and so may be they can be uniquely  
estimated (although it would surprise me a lot)?

Jarrod





On 12 Aug 2010, at 06:33, array chip wrote:

> Thank you Ted for pointing this out. See my response to John's  
> reply. What would
> you think of the model 5 where I used ANCOVA on the difference  
> between week 5 &
> baseline and also included baseline as a covariate?
>
> Thanks
>
> John
>
>
>
> ----- Original Message ----
> From: Charles E. (Ted) Wright <cewright at uci.edu>
> To: John Maindonald <john.maindonald at anu.edu.au>
> Cc: array chip <arrayprofile at yahoo.com>; r-sig-mixed-models at r-project.org
> Sent: Wed, August 11, 2010 5:34:21 AM
> Subject: Re: [R-sig-ME] longitudinal with 2 time points
>
> Keep in mind that running an ANOVA on the difference is not the same  
> thing
> as using the baseline data as a covariate in an ANOVA on the Week 4  
> data.
> Essentially the ANOVA on the differences is like the ANCOVA with the  
> slope
> constrained to be 1.
>
> Ted Wright
>
> On Wed, 11 Aug 2010, John Maindonald wrote:
>
>> All these are possibilities, except maybe making baseline measurement
>> a random factor.  This would make sense only if data divide into  
>> groups,
>> and you want the baseline effect to vary randomly from group to  
>> group.
>> That may limit your ability to estimate parameters that are of  
>> interest.
>> In most circumstances that I am familiar with, it makes better  
>> sense to
>> treat baseline effect as fixed.
>>
>> John.
>>
>> John Maindonald            email: john.maindonald at anu.edu.au
>> phone : +61 2 (6125)3473    fax  : +61 2(6125)5549
>> Centre for Mathematics & Its Applications, Room 1194,
>> John Dedman Mathematical Sciences Building (Building 27)
>> Australian National University, Canberra ACT 0200.
>> http://www.maths.anu.edu.au/~johnm
>>
>> On 11/08/2010, at 8:11 AM, array chip wrote:
>>
>>> Hi, I am wondering if it is still meaningful to run a mixed model  
>>> if a
>>> longitudinal dataset has only 2 time points (baseline and week 4)?  
>>> Would it
> be
>>> more appropriate to simply take the difference between the 2 time  
>>> points and
>>> run
>>> ANOVA (ANCOVA) on the difference? what about still running mixed  
>>> model on the
>>> difference of the 2 time points, but adding baseline measurement  
>>> as a random
>>> factor?
>>>
>>> Thanks for sharing your thoughts.
>>>
>>> John
>>>
>>> _______________________________________________
>>> R-sig-mixed-models at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>
>>
>
>
>
>
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>


-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.




More information about the R-sig-mixed-models mailing list