[R-sig-ME] Model comparisons

Yasuaki SHINOHARA y.shinohara at aoni.waseda.jp
Fri Oct 3 06:22:21 CEST 2014


Dear all,

Could I ask a very basic question about glmer?
I am wondering how important using the best-fitting model is.

(1)
Please imagine I have three fixed factors "A", "B" and "C" in a
logistic mixed effects model.
I want to test these main effects and their all possible interactions.
However, I can include another factor "D" (e.g., age) in which I am
not interested. If I include the fixed factor "D" in
the model, the model fits significantly better than the model
without the factor "D".
I know I should use the best-fitting model, and report all the results
including the factor "D", although the results are slightly different
from the model which does not include the factor "D".
However, I also think that including unnecessary factors would
distract readers from the main point, so it may be good to analyze
data without the factor "D".
Could I ask your opinions?

(2)
Also, I do not understand why the results are so different, if I
change the relation in one of the factors.
For example, the model including the fixed factors of "A","B","C" and
"log(age)" is significantly better than another model including the
fixed factors of "A","B","C" and "poly(age,2)".
This difference (log(age) vs. poly(age,2)) affects the results of
other factors of "A", "B" and "C" as below.
Could you please explain why?
In terms of AIC value, MODEL1 is better. However, the results of
MODEL1 do not look correct.
Why is it?

MODEL1<-glmer(binomial_response~A*B*log(age)+(1|X)+(1+B|Y)+(1+B|Z),
family=binomial, 
data=ALLDATA,control=glmerControl(optimizer="bobyqa"))
MODEL2<-glmer(binomial_response~A*B*poly(age,2)+(1|X)+(1+B|Y)+(1+B|Z),
family=binomial, 
data=ALLDATA,control=glmerControl(optimizer="bobyqa"))

> Anova(MODEL1,type=3)
Analysis of Deviance Table (Type III Wald chisquare tests)

Response: prod_corr
                        Chisq Df Pr(>Chisq)
(Intercept)           0.8155  1   0.366503
A                0.0059  1   0.938896
B                 0.7490  1   0.386791
log(age)              8.6887  1   0.003202 **
A:B          0.0044  1   0.947053
A:log(age)       0.2471  1   0.619110
B:log(age)        2.5704  1   0.108881
A:B:log(age) 0.4881  1   0.484767
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> Anova(MODEL2, type=3)
Analysis of Deviance Table (Type III Wald chisquare tests)

Response: prod_corr
                             Chisq Df Pr(>Chisq)
(Intercept)               41.2696  1  1.326e-10 ***
A                     6.4384  1  0.0111677 *
B                     13.0042  1  0.0003108 ***
poly(age, 2)              14.2490  2  0.0008051 ***
A:B              14.2547  1  0.0001597 ***
A:poly(age, 2)        1.1039  2  0.5758358
B:poly(age, 2)         3.2066  2  0.2012318
A:B:poly(age, 2)  0.3203  2  0.8520201
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1


Best wishes,
Yasu



More information about the R-sig-mixed-models mailing list