Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overdispersion in Beta GLMM with glmmTMMB #126

Closed
pv272 opened this issue Sep 23, 2019 · 1 comment
Closed

Overdispersion in Beta GLMM with glmmTMMB #126

pv272 opened this issue Sep 23, 2019 · 1 comment
Labels

Comments

@pv272
Copy link

pv272 commented Sep 23, 2019

I specified a mixed model with Beta family and logit link to model the effect of treatment on the proportion of time (between 0 and 1) spent expressing a specific behaviour during an observation
Burrow_FS_1 <- glmmTMB(Burrowing_T ~ Treatment*Weight_C + DailySeen_C + (1|Colony) + (1|AnimalID), data = CS_FS_Burrow , family=beta_family())

I simulate the residuals and run the diagnostic plot

Simul_FS_Burrow <- simulateResiduals(fittedModel = Burrow_FS_1, n = 250) plot(Simul_FS_Burrow,quantreg = TRUE) testResiduals(Simul_FS_Burrow)

the diagnostic plot look as follow

image

and

image

I am mostly wondering whether it is an issue of concern that the dispersion test suggest overdipsersion, considering that models specifying a Beta distribution actually estimate the dispersion. If it is an issue, how should it be dealt with

@florianhartig florianhartig changed the title Overdispersion in Beta GLMM Overdispersion in Beta GLMM with glmmTMMB Sep 23, 2019
@florianhartig
Copy link
Owner

Hi pv272,

the diagonal line in the upper right plot can probably be disregarded, see #78 - I hope that I can fix this issue in the next week, with an update of glmmTMB coming up that should close this issue.

I would interpret the underdispersion issue as a deviation from the model expectation though. It also fits together with this slight (albeit n.s.) shift in the distribution (qq plot, see also res ~ pred lower left).

My best guess is that the reason is that the residual distribution simply cannot be perfectly described by a beta. Yes, the beta has in some sense a variable dispersion, but the MLE for the beta will not necessarily have the right dispersion if the distribution doesn't follow a beta.

Practically, you don't have many alternatives to the beta in this case. You could see if switching on variable dispersion or zero-inflation helps (I think that's possible for the beta in glmmTMB, but not sure). You could also check if you see patterns of res ~ predictors - this could be a reason for such a misfit.

If neither of this helps, I wouldn't trouble myself too much over this - a slight deviation shouldn't create too much error, and underdispersion has usually conservative effects on p-values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants