[R] Specifying an lme model

Douglas Bates bates at stat.wisc.edu
Tue Jul 15 17:12:54 CEST 2003

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.

More information about the R-help mailing list