I am modelling data with a generalized mixed model with binomial error distribution and I am concerned about overdispersion. I know that dispersion parameter can be measured as deviance/df, but for mixed models (= with random effect), the number of degrees of freedom cannot be extracted (I am using the function lmer from R). Is there any way to find out if my data are overdispersed?


1 Answer 1


You may be able to use this function attributed to D. Bates to get the scale parameter:

dispersion_glmer<- function(modelglmer)
# computing  estimated scale  ( binomial model)
#following  D. Bates :
#That quantity is the square root of the penalized residual sum of
#squares divided by n, the number of observations, evaluated as:

    n <- length(modelglmer@resid)

    return(  sqrt( sum(c(modelglmer@resid, modelglmer@u) ^2) / n ) )

This is a link to more information on the scale parameter.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.