Tutorials › Exam SRM - Statistics for Risk Modeling › Marginal Effects Through The Inverse Link

Exam SRM · Exponential-Family Models · Tutorial 289 of 926

Marginal Effects Through The Inverse Link

Learn to calculate and interpret the change in a GLM conditional mean per unit predictor change under identity, log, and logit links.

Intermediate 10 min read

What You'll Learn

  • Apply the chain rule to obtain a predictor’s marginal effect on the conditional mean
  • Calculate marginal effects for identity, log, and logit links
  • Interpret the role of the conditional mean in nonlinear-link effects
  • Distinguish a local derivative from a finite predictor change
  • Recognize when a coefficient is, and is not, the marginal effect

Why the Link Scale and Mean Scale Give Different Effects

A generalized linear model (GLM) describes a conditional mean through a link function. A predictor coefficient first describes a change in the linear predictor, \(\eta\); the practical question is often how the conditional mean changes when a predictor changes. These quantities are equal under an identity link, but generally not under a nonlinear link.

The distinction matters when interpreting fitted models. For example, a log-link coefficient describes a change on the log-mean scale, while a logit-link coefficient describes a change on the log-odds scale. To express a predictor’s effect on the mean scale, use the inverse link and the chain rule.

Definition: Let \(Y\) be a response, let \(x_j\) be a continuous predictor, and let \(\mu=E[Y\mid \mathbf{x}]\) be the conditional mean at predictor vector \(\mathbf{x}\). A GLM specifies \(g(\mu)=\eta\), where \(g\) is the link and \(\eta=\beta_0+\sum_j\beta_jx_j\) is the linear predictor. The marginal effect of \(x_j\) at a given predictor vector is the derivative \(\partial\mu/\partial x_j\), with the other predictors held fixed.

This derivative is local: it describes the instantaneous rate of change at the specified predictor values. For a finite change in \(x_j\), calculate the two conditional means and subtract them. A derivative is not generally the exact change over a whole unit.

The Chain-Rule Formula

Write the conditional mean as \(\mu=g^{-1}(\eta)\). If the inverse link is differentiable and the linear predictor is linear in \(x_j\), then \(\partial\eta/\partial x_j=\beta_j\). The chain rule gives the general marginal-effect formula.

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

The first factor depends on the link and, for nonlinear links, usually on the current predictor values. Consequently, the same coefficient can imply different mean-scale effects at different covariate profiles. The derivative is conditional on the other predictors being held fixed; it is not automatically an average effect over a population.

1
Identify the inverse link.
Express the mean as \(\mu=g^{-1}(\eta)\).
2
Differentiate with respect to the linear predictor.
Find \(d\mu/d\eta\), retaining any dependence on \(\eta\) or \(\mu\).
3
Multiply by the predictor coefficient.
Since \(\partial\eta/\partial x_j=\beta_j\), the marginal effect is \((d\mu/d\eta)\beta_j\).
4
Evaluate at the specified predictors.
For a finite change, compute the means at both predictor values instead of treating the derivative as an exact difference.

Marginal Effects for Three Common Links

For an identity link, \(g(\mu)=\mu\), so \(\mu=\eta\) and \(d\mu/d\eta=1\). Therefore, the marginal effect of \(x_j\) is \(\beta_j\), constant across predictor values.

For a log link, \(g(\mu)=\log(\mu)\), so \(\mu=\exp(\eta)\). Differentiating gives \(d\mu/d\eta=\exp(\eta)=\mu\), and hence the marginal effect is \(\mu\beta_j\). A log-link mean must be positive. The distribution of the response determines other aspects of the model, but this derivative follows from the log mean relation.

For a logit link, \(g(\mu)=\log\{\mu/(1-\mu)\}\), where \(0<\mu<1\). The inverse link is \(\mu=1/(1+\exp(-\eta))\). Its derivative is \(\mu(1-\mu)\), giving a mean-scale marginal effect of \(\mu(1-\mu)\beta_j\).

LinkInverse linkMarginal effect for \(x_j\)
Identity\(\mu=\eta\)\(\beta_j\)
Log\(\mu=\exp(\eta)\)\(\mu\beta_j\)
Logit\(\mu=1/(1+\exp(-\eta))\)\(\mu(1-\mu)\beta_j\)

Why the Logit Derivative Has the Factor \(\mu(1-\mu)\)

For the logit link, set \(\mu(\eta)=\exp(\eta)/(1+\exp(\eta))\). Differentiate using the quotient rule. The numerator derivative is \(\exp(\eta)\), and the denominator derivative is also \(\exp(\eta)\), so

$$ \frac{d\mu}{d\eta} = \frac{\exp(\eta)(1+\exp(\eta))-\exp(\eta)\exp(\eta)} {(1+\exp(\eta))^2} = \frac{\exp(\eta)}{(1+\exp(\eta))^2}. $$

Since \(\mu=\exp(\eta)/(1+\exp(\eta))\) and \(1-\mu=1/(1+\exp(\eta))\), their product is exactly the derivative:

$$ \frac{d\mu}{d\eta}=\mu(1-\mu) \quad\Longrightarrow\quad \frac{\partial\mu}{\partial x_j} = \mu(1-\mu)\beta_j. $$

This also explains why a logit coefficient is not generally a fixed change in probability. The coefficient scales the local effect, while the factor \(\mu(1-\mu)\) changes with the fitted mean.

Worked Example: Identity-Link Mean

A hypothetical model for annual service costs, measured in thousands of dollars, assumes \(Y\mid x,z\sim N(\mu,\sigma^2)\) with known \(\sigma^2=4\). It uses an identity link and \(\eta=\mu=12+1.5x-0.4z\). At \(x=4\) and \(z=5\), calculate the fitted mean and the marginal effect of \(x\). Also calculate the exact fitted-mean change when \(x\) rises by \(0.2\) and \(z\) is held fixed.

Method. Under the identity link, the marginal effect is the coefficient of \(x\). First calculate the mean at the stated predictor values:

$$ \eta=12+(1.5)(4)-(0.4)(5)=12+6-2=16. $$

Thus the fitted conditional mean is \(16\) thousand dollars. Since \(d\mu/d\eta=1\) and \(\partial\eta/\partial x=1.5\),

$$ \frac{\partial\mu}{\partial x}=1(1.5)=1.5 $$

thousand dollars per one-unit increase in \(x\). For the finite change, the predictor rises from \(4\) to \(4.2\):

$$ \mu(4.2,5)=12+(1.5)(4.2)-(0.4)(5)=12+6.3-2=16.3, \qquad 16.3-16=0.3. $$

The exact increase is \(0.3\) thousand dollars, which also equals \((1.5)(0.2)\). Check: the linear identity-link mean changes by its slope times the predictor change. The calculation avoids the mistake of multiplying the slope by the fitted mean; \(1.5(16)=24\) is not the marginal effect.

Worked Example: Log-Link Mean

For a hypothetical Poisson count response, suppose \(Y\mid x\sim\operatorname{Poisson}(\mu)\) and \(\log(\mu)=\ln(2)+(\ln 2)x\). Calculate the mean and marginal effect at \(x=1\), then find the exact mean change when \(x\) increases from \(1\) to \(2\).

Method. Apply the inverse log link to obtain \(\mu=\exp(\eta)\). At \(x=1\),

$$ \eta=\ln(2)+\ln(2)=\ln(4), \qquad \mu=\exp(\ln(4))=4. $$

For a log link, \(d\mu/d\eta=\mu\), and \(\partial\eta/\partial x=\ln 2\). Therefore, at \(x=1\),

$$ \frac{\partial\mu}{\partial x} = \mu\ln(2) = 4\ln(2) \approx 2.7726. $$

This is the local rate of change in the expected count per unit of \(x\) at \(x=1\). For the exact change from \(x=1\) to \(x=2\), evaluate the mean again:

$$ \eta(2)=\ln(2)+2\ln(2)=\ln(8), \qquad \mu(2)=8, \qquad \mu(2)-\mu(1)=8-4=4. $$

Equivalently, a one-unit increase multiplies the mean by \(\exp(\ln 2)=2\). Check: the mean doubles from \(4\) to \(8\). The exact increase is \(4\), not the derivative \(2.7726\); using the local derivative as an exact one-unit change is the mistake to avoid.

Worked Example: Logit Mean

A hypothetical Bernoulli response indicates whether a submitted document requires correction. Suppose its conditional mean is \(P(Y=1\mid x)=\mu\), with \(\log\{\mu/(1-\mu)\}=-\ln(3)+(\ln 2)x\). Find the fitted probabilities at \(x=0\) and \(x=1\), the marginal effect at each point, and the finite probability change between those predictor values.

Method. Invert the logit link. At \(x=0\), \(\eta=-\ln(3)\), so the odds are \(\exp(\eta)=1/3\), giving

$$ \mu(0)=\frac{1/3}{1+1/3}=\frac14=0.25. $$

At \(x=1\), \(\eta=-\ln(3)+\ln(2)=\ln(2/3)\). The odds are \(2/3\), and thus

$$ \mu(1)=\frac{2/3}{1+2/3}=\frac25=0.40. $$

The marginal effect is \(\mu(1-\mu)\beta_1\), where \(\beta_1=\ln 2\). At \(x=0\),

$$ \left.\frac{\partial\mu}{\partial x}\right|_{x=0} = \frac14\left(\frac34\right)\ln(2) = \frac{3\ln(2)}{16} \approx 0.1300. $$

At \(x=1\),

$$ \left.\frac{\partial\mu}{\partial x}\right|_{x=1} = \frac25\left(\frac35\right)\ln(2) = \frac{6\ln(2)}{25} \approx 0.1664. $$

The finite change is \(0.40-0.25=0.15\), or 15 percentage points. Check: the odds double from \(1/3\) to \(2/3\), as required by the coefficient \(\ln 2\). The effect is not a constant probability increase of \(\ln 2\); the coefficient is on the log-odds scale, and the local probability effect depends on \(\mu\).

Interpreting and Using Marginal Effects

A marginal effect has units of conditional-mean units per predictor unit. For a binary response, the mean is a probability, so its derivative is expressed in probability units per predictor unit; multiplying a local derivative by 100 converts it to percentage points per unit. For a count response, it is expected counts per predictor unit. Always identify the units of both the response mean and the predictor.

The three links lead to different interpretations. Under an identity link, a one-unit predictor increase changes the fitted mean by \(\beta_j\), provided the model remains applicable. Under a log link, \(\beta_j\) determines a multiplicative change in the mean for a finite one-unit increase: the ratio of means is \(\exp(\beta_j)\). The derivative, however, is \(\mu\beta_j\), so its numerical value depends on the starting mean. Under a logit link, the coefficient changes log odds by \(\beta_j\) per unit, while the local probability change is \(\mu(1-\mu)\beta_j\).

A derivative is appropriate for a continuous predictor and a sufficiently small change. If the predictor is categorical, compare fitted means between its categories instead; a derivative with respect to a category label is not meaningful. Likewise, for a substantial continuous change, compute the two fitted means directly. These distinctions are aligned with the SOA Exam SRM (Statistics for Risk Modeling) syllabus.

Key takeaway: For a differentiable inverse link, the mean-scale marginal effect is \((g^{-1})'(\eta)\beta_j\). It equals the coefficient for the identity link, the mean times the coefficient for the log link, and \(\mu(1-\mu)\) times the coefficient for the logit link.

Check Your Understanding

For each problem, state the requested marginal effect at the specified predictor values. Treat a finite change separately when one is requested.

  1. A Gaussian identity-link model has \(\mu=7+2.4x-0.5z\). At \(x=2,z=4\), find the fitted mean and the marginal effect of \(x\). (Answer: fitted mean \(9.8\); marginal effect \(2.4\) mean units per unit of \(x\).)
  2. A log-link model has \(\log(\mu)=\ln(5)+0.1x\). Find the marginal effect at \(x=0\). (Answer: \(0.5\) mean units per unit of \(x\).)
  3. A logit model has \(\eta=\ln(4)-0.5x\). Find the fitted mean and marginal effect at \(x=0\). (Answer: \(\mu=0.8000\); marginal effect \(-0.0800\) probability units per unit of \(x\).)
  4. A logit model has \(\eta=-\ln(3)+(\ln 2)x\). Find the fitted means at \(x=0\) and \(x=1\), their exact difference, and the local marginal effect at \(x=0\). (Answer: \(0.25\), \(0.40\), exact difference \(0.15\); local marginal effect \(3\ln(2)/16\approx0.1300\).)
  5. At a specified predictor profile, an identity-link model has mean \(3\) and coefficient \(\beta_j=0.2\); a log-link model has mean \(3\) and coefficient \(\beta_j=0.2\); a logit-link model has mean \(0.6\) and coefficient \(\beta_j=0.2\). Calculate each model’s marginal effect at that profile. (Answer: identity \(0.2000\); log \(0.6000\); logit \(0.0480\), each in conditional-mean units per predictor unit.)
Clinical Biostats