[R] Unrealistic dispersion parameter for quasibinomial

Etienne Bellemare Racine etiennebr at gmail.com
Thu Mar 4 18:51:35 CET 2010


Ben Bolker wrote :
> The dispersion parameter depends on the Pearson residuals,
> not the deviance residuals (i.e., scaled by expected variance).
> I haven't checked into this in great detail, but the Pearson
> residual of your first data set is huge, probably because
> the fitted value is tiny (and hence the expected variance is
> tiny) and the observed value is 0.2.
>
>
> dfr <- df.residual(model2)
> deviance(model2)/dfr
> d2 <- sum(residuals(model2,"pearson")^2) 
> (disp2 <- d2/dfr) 
> fitted(model2)
> residuals(model2,"pearson")
Sorry to dig that one from one year ago, but it seems it is still 
interesting (at least to me).
 From summary.glm, it looks like the deviance is obtained by the working 
type deviance, which gave close results to pearson type (when working 
residuals are multiplied by the weights). I couldn't find a lot of 
information on the working type.  How is it computed (from ?glm, I know 
that these are «the residuals in the final iteration of the IWLS fit») ?

sum(model2$weights * residuals(model2, type="working")^2)
sum(residuals(model2, type="pearson")^2)

Maybe I'm wrong, but could someone clarify that (which type is used and 
what difference it makes) ?

Thank you in advance,
Etienne



More information about the R-help mailing list