# Overdispersion tests for weighted binomial GLM(M)s

I'm running GLM(M)s on proportional data ([0,...,1] ) using a binomial family and weighted to number of trials.

ProportionFlowertoPod_Site.b = glmmTMB(PropFlowtoPod ~ Site_ID, family = binomial, weights = RepEffort,
data = RepSucPodPlant)

Where PropFlowtoPod is proportion of flowers on an inflorescence that developed into pods, site is a categorical factor, and RepEffort is trials per inflorescence. I run a similar GLMM where range position is a categorical factor, two levels; edge/core.

ProportionFlowertoPod_RangePos_site.b = glmmTMB(PropFlowtoPod ~ RangePosition + (1|Site_ID), family = binomial, weights = RepEffort, data = RepSucPodPlant)

I've tried the following dispersion tests

testDispersion, check_overdispersion, and Bolker's overdisp_fun

But I get conflicting values.

testDispersion(ProportionFlowertoPod_RangePos_site.b) #Not overdispersed

DHARMa nonparametric dispersion test via sd of residuals fitted vs. simulated

data: simulationOutput dispersion = 1.3178, p-value = 0.208 alternative hypothesis: two.sided

check_overdispersion(ProportionFlowertoPod_RangePos_site.b)

Overdispersion test dispersion ratio = 2.388 Pearson's Chi-Squared = 902.750 p-value = < 0.001

Overdispersion detected.

I'm pretty sure DHARMa's testDispersion test is the only one that works on binomial GLMMs, but does it work for GLMs? And does it work for weighted binomial GLM(M)s?

• can you explain what do you mean by proportional data? Binomial regression works with bounded counts but not with proportions. Apr 14, 2023 at 16:33
• @utobi All my values lie between 0 and 1 (e.g. 0.1, 0.2, 0.3, ...). Binomial regressions to my understanding can be done on proportional data, so long as you account for the number of trials by weighting the model. My raw data is count data (number of pods/ number of flowers produced), which becomes a proportion in the analysis Apr 14, 2023 at 16:50
• No, the Binomial models counts not proportions, it's a subtle but substantial differenc. if you want to model proportions then you'll have to use a beta regression or similar. Apr 14, 2023 at 17:09

I don't have enough experience with these functions or your data to tell you which is correct however you are likely getting conflicting values because one of the tests for overdispersion is two-tailed and the other (pearson's chi-squared) is one-tailed. As for utobi's comment. It is appropriate to use a weighted binomial GLMM on proportional data provided that proportion is derived form true counts (i.e. derived from data that can only be an integer quantity). Otherwise a beta regression is appropriate for proportions derived from continuous data.

Your proportion fits the bill in that you are looking at a discrete count of pods that developed from a discrete count of flowers, but I'm not certain that you are weighting the model with the correct variable. I don't fully understand what "trials per inflorescence" means in the context of your experimental design, but my understanding of these models is that you would weight the model by the total number of flowers on each inflorenscence that you collected your counts from. If there are multiple "trials" per inflorenscence then you may need to consider a random effect to account for a repeated measure of some kind.

see this post and response from Ben Bolker also Zuur et al., 2009