Tutorials › Generalized Linear Models › What a GLM Linear Predictor Represents

Design Matrices and Predictors · Tutorial 80 of 981

What a GLM Linear Predictor Represents

Understand what the linear predictor measures, how its value depends on covariates and coefficients, and how to calculate it for an observation.

Beginner 9 min read

What You'll Learn

  • Define the linear predictor as a weighted sum of an observation’s covariate values
  • Distinguish observation-specific predictor values from coefficients shared across observations
  • Calculate a predictor from specified covariate values and coefficients
  • Derive how predictor differences reflect differences in covariates
  • Explain how changing one covariate changes the predictor
  • Recognize that the predictor is on the model’s link scale, not necessarily the response scale

What the Linear Predictor Represents

A generalized linear model uses covariates to describe how the response distribution changes across observations. The linear predictor is the model’s covariate-based summary for an observation: it adds the observation’s covariate values, each weighted by its coefficient. The coefficients describe how the model combines covariates; the covariate values determine the resulting predictor for a particular observation.

This distinction matters because a fitted model usually has one shared set of coefficients but a different collection of covariate values for each observation. Consequently, the coefficients can stay the same while the linear predictor changes from one observation to another. The predictor is commonly denoted by \(\eta_i\), where \(i\) identifies the observation.

Definition: Suppose a model uses \(p\) covariates. For observation \(i\), let \(x_{ij}\) be the value of covariate \(j\), and let \(\beta_j\) be its coefficient. The linear predictor for observation \(i\) is
$$ \eta_i=\sum_{j=1}^{p}x_{ij}\beta_j =x_{i1}\beta_1+x_{i2}\beta_2+\cdots+x_{ip}\beta_p. $$
The covariate values \(x_{ij}\) may vary across observations; within the specified model, the coefficients \(\beta_j\) are shared across them.

The word “linear” refers to the way the coefficients enter: each coefficient is multiplied by a covariate value, and these products are added. The predictor is not necessarily a linear function of the response, and its numerical value is not necessarily a predicted response. In a GLM, the predictor is typically on the scale specified by the link function. In the usual notation, the model relates it to the mean \(\mu_i=E[Y_i]\) through \(\eta_i=g(\mu_i)\), where \(g\) is the link function. Thus, interpreting \(\eta_i\) requires keeping its scale distinct from the response scale.

Coefficients and Observation-Specific Values

A coefficient \(\beta_j\) is a model parameter attached to covariate \(j\). It is shared: the same \(\beta_j\) is used when calculating the predictor for every observation in the model. By contrast, \(x_{ij}\) records the value of that covariate for a particular observation. For example, patients can have different ages \(x_{i1}\), but the age coefficient \(\beta_1\) is one common model coefficient.

The contribution of covariate \(j\) to observation \(i\)’s predictor is the product \(x_{ij}\beta_j\). A large covariate value does not by itself guarantee a large contribution: the coefficient’s size and sign also matter. A positive coefficient makes the contribution increase as the covariate increases, while a negative coefficient makes it decrease, with other quantities held fixed.

In an application, the coefficients may be unknown and estimated from data. Once estimates \(\hat{\beta}_j\) are available, the fitted linear predictor is calculated by substituting those estimates: \(\hat{\eta}_i=\sum_{j=1}^{p}x_{ij}\hat{\beta}_j\). This calculation does not change the roles of the two ingredients: the covariate values belong to the observation, and the coefficient estimates are shared by observations in the fitted model.

Worked Example: Calculating a Predictor for One Patient

Suppose a model uses two covariates: age in decades and a treatment indicator that equals 1 for a treated patient and 0 otherwise. For one patient, the covariate values are \(x_{i1}=6\) and \(x_{i2}=1\). Suppose the corresponding coefficients are \(\beta_1=0.25\) and \(\beta_2=-0.8\). Calculate the linear predictor.

There are two covariate contributions. The age contribution is \(6(0.25)=1.5\), and the treatment contribution is \(1(-0.8)=-0.8\). Adding them gives

$$ \eta_i=(6)(0.25)+(1)(-0.8)=1.5-0.8=0.7. $$

The predictor for this patient is \(0.7\). The negative treatment coefficient contributes \(-0.8\) because this patient’s treatment indicator is 1. It would contribute \(0\) for an untreated patient with indicator value 0. The value \(0.7\) is the predictor, not automatically the patient’s expected response or response probability; translating it to the response scale requires the model’s link function.

How Predictors Differ Across Observations

Shared coefficients do not imply identical predictors. If two observations have different covariate values, their weighted sums may differ. Subtracting their predictor expressions gives an exact accounting of the difference: each coefficient weights the difference in its covariate.

Result: For two observations \(i\) and \(k\) described by the same covariates and coefficients,
$$ \eta_i-\eta_k =\sum_{j=1}^{p}\beta_j(x_{ij}-x_{kj}). $$
In particular, identical covariate values imply identical linear predictors, even though the observations themselves may have different response values.

To verify the result, write the predictor for each observation using the definition, then subtract and group the terms by covariate:

$$ \eta_i-\eta_k =\sum_{j=1}^{p}x_{ij}\beta_j-\sum_{j=1}^{p}x_{kj}\beta_j =\sum_{j=1}^{p}(x_{ij}-x_{kj})\beta_j. $$

If \(x_{ij}=x_{kj}\) for every \(j\), every difference \(x_{ij}-x_{kj}\) is zero, so the expression equals zero and \(\eta_i=\eta_k\). This is an algebraic statement about the model predictors. It does not assert that the two observed responses must match. □

Worked Example: Comparing Two Observations

A model has two covariates with shared coefficients \(\beta_1=0.4\) and \(\beta_2=-1.2\). Observation A has covariate values \((x_{A1},x_{A2})=(3,1)\), while observation B has values \((x_{B1},x_{B2})=(5,0)\). Calculate both predictors and check their difference using the result above.

For observation A,

$$ \eta_A=(3)(0.4)+(1)(-1.2)=1.2-1.2=0. $$

For observation B,

$$ \eta_B=(5)(0.4)+(0)(-1.2)=2+0=2. $$

The direct difference is \(\eta_A-\eta_B=0-2=-2\). From the difference formula,

$$ \eta_A-\eta_B =(0.4)(3-5)+(-1.2)(1-0) =(0.4)(-2)+(-1.2)(1) =-0.8-1.2=-2. $$

The two observations use exactly the same coefficients, but their predictors differ because their covariate values differ. Each covariate’s effect on the difference is weighted by its coefficient.

Changing One Covariate

The weighted-sum definition also gives a direct way to understand a change in one covariate. Hold the coefficients and every other covariate fixed, and change covariate \(r\) from \(x_{ir}\) to \(x_{ir}+\Delta\). Only one term in the predictor changes.

Result: Under the conditions just stated, the new predictor is \(\eta_i+\beta_r\Delta\), so the change in the predictor is
$$ \eta_i^{\mathrm{new}}-\eta_i=\beta_r\Delta. $$
Derivation: The terms for \(j\ne r\) are unchanged. The \(r\)th term changes from \(x_{ir}\beta_r\) to \((x_{ir}+\Delta)\beta_r\). Therefore the difference is \((x_{ir}+\Delta)\beta_r-x_{ir}\beta_r=\beta_r\Delta\). □

This result describes change on the predictor scale. It says that increasing a covariate by one unit changes the predictor by its coefficient, provided the other covariates and coefficients stay fixed. If the coefficient is negative, a positive increase in the covariate decreases the predictor. If the coefficient is zero, changing that covariate alone does not change the predictor. Any corresponding change in the mean or response probability depends on how the link function maps predictors to means.

Worked Example: A One-Unit Covariate Increase

Suppose a particular observation has predictor \(\eta_i=1.1\), and the coefficient for its age covariate is \(\beta_r=0.3\). If age increases by two units while all other covariate values and coefficients remain fixed, find the new predictor in two ways.

First, use the change result. Here \(\Delta=2\), so the predictor change is \(\beta_r\Delta=(0.3)(2)=0.6\). The new predictor is \(1.1+0.6=1.7\).

Equivalently, write the old predictor as the unchanged contributions plus the age contribution \(x_{ir}(0.3)\). Replacing \(x_{ir}\) with \(x_{ir}+2\) adds \(2(0.3)=0.6\) to that sum, giving \(1.7\). Both calculations agree.

A Categorical-Covariate Calculation

Covariates need not be measured on a continuous numerical scale. A two-category predictor can be represented by an indicator with values 0 and 1. In the linear predictor, that indicator’s contribution is zero for the category coded 0 and its coefficient for the category coded 1. The meaning of this coefficient depends on the model and coding; the arithmetic is still the same weighted sum.

Worked Example: A Binary Indicator in the Predictor

Suppose a model’s predictor for a patient is \(\eta_i=0.2x_{i1}-0.5x_{i2}+0.9x_{i3}\), where \(x_{i1}\) is a measurement, \(x_{i2}\) is another numerical covariate, and \(x_{i3}\) is a 0-or-1 indicator. For one patient, the values are \(x_{i1}=4\), \(x_{i2}=2\), and \(x_{i3}=1\). Calculate the predictor.

The three contributions are \(0.2(4)=0.8\), \(-0.5(2)=-1\), and \(0.9(1)=0.9\). Their sum is

$$ \eta_i=0.8-1+0.9=0.7. $$

If only the indicator changed from 1 to 0, its contribution would change from \(0.9\) to \(0\), so the predictor would decrease by \(0.9\), from \(0.7\) to \(-0.2\). This comparison changes the predictor while holding the other covariate values and all coefficients fixed.

Common Mistakes and Why the Predictor Matters

  • Treating coefficients as observation-specific. The wrong reasoning is that each patient gets a different age coefficient because each patient has a different age. The correction is that the age values vary by patient, while the model’s age coefficient is shared.
  • Calling a covariate value the predictor. A value such as \(x_{i1}=6\) is only one input. The predictor is the sum of all covariate contributions, such as \(x_{i1}\beta_1+x_{i2}\beta_2\).
  • Ignoring coefficient signs. A positive covariate value multiplied by a negative coefficient contributes a negative quantity. Calculate each product with its sign before adding.
  • Interpreting the predictor as a response without checking the scale. The predictor is on the link scale in a GLM. A probability, expected count, or other mean is obtained through the model’s link relationship, not by assuming \(\eta_i\) itself is that response-scale quantity.

The linear predictor matters because it is the part of a GLM that directly combines covariate information with model coefficients. It gives a compact, observation-specific value that can be compared across covariate profiles and then connected to the modeled mean through the link. Keeping the roles of values and coefficients clear makes both calculations and interpretations more reliable.

Key takeaway: For a given model, calculate an observation’s linear predictor by multiplying each of its covariate values by the corresponding shared coefficient and adding the products. Covariates determine how the shared coefficients combine for that observation; the predictor is generally on the link scale rather than the response scale.

Check Your Understanding

Use the weighted-sum definition and keep the predictor scale distinct from the response scale.

  1. A model has coefficients \(\beta_1=0.6\) and \(\beta_2=-0.4\). An observation has covariate values \(x_{i1}=2\) and \(x_{i2}=3\). What is its linear predictor?
  2. In a model used for several patients, which quantities are shared across patients: covariate values, coefficients, or both?
  3. Two observations have identical values for every covariate in the same model. What does the difference formula imply about their predictors?
  4. If a covariate with coefficient \(-0.7\) increases by 3 units while all other quantities stay fixed, by how much does the predictor change?
  5. Why is it not generally correct to call a GLM linear predictor a predicted probability or expected response?
Clinical Biostats