[R-sig-ME] Help with nested doubly repeated measures

Nicholas Lewin-Koh nikko at hailmail.net
Wed Sep 29 19:47:35 CEST 2010


Hi Folks,
I have an experiment with about 80 mice. Mice were randomized to
treatment and control arms. The experiment consisted of 3 balance beams,
Wide, Medium and Narrow. The mice were each given 3 trials on each
balance beam (no not in random order). So the beam should get
sequentially harder as it gets narrower. The responses were the latency,
the time to cross the beam and the number of footslips as they crossed
the beam. So I have beam nested in mouse and trial nested in beam. I
tried the following model:

lmer(latency.s.~ Treatment + BeamSize +
(1|ID./BeamSize/TrialNo),data=dat,na.action=na.omit)
Error: length(f1) == length(f2) is not TRUE
In addition: Warning messages:
1: In TrialNo:(BeamSize:ID.) :
  numerical expression has 827 elements: only the first used
2: In TrialNo:(BeamSize:ID.) :
  numerical expression has 827 elements: only the first use

But I am not sure that this is the "right" way to specify this model.
Ideally 
There are two questions. 1) Is the overall marginal latency lower in the
treated animals, and 2) is the Beam size Slope 
for treated animals shallower than for untreated animals. I have looked
at Park and Lee (2002) Statistics in Medicine 23:143-164, who give SAS
code for a similar model. However, I am not very good at translating SAS
to lme/lme4.

Once I have this figured out, is it possible to jointly model foot slips
and latency?

Thanks for any input.

Nicholas Lewin-Koh
Senior Statistical Scientist
Genentech




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