[R] nested mixed-effect model: variance components
Eric Pante
ericpante at hotmail.com
Thu Jun 8 21:09:52 CEST 2006
Dear listers,
I am trying to assess variance components for a nested, mixed-effects
model. I think I got an answer that make sense from R, but I have a
warning message and I wanted to check that what I am looking at is
actually what I need:
my data are organized as transects within stations, stations within
habitats, habitats within lagoons.
lagoons: random, habitats: fixed
the question is: how much variation is due to lagoons? habitats?
lagoons*habitat? transects?
Here is my code:
res <- aov(COVER ~ HABITAT + Error(HABITAT+LAGOON+LAGOON/HABITAT),
data=cov)
summary(res)
and I get Sum Sq for each to calculate variance components:
Error: STRATE
Df Sum Sq Mean Sq
STRATE 5 4493.1 898.6
Error: ATOLL
Df Sum Sq Mean Sq F value Pr(>F)
Residuals 5 3340.5 668.1
Error: STRATE:ATOLL
Df Sum Sq Mean Sq F value Pr(>F)
Residuals 18 2442.71 135.71
Error: Within
Df Sum Sq Mean Sq F value Pr(>F)
Residuals 145 6422.0 44.3
My error message seems to come from the LAGOON/HABITAT, the Error is
computed.
Warning message: Error() model is singular in: aov(COVER ~ HABITAT +
Error(HABITAT+LAGOON+LAGOON/HABITAT), data=cov),
THANKS !!!
eric
Eric Pante
----------------------------------------------------------------
College of Charleston, Grice Marine Laboratory
205 Fort Johnson Road, Charleston SC 29412
Phone: 843-953-9190 (lab) -9200 (main office)
----------------------------------------------------------------
"On ne force pas la curiosite, on l'eveille ..."
Daniel Pennac
More information about the R-help
mailing list