[R] Specifying an lme model

Ross Darnell r.darnell at uq.edu.au
Wed Jul 16 00:19:38 CEST 2003

Thanks for the help.

Sorry but now comes the second question. What we have now assumes
equal within-subject variances. How can I fit separate (pooled)
within-subject variances for each group (similar to an unequal
variance t-test) and test if this is better than the existing constant
within-subject variance.

Many thanks

Douglas Bates <bates at stat.wisc.edu> writes:

> Ross Darnell <r.darnell at uq.edu.au> writes:
>> I would like some advice on how if possible, to test the following
>>  I have subjects each measured several times. The subjects are sampled
>>  from 3 subpopulations (groups). The question is "Is the 
>>  between-subject variance the same for the three groups?"
>> The "null" model is 
>> lme0 <- lme(y~group,random=~1|subject)
>> I did think that the model that defined a specific between-subject
>> variance for each group was
>> update(lme0,.~., weights=varIdent(form=~1|group))
>> but I am not sure.
> I think you have it right.  You should then compare the two fitted
> models using the anova generic, which will provide a likelihood ratio
> test statistic and a p-value based on a chi-squared reference
> distribution.  Regard the p-value as an approximation.

Ross Darnell
School of Health and Rehabilitation Sciences
University of Queensland, Brisbane QLD 4067 AUSTRALIA
Email: <r.darnell at uq.edu.au>
Phone +61 7 3365 6087

More information about the R-help mailing list