[R] decision about random effects in lme
Thomas Petzoldt
petzoldt at rcs.urz.tu-dresden.de
Thu Nov 4 23:03:30 CET 2004
Hello,
in an experimental field study my collegue made a design with samples on
two manipulated sampling sites (site: control, treatment). Within each
site she sampled 3 traps (trap) at day and night (light: light, dark)
at 3 consecutive days (day).
We applied lme models with abundance as response variable, site * light
as fixed effects and day and trap as random effects.
I assumed, the following model may be adequate:
m1 <- lme(ab ~ site * light, data = dat,
random = ~1|site/day/trap, method="ML")
or alternatively:
m2 <- update(m1, random = ~1|site/trap)
and I get a significant interaction effect, but (as expected) NaN for
site as there are not enough df. With several alternative assumptions
about random effects I get both, the significant interaction and an
effect of site, but m1 is remains the "best" model measured by AIC and BIC.
If I however simplify down to a linear model without random effects
m3 <- lm(ab ~ site * light, data=dat)
the models m1 and m3 are "not very different" (AIC, BIC, p-value):
> anova(m1, m2, m3)
Model df AIC BIC logLik Test L.Ratio p-value
m1 1 8 96.54522 111.5148 -40.27261
m2 2 7 100.42958 113.5280 -43.21479 1 vs 2 5.884358 0.0153
m3 3 5 98.05421 107.4102 -44.02711 2 vs 3 1.624633 0.4438
and with m3 I get a very strong effect of site and also the interaction
effect. Both, site and interaction effects are plausible if plotted with
bwplot, but I am still confused, whether one of these two is a good
model, and how to decide this.
Please help me
Thomas P.
More information about the R-help
mailing list