Given the count data for fecundity (number born) by gender and year, a generalised linear model (GLM) may be indicated to assess whether fecundity changes significantly over time and if these changes differ between males and females. As the data represent counts, a Poisson GLM may be appropriate, as it models the mean and variance as equal, expressed as $ \mathbb{E}(Y) = \operatorname{Var}(Y) = \mu $ (Hilbe, 2011). However, biological count data often exhibit overdispersion, where the variance exceeds the mean. In such cases, a negative binomial GLM, which models variance as
$ \operatorname{Var}(Y) = \mu + \alpha \mu^2 $, where $ \alpha > 0 $ is the overdispersion parameter, is preferable (Cameron & Trivedi, 1998).
To test for changes in fecundity over time, we include the year term in the model, where the coefficient represents the log change in expected counts per year. The exponential of this coefficient, $ \exp(\beta_{\text{year}}) $, quantifies the multiplicative effect on fecundity per year. To examine differences between genders, we include a gender term, where $ \exp(\beta_{\text{genderF}}) $ represents the ratio of female to male fecundity in the reference year. To assess whether the trend in fecundity differs by gender, we include an interaction term (year:genderF), which tests for differences in slopes between males and females. A significant interaction indicates that the rate of change in fecundity over time varies by gender.
If overdispersion is present, the negative binomial model corrects for excess variance while maintaining the same mean structure as the Poisson model. To check for overdispersion, we examine the dispersion parameter (theta) in the negative binomial model output, where a smaller theta indicates greater overdispersion. For model comparison, we use the Akaike Information Criterion (AIC) to evaluate the Poisson and negative binomial models, as the likelihood ratio test is invalid when the overdispersion parameter lies on the boundary ($ \alpha = 0 $) (Hilbe, 2011). The R code to implement these models is provided in the appendix.
References
Cameron, A. C., & Trivedi, P. K. (1998). Regression Analysis of Count Data. Cambridge University Press.
Hilbe, J. M. (2011). Negative Binomial Regression. Cambridge University Press.
Appendix
Appendix 1: R Code for GLM Analysis
# Poisson GLM
poisson_model <- glm(number_born ~ year * gender, family = poisson, data = your_data)
# Negative Binomial GLM (requires MASS package)
library(MASS)
negbin_model <- glm.nb(number_born ~ year * gender, data = your_data)
# Model comparison using AIC
AIC(poisson_model, negbin_model)