18: Generalised Linear Models (GLM)

Task L

Published

2026/06/13

Practice Task

Work through these exercises after reading the Generalised Linear Models chapter. They use two vegan datasets that suit GLMs naturally: the oribatid mite counts (data(mite); data(mite.env)) for Poisson-family models, and the Sibbo island bird incidences (data(sipoo); data(sipoo.map)) for a binomial model. Four exercises are hands-on and two are conceptual.

  1. Choose a reasonably common species in mite and fit a Poisson GLM of its count on the mite.env predictors SubsDens, WatrCont and Topo. Report the coefficients on both the link and the response scale (exponentiate), and interpret the sign of each.

  2. Check the model for overdispersion (compare the residual deviance to its degrees of freedom, or use performance::check_overdispersion()). If it is overdispersed, refit it as a quasi-Poisson and a negative binomial model (MASS::glm.nb()), and compare the standard errors and inferences with the Poisson fit.

  3. Using sipoo, compute each island’s species richness and fit a Poisson (or negative binomial) GLM of richness on log(area) taken from sipoo.map. The slope on log(area) is the exponent \(z\) of the species-area relationship \(S = cA^{z}\); report it and comment on its magnitude relative to the typical range of \(z \approx 0.2\)\(0.35\).

  4. Convert one moderately common sipoo bird species to presence/absence and fit a logistic GLM of its occurrence on log(area). Report the odds ratio for a doubling of island area and the area at which the predicted probability of occurrence is 0.5.

  5. Explain why a Poisson or negative-binomial GLM is more appropriate than ordinary least-squares regression for count data, and what overdispersion means both statistically and ecologically.

  6. Explain the role of the link function in a GLM (log for counts, logit for binary data). Take one fitted coefficient from Exercises 1–4 and interpret it on both the link scale and the back-transformed response scale.

Assessment Criteria

This Task is not formally assessed. It is built around four hands-on analyses (Exercises 1–4) and two short conceptual questions (Exercises 5–6); work through all six and bring your annotated Quarto document to class for discussion.

Reuse

Citation

BibTeX citation:
@online{smit2026,
  author = {Smit, A. J.},
  title = {18: {Generalised} {Linear} {Models} {(GLM)}},
  date = {2026-06-13},
  url = {https://tangledbank.netlify.app/BCB743/tasks/Task_L.html},
  langid = {en}
}
For attribution, please cite this work as:
Smit AJ (2026) 18: Generalised Linear Models (GLM). https://tangledbank.netlify.app/BCB743/tasks/Task_L.html.