[R-sig-ME] Significant anova results for identical Models in glmer
burg4401 at uni-trier.de
burg4401 at uni-trier.de
Wed Dec 10 10:07:12 CET 2008
Dear List,
when fitting two identical lmer Models and comparing them with
anova() one Model has a significant p-value
although obviously all coefficients and variances and likelihoods remain the
same.
I think this comes from line 1000 in lmer.R (Rev 266)
pchisq(0,0,lower=F) == 0
I'm not concerned about someone putting in twice the same model, but
apparently if two models with same degree of freedom are compared the pvalues
are calculated on a dchisq(df=0) basis...
e.g. factor1 = SEX , factor2 = (higher than 1.78m)
Maybe I was looking in the wrong books, but I couldn't find an argument
against this comparison. Could it be that the Problem lies in non nested
parameter spaces?
Not least I'ld like to thank everyone in the list upcoming with interesting
questions and answers. Overall many thanks to the programmers of lme4. Without
lme4 I would have had problems to use my large matrices. Great Work.
Best Regards,
Pablo
Working example:
gm1 <- glmer(cbind(incidence, size - incidence) ~0+ period + (1 | herd),
family = binomial, data = cbpp)
gm2 <- glmer(cbind(incidence, size - incidence) ~ -1 + period + (1 | herd),
family = binomial, data = cbpp)
anova(gm1,gm2)
Data: cbpp
Models:
gm1: cbind(incidence, size - incidence) ~ 0 + period + (1 | herd)
gm2: cbind(incidence, size - incidence) ~ -1 + period + (1 | herd)
Df AIC BIC logLik Chisq Chi Df Pr(>Chisq)
gm1 5 110.096 120.223 -50.048
gm2 5 110.096 120.223 -50.048 0 0 < 2.2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
More information about the R-sig-mixed-models
mailing list