[R] How to specify the hierarchical structure of a split plot using lmer ??
Søren Højsgaard
Soren.Hojsgaard at agrsci.dk
Thu Apr 28 01:25:56 CEST 2005
I have a problem getting the lmer function of the lme4 package to use the
appropriate degrees of freedom for testing. Consider the Semiconductor data
from the SASmixed package:
library(SASmixed)
Semi.lme <- lme(resistance ~ ET * position, random=~1|Grp, data=Semiconductor)
anova(Semi.lme)
numDF denDF F-value p-value
(Intercept) 1 24 3237.261 <.0001
ET 3 8 1.942 0.2015
position 3 24 3.385 0.0345
ET:position 9 24 0.809 0.6125
Here, the ET effect is (correctly) tested on 8 denominator degrees of freedom.
In the example in the SASmixed package, the following code is presented:
(fm1Semi <- lmer(resistance ~ ET * position + (1|Grp), Semiconductor))
anova(fm1Semi)
Analysis of Variance Table
Df Sum Sq Mean Sq Denom F value Pr(>F)
ET 3 0.647 0.216 32.000 1.9415 0.14273
position 3 1.129 0.376 32.000 3.3855 0.02991 *
ET:position 9 0.809 0.090 32.000 0.8092 0.61127
So here, all effects are tested with 32 denominator degrees of freedom.
I have looked at the help page for lmer but have been unable to figure out
how to specify the hierarchical structure of a split plot experiment. Also,
I have Googled but without any luck. Any help will be appreciated.
Søren
More information about the R-help
mailing list