18: Generalised Linear Models (GLM)
Task L
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.
Choose a reasonably common species in
miteand fit a Poisson GLM of its count on themite.envpredictorsSubsDens,WatrContandTopo. Report the coefficients on both the link and the response scale (exponentiate), and interpret the sign of each.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.Using
sipoo, compute each island’s species richness and fit a Poisson (or negative binomial) GLM of richness onlog(area)taken fromsipoo.map. The slope onlog(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\).Convert one moderately common
sipoobird species to presence/absence and fit a logistic GLM of its occurrence onlog(area). Report the odds ratio for a doubling of island area and the area at which the predicted probability of occurrence is 0.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.
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
@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}
}
