Dear all, I try to consider overdispersion in a lmer model. But using family=quasibinomial rather than family=binomial seems to change the fit but not the result of an anova test. In addition if we specify test="F" as it is recomanded for glm using quasibinomial, the test remains a Chisq test. Are all tests scaled for dispersion, or none? Why is there a difference between glm and lmer for this? And why summary does not test estimates only in the quasibinomial case? Thank you.
Here is an simple example using a simulated dataset (with anova tests at the end): library(lme4) Y1<-sample(c(rbinom(90,10,0.1),rbinom(90,10,0.7))) Y2<-10-Y1 Y<-cbind(Y1,Y2) Group<-c(rep("A",80),rep("B",50),rep("C",50)) Group<-as.factor(sample(Group)) X<-Y1*rnorm(180,mean=0,sd=10) mod0<-lmer(Y~X+(1|Group),family=binomial) #model using binomial family summary(mod0) Generalized linear mixed model fit using Laplace Formula: Y ~ X + (1 | Group) Family: binomial(logit link) AIC BIC logLik deviance 872.9 882.4 -433.4 866.9 Random effects: Groups Name Variance Std.Dev. Group (Intercept) 0.012863 0.11341 number of obs: 180, groups: Group, 3 Estimated scale (compare to 1 ) 2.025698 Fixed effects: Estimate Std. Error z value Pr(>|z|) (Intercept) -0.451023 0.082160 -5.490 4.03e-08 *** X 0.002388 0.001092 2.187 0.0287 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Correlation of Fixed Effects: (Intr) X -0.076 mod1<-lmer(Y~X+(1|Group),family=quasibinomial) #model using quasibinomial family summary(mod1) Generalized linear mixed model fit using Laplace Formula: Y ~ X + (1 | Group) Family: quasibinomial(logit link) AIC BIC logLik deviance 872.9 882.4 -433.4 866.9 Random effects: Groups Name Variance Std.Dev. Group (Intercept) 0.052785 0.22975 Residual 4.103452 2.02570 number of obs: 180, groups: Group, 3 Fixed effects: Estimate Std. Error t value (Intercept) -0.451020 0.166434 -2.710 X 0.002389 0.002212 1.080 Correlation of Fixed Effects: (Intr) X -0.076 mod0ML<-lmer(Y~X+(1|Group),family=binomial,type="ML") mod0NULLML<-lmer(Y~1+(1|Group),family=binomial,type="ML") anova(mod0ML,mod0NULLML) mod0NULLML: Y ~ 1 + (1 | Group) mod0ML: Y ~ X + (1 | Group) Df AIC BIC logLik Chisq Chi Df Pr(>Chisq) mod0NULLML 2 875.68 882.07 -435.84 mod0ML 3 872.85 882.43 -433.43 4.8307 1 0.02796 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 mod1ML<-lmer(Y~X+(1|Group),family=quasibinomial,type="ML") mod1NULLML<-lmer(Y~1+(1|Group),family=quasibinomial,type="ML") anova(mod1ML,mod1NULLML,test="F") mod1NULLML: Y ~ 1 + (1 | Group) mod1ML: Y ~ X + (1 | Group) Df AIC BIC logLik Chisq Chi Df Pr(>Chisq) # F test does not occur!!! mod1NULLML 2 875.68 882.07 -435.84 mod1ML 3 872.85 882.43 -433.43 4.8307 1 0.02796 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.