[R-sig-ME] change in variance components depending on scaling of fixed effects

Arild Husby arild.husby at ed.ac.uk
Thu Oct 18 10:53:19 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 (continous covariate 
running from 1955-2004). I've used the Laplace optimization method, due 
to earlier reports of unstability of PQL when running binomial models.

First example: (ja continous 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.


(See also a posting by Steven Orzack on a similar problem: 
http://tolstoy.newcastle.edu.au/R/e2/help/07/07/22076.html)


All help is highly appreciated.

Thanks very much,

Arild Husby

> sessionInfo()
R version 2.5.0 (2007-04-23)
i386-pc-mingw32

locale:
LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United 
Kingdom.1252;LC_MONETARY=English_United 
Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252

attached base packages:
[1] "stats"     "graphics"  "grDevices" "utils"     "datasets"  
"methods"   "base"   
other attached packages:
     lme4      Matrix     lattice
"0.99875-2" "0.99875-2"   "0.15-11"



-- 
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-sig-mixed-models mailing list