[R] grouping for lme with nested repeated measurements

Lorenz.Gygax@fat.admin.ch Lorenz.Gygax at fat.admin.ch
Mon Oct 25 08:11:21 CEST 2004

> 1.The simple problem ist that i have different Samples , from 
> which i make repeated measurements (each sample is measured 6 
> times) and i repeat this experiment over several Days, so i 
> get the lme grouping term "random=~1|Days/Sample".

I would rather specify this as: random= ~ 1 | Sample/Days, but I
am not quite sure how this affects the model.

> 2. Now i am measuring with 2 different measuring Apparatus 
> the same Sample each 6 times, to see how big the difference 
> from the appratus is. 
> Because Apparatus is on the level of repeated measurements i 
> cant write Days/Sample/Apparatus. the lme function offers a 
> list() feature to design the grouping, but i didnt understand 
> this, if it is the solution to the problem.

Why would you want to include the Apparatus in the random effect?
I assume that you are interested in differences and thus, this
is a fixed effect:

lme (fixed= response ~ apparatus, data= XX, random= ~ 1 | Sample/Days)

Lorenz Gygax,  lorenz.gygax at fat.admin.ch      
Centre for proper housing of ruminants and pigs
Swiss Federal Veterinary Office

More information about the R-help mailing list