Introduction
Welcome back! In our previous lesson, we established why we need a more powerful tool than ordinary linear regression. You saw that for common data types like binary outcomes (yes/no) and counts (0, 1, 2, ...), linear regression's core assumptions of normality and constant variance are violated, leading to illogical predictions.
This lesson introduces the solution: the Generalized Linear Model (GLM) framework. We will break down a GLM into its three fundamental building blocks. Understanding these parts is the key to correctly building, interpreting, and applying these models for your exam.
Today, your learning goal is to identify the three components of a GLM: the random component, the systematic component (linear predictor), and the link function. By the end of this lesson, you'll be able to describe the role of each component and how they work together to overcome the limitations of standard linear models.
The Anatomy of a Generalized Linear Model
A GLM is not a single model, but a flexible framework defined by three key architectural decisions. Let's start with a video that gives a clear, conceptual overview of these three parts.
Understanding Generalized Linear Models (Logistic, Poisson, etc.)
This video from Simplistics (QuantPsych) provides an excellent introduction to the three components of a GLM. It builds directly on the limitations of linear models we discussed previously.
Please watch from 07:03 to 10:15. The speaker will introduce and define the systematic component, the link function, and the random component. Pay close attention to how he describes the role of each piece.
As the video explained, any GLM can be described by these three components. Now, let's examine each one in more detail. For a more formal definition of these concepts, you can refer to the following resource.
Introduction to Generalized Linear Models
These slides from a University of Illinois course provide concise, formal definitions for each component. We will refer to them as we break down each part.
You don't need to read this all at once. We'll use slides 17-18 as a reference for the definitions of the three components as we discuss them below.
1. The Random Component
The first piece of a GLM is the random component. This is simply the assumed probability distribution of the response variable .
- What it is: Instead of being restricted to the Normal (Gaussian) distribution as in ordinary linear regression, GLMs allow you to choose a distribution from the exponential family that better matches the nature of your data.
- Why it matters: This directly solves the "non-normality" problem.
- For binary data (e.g., success/failure), you would choose the Binomial distribution.
- For count data (e.g., number of events), you would choose the Poisson distribution.
- The takeaway: The random component defines the underlying probability model for the data and its variance structure. The choice of distribution is guided by the type of response variable you are modeling.
You can see examples of this in the "Introduction to Generalized Linear Models" PDF on slide 19, which matches dichotomous data to the Binomial distribution and count data to the Poisson distribution.
2. The Systematic Component (Linear Predictor)
The second piece is the systematic component, also known as the linear predictor. This part should feel very familiar from your previous experience with linear models.
- What it is: It is a linear combination of the explanatory variables (). We typically denote the linear predictor by the Greek letter eta ().
- Why it matters: This is the "linear" part of a "Generalized Linear Model." It retains the simple, additive structure of linear regression, making the model parameters () interpretable in a straightforward way.
- The takeaway: The systematic component specifies how your predictor variables are linearly related to the (transformed) mean of the response.
3. The Link Function
The third and most innovative piece is the link function. It serves as the bridge connecting the random component and the systematic component.
- What it is: The link function, denoted by , is a function that connects the expected value (mean) of the response variable, , to the linear predictor, . or, written out fully:
- Why it matters: This solves the problem of nonsensical predictions. The link function transforms the mean of the response to a scale where a linear relationship is plausible and where the values are not constrained.
- For a binary response, the mean is a probability between 0 and 1. The link function maps this [0, 1] interval onto the entire real number line (-, +), so the linear predictor can take any value.
- For a count response, the mean must be positive. The link function maps the positive real numbers (0, +) onto the entire real number line.
- The takeaway: The link function ensures that the model's predictions are kept within the natural range of the response variable.
Important Distinction: As mentioned in the video, a link function is not the same as transforming the response variable . A transformation (e.g., log(Y)) alters the data itself. A link function transforms the expected value of , leaving the original data untouched. This is a subtle but crucial difference.
Canonical Links: The Default Choice
For each distribution in the exponential family, there is one special link function called the canonical link. This is the link that is "natural" for that distribution and often leads to models with desirable statistical properties. For your exam, you should know the canonical links for the most common distributions.
The next video provides a slightly more formal explanation of the link function and introduces these canonical links.
GLM Link Function, and Canonical Links
This video from Stats4Everyone formally defines the link function and explains the concept of a canonical link by connecting it to the underlying exponential family theory.
Watch from the beginning to 07:40. The first part (until 03:21) reinforces the three components. The second part (03:21 to 07:40) defines the canonical link and gives the specific examples for the Normal, Poisson, and Binomial distributions.
Here is a summary of the key distribution-link pairings you must know. This table combines information from the video and the "Introduction to Generalized Linear Models" PDF (slide 25).
| Random Component (Distribution) | Response Variable Type | Canonical Link Function | Link Equation |
|---|---|---|---|
| Normal | Continuous | Identity | |
| Poisson | Counts () | Log | |
| Binomial | Binary (0/1) or Proportions | Logit |
Ordinary linear regression is just a GLM with a Normal random component and an identity link function!
Putting It All Together
The following images provide excellent visual summaries that will be very helpful for your exam revision. They act as "decision guides" for choosing the right components based on your data.


Conclusion
In this lesson, we dissected the Generalized Linear Model into its three core components. You now know how these parts work in concert to create a flexible and powerful modeling framework.
Key Takeaways:
- A GLM is defined by three components:
- Random Component: The probability distribution for the response variable (e.g., Normal, Binomial, Poisson). It's chosen to match the nature of the data.
- Systematic Component: The linear predictor (), which is a linear function of the predictors.
- Link Function: A function that connects the mean of the response () to the linear predictor ().
- The link function is crucial for ensuring that the model produces sensible predictions (e.g., probabilities between 0 and 1, positive counts).
- For each distribution, there is a canonical link that is considered the default choice, such as the identity link for Normal, log for Poisson, and logit for Binomial.
You've learned to identify the building blocks of a GLM. In the next lesson, we will focus on the practical skill of selecting the appropriate distribution and link function for a GLM based on a description of a response variable, which is a common type of exam question.