2026-03-09
A generalized linear model is made up of A linear predictor \(\eta\) \[ \eta_i = \beta_0 + \beta_1x_{1i} + \ldots + \beta_px_{pi} \] and two functions
the link function that describes how the mean \(\mu_i\) depends on the linear predictor \[ g(\mu_i) = \eta_i \]
the variance (or error) function that describes how the variance \(var(Y_i)\) depends on the mean \[ var(Y_i) = \phi V(\mu) \] where the dispersion parameter \(\phi\) is a constant
| Type of response variable | Typical values | Distribution | Link function |
|---|---|---|---|
| Continuous | Any real number | Normal | Identity |
| Binary outcome | 0 / 1 | Binomial | Logit (\[ \text{logit}(p) = \log\left(\frac{p}{1-p}\right) \]) |
| Proportion | Between 0 and 1 | Binomial | Logit |
| Counts | 0,1,2,3,… | Poisson | Log |
| Counts (overdispersed) | 0,1,2,3,… | Negative binomial | Log |
| Positive continuous (skewed) | >0 | Gamma | Log |
General rule
Work in pairs. For each scenario, decide the:
| Scenario | Response type | Distribution | Link |
|---|---|---|---|
| Does infection status depend on temperature? | Binary | Binomial | Logit |
| Does fertiliser increase the number of flowers on a plant? | Count | Poisson | Log |
| Does predator presence affect whether tadpoles survive? | Binary | Binomial | Logit |
| Does food availability affect clutch size in birds? | Count | Poisson | Log |
Number of kicked heads with increasing number of horses
\[ \log(kicks) = \beta_0 + \beta_1 horses \]
which implies
\[ kicks = e^{\beta_0 + \beta_1 horses} \]
Flowers ~ fertiliser
\(\beta = 0.4\)
What does this mean biologically?
On the log scale, a 1-unit increase in fertiliser increases the linear predictor by 0.4
Exponentiate to get back to the count scale
\(e^{0.4} \approx 1.49\)
So the expected flower count is multiplied by about 1.49
That is about a 49% increase in expected flower count for each 1-unit increase in fertiliser
A different point useful for mini-project: interpreting log predictor variable \(\beta\): https://library.virginia.edu/data/articles/interpreting-log-transformations-in-a-linear-model