Dear list members,
 
I am new to this list so i am not fully aware of the history of threads.  I have noticed that there have been a few emails about quasipoisson models and individual level variation.  I have two questions:
 
1) Is it common knowledge that the quasipoisson family incorrectly weights things somewhere in glmer?  The example below gives a demonstration.
 
2) would a simple alternative / fix be to interpret 'family = quasipoisson' as inlcuding variation at the individual level  (like the third model) internaly in the glmer code?  I understand this would not model underdispersion, but it would be easy to do and would avoid quasi likelihood. 
 
I hope this comes accross as constructive as i have huge respect for the work behind the lme4 package
 
Best,
Colin
 
 
# simulate some approximately poisson data with mean 100
x1 <- round( rnorm(100, 100, 10) )
# simulate some approximately overdispersed poisson data with mean 100
# and variance 2 * 100, ie sd = sqrt(2) * 10
x2 <- round( rnorm(100, 100, sqrt(2)*10) )

# dummy factor and individual level factor ... (well almost)
z <- factor(rep(c("A","B"),50))
ind <- factor(c(1:99,99))

# glm fit picks out the dispersion as expected 
# also note the s.e. of the fixed effect mean
summary(glm(x2 ~ 1, family = quasipoisson))
#Call:
#glm(formula = x2 ~ 1, family = quasipoisson)
#Deviance Residuals: 
#     Min        1Q    Median        3Q       Max  
#-4.10173  -0.94752   0.06052   0.93988   3.35496  
#Coefficients:
#            Estimate Std. Error t value Pr(>|t|)    
#(Intercept)  4.61897    0.01301   354.9   <2e-16 ***
#---
#Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
#(Dispersion parameter for quasipoisson family taken to be 1.71732)
#    Null deviance: 172.11  on 99  degrees of freedom
#Residual deviance: 172.11  on 99  degrees of freedom
#AIC: NA
#Number of Fisher Scoring iterations: 4
 
# tw0 examples using glmer:

# this model gets se wrong and returns something like 
# the variance in the residual term and calculates the 
# se of the fixed effect as 10 times that estimated in the equivalent glm fit
# but gets the same deviance...

glmer(x2 ~ (1|z), family = quasipoisson) 
#Generalized linear mixed model fit by the Laplace approximation 
#Formula: x2 ~ (1 | z) 
#   AIC   BIC logLik deviance
# 178.1 185.9 -86.05    172.1
#Random effects:
# Groups   Name        Variance Std.Dev.
# z        (Intercept)   0.00    0.000  
# Residual             172.38   13.129  
#Number of obs: 100, groups: z, 2
#Fixed effects:
#            Estimate Std. Error t value
#(Intercept)   4.6190     0.1304   35.42

# this model get the se right
glmer(x2 ~ (1|ind), family = poisson)
#Generalized linear mixed model fit by the Laplace approximation 
#Formula: x2 ~ (1 | ind) 
#   AIC   BIC logLik deviance
# 158.4 163.6 -77.22    154.4
#Random effects:
# Groups Name        Variance  Std.Dev.
# ind    (Intercept) 0.0070788 0.084135
#Number of obs: 100, groups: ind, 99
#Fixed effects:
#            Estimate Std. Error z value Pr(>|z|)    
#(Intercept)  4.61610    0.01306   353.4   <2e-16 ***
#---
#Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 


	[[alternative HTML version deleted]]


