[R-sig-ME] Overdispersion lme4 binomial

Chris Mcowen cm744 at st-andrews.ac.uk
Sun Aug 1 17:31:56 CEST 2010


Hi Jarrord,

Thanks very much for this - i am relatively new to modelling! I am trying to check the goodness of fit of my model before i use it as a predictive model.

I plotted the residuals(see attached) and they looked odd, so i was a little unsure why and thought i would run through a few possibilities. Using a binary response variable what post model checks are appropriate?

Thanks

> plot(resid(model1))

Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: residuals.pdf
Type: application/pdf
Size: 189359 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20100801/65f2cf40/attachment.pdf>
-------------- next part --------------

On 1 Aug 2010, at 16:11, Jarrod Hadfield wrote:

Dear Chris,

Over-dispersion does not occur with a binary response variable so you don't need to test for it.

This does not mean that between-datum heterogeneity in the probability of success is absent, only that it cannot be observed. For example, take 1000 random draws from a binomial distribution with constant probability (0.5):

table(rbinom(1000, 1, 0.5))

and compare the frequency of outcomes with a 1000 draws from 1000 binomial distributions with different probabilities of success (but with mean = 0.5)

table(rbinom(1000, 1, runif(1000)))

The data look the same, and so the between-datum heterogeneity (residual variance if you like) although it may exist cannot be estimated from the data.

Cheers,

Jarrod


Quoting Chris Mcowen <cm744 at st-andrews.ac.uk>:

> Dear List,
> 
> I am wanting to test for overdispersion in my model and am unsure  how for my specific case.
> 
> I have 2 random factors, 7 fixed factors that have multiple levels  and are categorical and then i have a binary response (True or False).
> 
> model1 <- lmer(threattf~1+(1|order/family) + geophyte + seasonality  + pollendispersal + breedingsystem*fruit + habit + lifeform +  woodyness, family=binomial)
> 
> I would be very grateful if somebody could point me in the right  direction for testing for overdispersion under such scenarios?
> 
> Please see part of the output below -
> 
> Thanks for any help, and if more data is required feel free to ask.
> 
> Chris
> 
> Generalized linear mixed model fit by the Laplace approximation
> Formula: threattf ~ 1 + (1 | order/family) + geophyte + seasonality  +      pollendispersal + breedingsystem * fruit + habit + lifeform +       woodyness
>  AIC  BIC logLik deviance
> 1562 1649 -764.2     1528
> Random effects:
> Groups       Name        Variance Std.Dev.
> family:order (Intercept) 0.26932  0.51896
> order        (Intercept) 0.00000  0.00000
> Number of obs: 1242, groups: family:order, 43; order, 9
> 
> Fixed effects:
>                       Estimate Std. Error z value Pr(>|z|)
> (Intercept)            -0.10413    0.98004  -0.106  0.91538
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> 
> 



-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

_______________________________________________
R-sig-mixed-models at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



More information about the R-sig-mixed-models mailing list