Variance component models using lmer
On Mon, Jan 3, 2011 at 1:40 PM, Luciano La Sala
<lucianolasala at yahoo.com.ar> wrote:
Dear everyone, I have a dataset consisting of 144 measurements of egg volume from 48 nests (3 eggs/nest). I am interested in answering the question of how much of the variation in the response variable (egg volume) can be attributed to within-nest variation and how much to among-nests variation. My model was specified as follows:
model <- lmer(EggLength ~ NestID + (1|NestID), data = Data) summary(model)
Linear mixed model fit by REML Formula: EggLength ~ NestID + (1 | NestID) ? Data: Data ? AIC ? BIC logLik deviance REMLdev ?712.4 724.3 -352.2 ? ?697.9 ? 704.4 Random effects: ?Groups ? Name ? ? ? ?Variance Std.Dev. ?NestID ? (Intercept) 5.5917 ? 2.3647 ?Residual ? ? ? ? ? ? 4.5025 ? 2.1219 Number of obs: 144, groups: NestID, 48 Fixed effects: ? ? ? ? ? ?Estimate Std. Error t value (Intercept) 68.02159 ? ?1.26104 ? 53.94 NestID ? ? ? 0.02753 ? ?0.01540 ? ?1.79 Correlation of Fixed Effects: ? ? ? (Intr) NestID -0.952
The formula doesn't make sense. You have the covariate NestID as both a fixed-effect (treated, incorrectly, as a numeric value) and a random effect grouping factor. You should specify the model formula as EggLength ~ 1 + (1|NestID)
From the above output I extracted the variance components by squaring the
standard deviations, then expressing them as percentages:
vars <- c(5.5917, 4.5025) 100*vars/sum(vars)
[1] 55.39518 44.60482 At this point, I would conclude that egg volume varied 55.4% among clutches and 44.6% within clutches. I'd appreciate suggestions/corrections to my model specification and results interpretation. Thank you in advance. Luciano
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models