Tutorials › Exam SRM - Statistics for Risk Modeling › Translating Linear Predictors Through GLM Links

Exam SRM · GLM Modeling Cases · Tutorial 862 of 926

Translating Linear Predictors Through GLM Links

Translate a fitted linear predictor to its response-scale mean and distinguish link-scale coefficients from response-scale effects.

Advanced 10 min read

What You'll Learn

  • Identify the linear predictor and inverse-link calculation in a GLM.
  • Convert logit predictors into fitted probabilities.
  • Convert log predictors into positive fitted means.
  • Interpret identity-link coefficients as direct mean changes.
  • Compare response-scale effects with link-scale coefficient changes.
  • Detect common errors when applying a link or inverse link.

From a Linear Predictor to a Fitted Mean

A generalized linear model (GLM) connects predictors to an outcome’s conditional mean through a link function. This means a coefficient first changes a quantity on the link scale; the corresponding change in the fitted mean depends on the inverse link. For the logit, log, and identity links, that distinction is essential: the same numerical coefficient does not have the same response-scale meaning.

For an observation with predictor vector \(\mathbf{x}\) and coefficient vector \(\boldsymbol{\beta}\), the linear predictor is \(\eta=\mathbf{x}^{\mathsf T}\boldsymbol{\beta}\). It includes the intercept when the model has one. A GLM specifies a link \(g\) so that the conditional mean \(\mu=E[Y\mid\mathbf{x}]\) satisfies \(g(\mu)=\eta\). Therefore, to obtain a fitted mean, calculate \(\eta\) first and then apply the inverse link \(g^{-1}\).

Definition: In a GLM, the linear predictor is \(\eta=\mathbf{x}^{\mathsf T}\boldsymbol{\beta}\), and the link function relates the conditional mean to that predictor through \(g(\mu)=\eta\). The fitted conditional mean is \(\hat{\mu}=g^{-1}(\hat{\eta})\). The inverse link is applied to the entire linear predictor, including the intercept and all predictor terms.

The link does not by itself specify the full probability distribution of \(Y\); the response distribution and its parameters must also be specified. The examples below state those assumptions explicitly. No interest-rate or mortality assumption is needed for these statistical models.

Three Links and Their Inverse Calculations

The logit link is commonly used when \(Y\) is Bernoulli, taking values 0 and 1. Its conditional mean is a probability, so it must be between 0 and 1. The logit link and inverse-logit transformation are

$$ g(\mu)=\log\left(\frac{\mu}{1-\mu}\right), \qquad g^{-1}(\eta)=\frac{e^\eta}{1+e^\eta} =\frac{1}{1+e^{-\eta}}. $$

The log link is used when a positive conditional mean is appropriate. Its inverse is the exponential function:

$$ g(\mu)=\log(\mu), \qquad g^{-1}(\eta)=e^\eta. $$

The identity link leaves the mean on its original scale:

$$ g(\mu)=\mu, \qquad g^{-1}(\eta)=\eta. $$

An identity link does not automatically keep fitted means within a desired range. The model must be appropriate for the response, and its fitted values should be checked for plausibility. In contrast, the inverse-logit always gives a value strictly between 0 and 1, and the inverse-log always gives a positive value.

Worked Example: Converting Logit Predictors to Probabilities

A hypothetical insurer models whether an applicant completes a voluntary wellness assessment. Let \(Y=1\) indicate completion and \(Y=0\) otherwise. Assume \(Y\mid x\) is Bernoulli with probability \(p(x)\), and use the logit model \(\log(p(x)/(1-p(x)))=-\log 3+x\log 3\), where \(x\) is a score taking values 0, 1, or 2. Find the fitted probability for each score. No interest-rate or mortality assumption is involved.

Method. First evaluate the linear predictor, then apply the inverse-logit. The intercept is \(-\log 3\), and the coefficient of \(x\) is \(\log 3\).

For \(x=0\), \(\hat{\eta}=-\log 3+0=-\log 3\). Since \(e^{-\log 3}=1/3\),

$$ \hat{p}(0)=\frac{1/3}{1+1/3} =\frac{1/3}{4/3} =\frac14=0.2500. $$

For \(x=1\), \(\hat{\eta}=-\log 3+\log 3=0\), so

$$ \hat{p}(1)=\frac{e^0}{1+e^0}=\frac12=0.5000. $$

For \(x=2\), \(\hat{\eta}=-\log 3+2\log 3=\log 3\), and \(e^{\log 3}=3\). Thus

$$ \hat{p}(2)=\frac{3}{1+3}=\frac34=0.7500. $$

Check. All three fitted probabilities lie between 0 and 1, as required for a Bernoulli mean. The coefficient \(\log 3\) is an increment in the logit predictor per score unit; the calculated probabilities show the response-scale values at the specified scores. The common mistake avoided here is reporting \(\hat{\eta}\) itself as a probability.

Worked Example: Converting a Log Predictor to a Positive Mean

Suppose a hypothetical service team models the number \(Y\) of follow-up requests per account. Assume \(Y\mid x\) has a Poisson distribution with mean \(\lambda(x)\), and the fitted log-link model is \(\log(\lambda(x))=\log 4+x\log 2\). Calculate the fitted mean number of requests for \(x=0,1,2\). No interest-rate or mortality assumption is involved.

Method. Evaluate the predictor and exponentiate it, because the inverse of the log link is \(e^\eta\).

At \(x=0\), \(\hat{\eta}=\log 4\), so \(\hat{\lambda}(0)=e^{\log 4}=4\).

At \(x=1\), \(\hat{\eta}=\log 4+\log 2=\log 8\), so \(\hat{\lambda}(1)=e^{\log 8}=8\).

At \(x=2\), \(\hat{\eta}=\log 4+2\log 2=\log 4+\log 4=\log 16\), so \(\hat{\lambda}(2)=e^{\log 16}=16\).

Check. Each fitted mean is positive, as required by the log link, and the values are 4, 8, and 16 requests per account. Do not report \(\log 16\) as the mean at \(x=2\); it is the predictor on the link scale. The Poisson assumption specifies the conditional distribution here, with its parameter equal to the conditional mean.

Worked Example: Interpreting an Identity-Link Predictor

A hypothetical study models annual claim cost \(Y\), in dollars, by a normal conditional distribution \(Y\mid x\sim N(\mu(x),150^2)\). Here the second parameter is the variance, so the conditional standard deviation is $150. The fitted identity-link model is \(\mu(x)=1200-150x\), where \(x\) is a nonnegative risk score. Find the fitted mean at \(x=0,1,2\), and compare the changes. No interest-rate or mortality assumption is involved.

Method. With the identity link, the inverse link is the identity function. The fitted mean is the linear predictor itself.

At \(x=0\), \(\hat{\eta}=1200-150(0)=1200\), so \(\hat{\mu}(0)=\$1{,}200\).

At \(x=1\), \(\hat{\eta}=1200-150(1)=1200-150=1050\), so \(\hat{\mu}(1)=\$1{,}050\).

At \(x=2\), \(\hat{\eta}=1200-150(2)=1200-300=900\), so \(\hat{\mu}(2)=\$900\).

Check. The fitted means are positive and decrease by $150 for each one-unit increase in the score. Here the coefficient is a direct change in the fitted mean because the link is identity. In another link model, a coefficient generally cannot be read as a fixed dollar change. The conditional variance is \(150^2=22{,}500\) dollars squared at each score, as specified by the example’s normal model.

Why the Response-Scale Effect Depends on the Link

The distinction between coefficient and response-scale effect follows directly from the inverse-link relationship. If predictor \(x_j\) enters linearly with coefficient \(\beta_j\), then \(\eta=\beta_0+\beta_jx_j+\cdots\). A one-unit increase in \(x_j\), holding the other predictors fixed, changes \(\eta\) by \(\beta_j\). But the resulting change in \(\mu=g^{-1}(\eta)\) depends on where \(\eta\) starts and on the inverse link’s shape.

For a continuous predictor, the local response-scale change can be obtained by differentiating \(\mu=g^{-1}(\eta)\) with respect to \(x_j\). The chain rule gives the following justification:

$$ \frac{\partial\mu}{\partial x_j} =\frac{d\,g^{-1}(\eta)}{d\eta} \frac{\partial\eta}{\partial x_j} =(g^{-1})'(\eta)\beta_j. $$

Thus the coefficient is multiplied by the slope of the inverse link at the current predictor value. For the three links in this tutorial, the derivatives are:

$$ \begin{array}{c|c} \text{Link} & \displaystyle\frac{\partial\mu}{\partial x_j}\\ \hline \text{Logit} & \beta_j\mu(1-\mu)\\ \text{Log} & \beta_j e^\eta=\beta_j\mu\\ \text{Identity} & \beta_j \end{array} $$

For example, under a logit link the local change depends on \(\mu\), so it varies with the starting predictor even when \(\beta_j\) is fixed. Under a log link the local change also depends on the current mean. Under the identity link it is constant and equals the coefficient. For a finite one-unit change, the exact response-scale difference is \(g^{-1}(\eta+\beta_j)-g^{-1}(\eta)\); the derivative describes a local rate of change, not necessarily that entire finite difference.

LinkFitted meanMeaning of a coefficient increment on the link scaleResponse-scale caution
Logit\(1/(1+e^{-\eta})\)Adds \(\beta_j\) to the linear predictor for a one-unit predictor increase.The corresponding probability change depends on the starting predictor.
Log\(e^\eta\)Adds \(\beta_j\) to the log of the mean.The corresponding mean change depends on the starting mean.
Identity\(\eta\)Adds \(\beta_j\) to the predictor.The same increment is a direct mean change, subject to plausibility of fitted values.

Common Exam Trap: Inverting the Wrong Quantity

A frequent error is to stop after computing \(\eta\), or to apply an inverse link only to part of the predictor. For the logit model in the first example, at \(x=0\) the predictor is \(-\log 3\). Treating that value as the probability gives the wrong calculation \(\hat{p}=-\log 3\), which is negative and cannot be a probability. The correction is to transform the complete predictor:

$$ \hat{p}=\frac{e^{-\log 3}}{1+e^{-\log 3}} =\frac{1/3}{1+1/3} =0.2500. $$

A related log-link error is to report \(\eta\) as the fitted mean. If \(\eta=\log 16\), the fitted mean is \(e^{\log 16}=16\), not \(\log 16\). For an identity link, by contrast, no exponentiation or inverse-logit is required. Always identify the stated link before converting the predictor.

Key takeaway: Calculate the complete linear predictor first, then apply the inverse of the specified link. A coefficient always describes an increment on the link scale; whether that becomes a probability change, a change in a positive mean, or a direct mean change depends on the link and the starting predictor.

Check Your Understanding

For each problem, identify the relevant inverse-link calculation before giving the fitted mean or probability.

  1. A Bernoulli response has logit predictor \(\eta=-\log 4+x\log 2\). Find the fitted probability at \(x=1\). (Answer: \(1/3=0.3333\).)
  2. A Poisson response has log-link predictor \(\eta=\log 5+x\log 2\). Find the fitted mean at \(x=2\). (Answer: \(20\).)
  3. A normal response has identity-link conditional mean \(\mu=70+6x\) and conditional variance \(9\). Find the fitted mean at \(x=3\), and state the conditional standard deviation. (Answer: fitted mean \(88\); standard deviation \(3\).)
  4. In a logit model, the current fitted probability is \(0.5\), and a one-unit increase in \(x\) changes the predictor by \(\beta_x=0.8\). Find the exact new probability and the exact probability-point change. (Answer: new probability \(1/(1+e^{-0.8})=0.6900\); increase \(0.1900\).)
  5. A log-link model has current fitted mean \(12\), and increasing a predictor by one unit changes the linear predictor by \(\log(1.5)\). Find the new fitted mean and the absolute increase. (Answer: new mean \(18\); increase \(6\).)
Clinical Biostats