[R] Habituation model : several sequences in several sessions, should I use getGroups?

Laurent Fanchon lfanchon at vet-alfort.fr
Wed Apr 20 17:20:36 CEST 2005


Dear all,

I am looking at habituation of dogs trotting on a treadmill.
Each record is made of 40 to 50 data for the same variable (for example 
Peak).
I get each record at several minutes (1, 2 and 4) for each session. And 
I have 4 sessions of training (one session a week).

The aim is to study the effect of the factor (Minute) on the Peak 
variable, and to study the changes of this effect regarding to the session.
I am really new to R and stats but I am learning...
I don't have any R-guru around me so maybe I am really doing it the 
wrong way...

As I measure the same dog several times, I am doing a repeated measures 
so I use the nlme package.
The minute factor is nested in the session factor so I use the function 
getGroups.
Here is my script :
treadmill$Time=getGroups (treadmill,form=~1|Session/Minute, level=2)
Habituation <- lme 
(fixed=Peak~Time,data=treadmill,random=~1|Dog/Session/Minute)

This seems to work as I get the random effects of Dog, Session in Dog, 
Minute in Session in Dog and the fixed effects of Peak~Time.
The problem is in the fixed effects section, instead of listing the 
different times,  it writes Intercept (Normal) but then Time.L, Time.Q, 
Time.C, Time^4, Time^5, Time^6, ..., Time^11.
My treadmill$Time list contains the following : 1/1, 1/2, 1/4, 2/1, 2/2, 
2/4,... corresponding to Session/Minute.
I expected it names the fixed effect according to this list.
So I wonder what this lines means?
Is it corresponding to the data of the treadmill$Time list?

Thank you very much for your help

Laurent




More information about the R-help mailing list