[R] change of variance components depending on scaling of fixed effects
Arild Husby
arild.husby at ed.ac.uk
Fri Oct 12 13:10:38 CEST 2007
Dear all,
I am trying to understand the output from a binomial lmer object and why
the scaling of a fixed effect changes the variance components.
In the model p2rec is cbind(number recruits2,number recruits 1), Pop is
populations (five level factor) and ja is year (covariate running from
1955-2004). I.e. biologically I am interested to see how the proportion
of recruits from the second clutch has changed over time between the
different populations. I've used the Laplace optimization method, due to
earlier reports of unstability of PQL when running binomial models.
First example: (ja covariate range: 1955-2004)
> totmod2 <- lmer(p2rec~Pop*ja + (1|VROUW)+(1|ja), data=dltab2,
family=binomial, method="Laplace", na.action=na.omit)
> summary(totmod2)
Generalized linear mixed model fit using Laplace
Formula: p2rec ~ Pop * ja + (1 | VROUW) + (1 | ja)
Data: dltab2
Family: binomial(logit link)
AIC BIC logLik deviance
12456 12519 -6216 12432
Random effects:
Groups Name Variance Std.Dev.
VROUW (Intercept) 2.19300 1.48088
ja (Intercept) 0.09675 0.31105
number of obs: 1323, groups: VROUW, 1088; ja, 48
Estimated scale (compare to 1 ) 22.97855
I then scale ja so that: dltab2$ja<-scale(dltab2$ja, scale=FALSE)
> totmod2 <- lmer(p2rec~Pop*ja + (1|VROUW)+(1|ja), data=dltab2,
family=binomial, method="Laplace", na.action=na.omit)
> summary(totmod2)
Generalized linear mixed model fit using Laplace
Formula: p2rec ~ Pop * ja + (1 | VROUW) + (1 | ja)
Data: dltab2
Family: binomial(logit link)
AIC BIC logLik deviance
983.8 1046 -479.9 959.8
Random effects:
Groups Name Variance Std.Dev.
VROUW (Intercept) 0.54162 0.73595
ja (Intercept) 0.29192 0.54029
number of obs: 1323, groups: VROUW, 1088; ja, 48
Estimated scale (compare to 1 ) 0.7061424
Different scaling: dltab2$ja<-scale(dltab2$ja, center=1000, scale=FALSE)
> totmod2 <- lmer(p2rec~Pop*ja + (1|VROUW)+(1|ja), data=dltab2,
family=binomial, method="Laplace", na.action=na.omit)
> summary(totmod2)
Generalized linear mixed model fit using Laplace
Formula: p2rec ~ Pop * ja + (1 | VROUW) + (1 | ja)
Data: dltab2
Family: binomial(logit link)
AIC BIC logLik deviance
7136 7198 -3556 7112
Random effects:
Groups Name Variance Std.Dev.
VROUW (Intercept) 2.19300 1.48088
ja (Intercept) 0.09675 0.31105
number of obs: 1323, groups: VROUW, 1088; ja, 48
Estimated scale (compare to 1 ) 3.083302
Estimates of fixed effects changes as one would expect (so have not
printed them here), but I do not understand why there is such a massive
difference in the variance components.
Note that the first and last example has the same estimates of variance
components, but that the estimated scale is massively different.
All help is highly appreciated.
Thanks very much,
Arild
--
Arild Husby
Institute of Evolutionary Biology
Room 413, Ashworth Labs,
King's Buildings,
University of Edinburgh
EH9 3JT, UK
E-mail: arild.husby at ed.ac.uk
web: http://homepages.ed.ac.uk/loeske/arild.html
Tel: +44 (0)131 650 5990
Mob: +44 (0)798 275 0668
More information about the R-help
mailing list