Tutorials › Exam SRM - Statistics for Risk Modeling › Matching GLM Links to Mean Behavior

Exam SRM · GLM Modeling Cases · Tutorial 872 of 926

Matching GLM Links to Mean Behavior

Choose and interpret links by checking how they map the linear predictor to a meaningful response-scale mean.

Advanced 10 min read

What You'll Learn

  • Distinguish a binomial success probability from the mean count of successes
  • Translate logit, log, and identity predictors to response-scale means
  • Interpret logit effects through odds and log-link effects multiplicatively
  • Check the allowed range of fitted means for binomial, Poisson, and Gamma responses
  • Recognize when an identity or log link can produce invalid predictions

Why Link Choice Requires a Response-Scale Check

A generalized linear model (GLM) specifies a distributional family for the response and relates its conditional mean to predictors through a link function. The linear predictor is not generally the fitted mean itself. A link choice is useful only if its inverse maps the predictor to means that are meaningful for the response being modeled.

This check is especially important when comparing logit, log, and identity links. The logit link naturally restricts a binomial success probability to the unit interval. A log link produces a positive mean, which fits the usual mean requirements for Poisson and Gamma responses. An identity link is directly interpretable as an additive model for the mean, but does not itself enforce the response’s allowable range.

Definition: In a GLM, the conditional response mean is \(\mu=E[Y\mid X]\), and the linear predictor is \(\eta=\beta_0+\beta_1x_1+\cdots+\beta_px_p\). A link function \(g\) relates them by \(g(\mu)=\eta\); equivalently, \(\mu=g^{-1}(\eta)\). The response family determines the distributional form and allowable means, while the link determines how predictors map to those means.

For a binomial response, be precise about which mean is being discussed. If \(Y\) is the number of successes in \(n\) trials, then \(Y\sim\operatorname{Binomial}(n,p)\) and \(E[Y\mid X]=np\), which ranges from 0 to \(n\). The success probability \(p\), or the response proportion \(Y/n\), ranges from 0 to 1. A link is conventionally applied to \(p\); the corresponding expected count is then \(np\).

Three Links and Their Response-Scale Meanings

The three links have different inverse functions and interpretations. The link does not change the outcome family; it changes the way the mean depends on the predictors.

LinkRelationshipResponse-scale interpretationRange check
Logit\(\log\{p/(1-p)\}=\eta\)A one-unit predictor increase adds to the log-odds; exponentiating its coefficient gives an odds ratio.The fitted probability is between 0 and 1.
Log\(\log(\mu)=\eta\)A one-unit predictor increase multiplies the mean by the exponential of its coefficient.The fitted mean is positive.
Identity\(\mu=\eta\)A one-unit predictor increase adds its coefficient to the mean.The fitted mean must be checked against the response family’s allowable range.

For binomial outcomes, the logit link is applied to \(p\). The logit inverse is \(p=e^\eta/(1+e^\eta)\). A log link for \(p\) would instead give \(p=e^\eta\), so it is valid only where this value is at most 1. An identity link for \(p\) is valid only where the fitted probabilities remain in \([0,1]\). If the model is described in terms of the binomial count mean \(np\), the corresponding allowable range is \([0,n]\), not \([0,1]\).

For Poisson outcomes, the mean is nonnegative, and a nondegenerate Poisson model has a positive mean. The log link ensures a positive mean for every finite \(\eta\). An identity link can be used only if the resulting means are nonnegative throughout the covariate region where predictions are required. For Gamma outcomes, the response is positive and the usual Gamma mean is strictly positive; the log link ensures this, while an identity-link model requires a separate positivity check.

Why the Logit and Log Inverses Enforce Bounds

The inverse functions explain why some links are safer than others for particular mean ranges. For the logit link, solving \(\log\{p/(1-p)\}=\eta\) gives \(p/(1-p)=e^\eta\), and hence \(p=e^\eta/(1+e^\eta)\). Since \(e^\eta>0\), the denominator is larger than the numerator, so \(0<p<1\) for every finite \(\eta\). For a grouped binomial count, multiplying by the trial count gives \(0<np<n\).

For the log link, \(\log(\mu)=\eta\) implies \(\mu=e^\eta\). The exponential is positive for every finite real \(\eta\). Thus the log link guarantees a positive mean without imposing a separate predictor-range restriction. By contrast, with the identity link \(\mu=\eta\), so positivity or boundedness must be established from the fitted linear predictor itself.

1
Identify the response and its mean.
For a binomial count, state both the success probability \(p\) and, if needed, the count mean \(np\). For Poisson or Gamma responses, identify the conditional mean \(\mu\).
2
Apply the inverse link.
Compute the fitted probability or mean from the linear predictor before interpreting it.
3
Check the response-scale range.
Verify that a binomial probability is in \([0,1]\), a binomial count mean is in \([0,n]\), and Poisson or Gamma means satisfy their positivity requirements.
4
Interpret changes on the correct scale.
Logit coefficients describe changes in log-odds, log-link coefficients describe multiplicative mean changes, and identity-link coefficients describe additive mean changes.

Worked Examples

Worked Example: Comparing Binomial Probability and Count Means

A hypothetical quality team tests 24 components from each production batch. Let \(Y\) be the number that pass inspection, and suppose \(Y\mid x\sim\operatorname{Binomial}(24,p(x))\), where \(x\) is a centered process setting. A logistic model has \(\eta=-1+0.5x\). Find the probability of a pass and expected number of passing components at \(x=2\). Then assess an identity-link probability model \(p(x)=0.2+0.1x\) at \(x=3\) and \(x=9\). Name the method and the common mistake avoided.

Method. In the logistic model, first calculate \(\eta\), then apply the inverse logit to obtain \(p\), and multiply by \(n=24\) for the expected count.

At \(x=2\), \(\eta=-1+0.5(2)=0\). Therefore \(p=e^0/(1+e^0)=1/2=0.5\). The expected number passing is \(np=24(0.5)=12\). The probability is 0.5; the mean count is 12.

For the identity-link probability model at \(x=3\), \(p=0.2+0.1(3)=0.5\), so the expected count is \(24(0.5)=12\). This prediction is valid: \(p\in[0,1]\) and \(np\in[0,24]\).

At \(x=9\), the identity model gives \(p=0.2+0.1(9)=1.1\). The corresponding count mean would be \(24(1.1)=26.4\), exceeding the maximum possible count of 24. The prediction is invalid.

Check. At the valid \(x=3\) prediction, \(12\) expected passes is no greater than 24 trials. At \(x=9\), the probability exceeds 1 and the count mean exceeds 24, confirming invalidity. The common mistake avoided is treating the binomial count mean as though its range were \([0,1]\): it is the probability or proportion that has that range; the count mean is in \([0,24]\).

Worked Example: Choosing a Link for Poisson Counts

A hypothetical monitoring team records the number of sensor alerts in a fixed one-day window. Conditional on a predictor \(x\), assume \(Y\mid x\sim\operatorname{Poisson}(\mu(x))\). A log-link model is \(\log(\mu)=\log(4)+x\log(2)\). Calculate the fitted mean at \(x=2\), interpret the coefficient of \(x\), and check the candidate identity-link model \(\mu=4+4x\) over the stated prediction range \(-2\leq x\leq2\).

Method. Invert the log link to obtain the response-scale mean. For the identity model, inspect the minimum and maximum linear predictions over the specified range.

At \(x=2\), \(\eta=\log(4)+2\log(2)=\log(4)+\log(4)=\log(16)\). Thus \(\mu=e^\eta=16\) alerts per one-day window.

A one-unit increase in \(x\) adds \(\log(2)\) to \(\log(\mu)\), so it multiplies the mean by \(e^{\log(2)}=2\). For example, the fitted mean at \(x=0\) is \(e^{\log(4)}=4\), and at \(x=1\) it is \(e^{\log(4)+\log(2)}=8\), exactly twice as large.

For the identity model, \(\mu=4+4x\). At the lower endpoint \(x=-2\), \(\mu=4+4(-2)=-4\); at the upper endpoint \(x=2\), \(\mu=4+8=12\). The negative fitted mean at \(x=-2\) is impossible for a Poisson response, so this identity model is not valid across the required range.

Check. The log-link fitted mean at \(x=2\) is positive, and the stated identity model fails the nonnegative-mean check at \(x=-2\). The common mistake avoided is approving an identity link because it gives plausible predictions at some predictor values while ignoring other values where predictions are required.

Worked Example: Comparing Gamma Log and Identity Links

A hypothetical insurer models positive claim-adjustment expenses \(Y\) in dollars. Assume \(Y\mid x\) follows a Gamma distribution with conditional mean \(\mu(x)\) and variance \(\phi\mu(x)^2\), where \(\phi>0\). Consider the log-link model \(\log(\mu)=\log(100)+x\log(1.1)\). Find the mean at \(x=2\) and interpret the slope. Then assess the identity-link candidate \(\mu=80+20x\) over the observed predictor range \(0\leq x\leq4\), and at a requested extrapolation point \(x=-5\).

Method. Exponentiate the log-link predictor to obtain the Gamma mean. For the identity model, evaluate its range on the observed domain and separately check the requested extrapolation.

At \(x=2\), \(\eta=\log(100)+2\log(1.1)=\log(100)+\log(1.21)=\log(121)\). Therefore \(\mu=e^\eta=121\) dollars.

For each one-unit increase in \(x\), the log-link mean is multiplied by \(e^{\log(1.1)}=1.1\), a 10% increase. This is a multiplicative change in the conditional mean, not an increase of 10 dollars.

For the identity model, \(\mu=80+20x\). Over \(0\leq x\leq4\), it increases from \(80+20(0)=80\) dollars to \(80+20(4)=160\) dollars, so all fitted means on that range are positive. At \(x=-5\), however, it gives \(80+20(-5)=-20\) dollars, which is invalid for a positive Gamma response. The identity model is acceptable on the stated observed range, but not for that requested extrapolation.

Check. The log-link prediction is \(121>0\); the identity predictions range from 80 to 160 dollars on the observed domain, but the extrapolated prediction is negative. The common mistake avoided is assuming that an identity-link model that is valid within the observed range must remain valid outside it.

How to Choose and Interpret a Link

The response family and the link should be considered together, but neither determines the other automatically. The binomial family describes binary or grouped success data; the link controls how its success probability changes with predictors. The Poisson family describes counts, while its link controls the conditional count mean. The Gamma family describes positive continuous outcomes, while its link controls the conditional positive mean. In every case, assess the fitted mean on the response scale.

The logit link is a natural choice when the modeled quantity is a probability and fitted probabilities must remain in \([0,1]\). The log link is useful when a positive mean is appropriate and multiplicative predictor effects are reasonable. An identity link can be appealing when additive changes in the mean make substantive sense, but its range must be checked over the full domain where fitted values will be used, not just at a reference point.

A familiar link is not a substitute for checking the model’s implications. A log link applied to a binomial probability, for example, yields \(p=e^\eta\), which can exceed 1 unless the predictor is constrained. Likewise, an identity link applied to a binomial probability must keep \(p\) between 0 and 1; if the response is the count of \(n\) trials, the implied mean count must remain between 0 and \(n\). For Poisson identity-link means, nonnegativity is required, and for Gamma identity-link means, strict positivity is required.

Common Exam Traps

  • Confusing a probability with a count mean. For \(Y\sim\operatorname{Binomial}(n,p)\), the probability \(p\) lies in \([0,1]\), while \(E[Y]=np\) lies in \([0,n]\). State which quantity the model is linking.
  • Interpreting coefficients on the wrong scale. A logit coefficient changes log-odds; a log-link coefficient changes log-mean; an identity-link coefficient changes the mean directly.
  • Assuming every link enforces valid predictions. The identity link does not enforce bounds. A log link enforces positivity but does not enforce an upper bound such as \(p\leq1\) for a binomial probability.
  • Checking only fitted values inside the data range. If the model will be used for prediction at new covariate values, check the implied means there too.
  • Confusing family choice with link choice. A link describes the mean-predictor relationship; it does not turn a count response into a continuous response or otherwise replace the outcome family.
Key takeaway: Calculate the inverse-link prediction, then check it against the response’s support. For binomial models distinguish \(p\in[0,1]\) from \(np\in[0,n]\); for Poisson and Gamma models require a nonnegative or strictly positive mean, respectively. Interpret link coefficients only after identifying the scale on which they act.

Check Your Understanding

For each question, identify the response-scale quantity and check that its value is meaningful.

  1. A grouped binomial response has \(n=30\) trials and fitted success probability \(p=0.3\). What is the fitted mean count, and what are the allowable ranges for the probability and count mean? (Answer: Mean count \(=9\); probability range \([0,1]\), count-mean range \([0,30]\).)
  2. A logistic model has linear predictor \(\eta=\log(3)\) for a binomial response with \(n=12\). Find the fitted probability and expected number of successes. (Answer: \(p=0.75\); expected count \(=9\).)
  3. A Poisson identity-link model is \(\mu=2+1.5x\). Calculate the mean at \(x=2\), and decide whether the prediction at \(x=-2\) is valid. (Answer: At \(x=2\), \(\mu=5\), valid; at \(x=-2\), \(\mu=-1\), invalid.)
  4. A Gamma log-link model is \(\log(\mu)=\log(50)+x\log(1.2)\). Find the fitted mean at \(x=3\). (Answer: \(\mu=50(1.2)^3=86.4\), positive and valid as a Gamma mean.)
  5. A binomial model with \(n=25\) uses the identity link \(p=0.1+0.08x\). Check the fitted probability and count mean at \(x=8\), then decide whether the prediction at \(x=12\) is valid. (Answer: At \(x=8\), \(p=0.74\) and mean count \(=18.5\), valid; at \(x=12\), \(p=1.06\) and mean count \(=26.5\), invalid because \(p>1\) and \(26.5>25\).)
Clinical Biostats