Tutorials › Exam SRM - Statistics for Risk Modeling › Choosing The Random Component And Link

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

Choosing The Random Component And Link

Choose a response distribution and link that respect the outcome’s support, keep fitted means valid, and reflect its conditional variance.

Intermediate 10 min read

What You'll Learn

  • Separate the response distribution from the link that connects its mean to predictors
  • Check whether a proposed inverse link can produce only allowable conditional means
  • Match binary, count, positive continuous, and real-valued outcomes to plausible model components
  • Use conditional variance behavior as a diagnostic for distribution choice
  • Identify invalid identity-link setups and other common GLM specification traps

Start With the Outcome, Then Choose the Link

A generalized linear model (GLM) has two choices that must work together: a random component, which specifies the conditional distribution of the response, and a link function, which relates its conditional mean to predictors. The response’s type is the first clue. A binary indicator, an event count, and a positive monetary amount do not have the same support or variance behavior, so they should not be treated as interchangeable merely because each can be assigned a numerical mean.

The link matters because a linear predictor can take any real value. The inverse link must translate those values into means that are allowed for the selected response distribution. A proposed model can therefore be unsuitable even if its predictor has been constructed correctly.

Definition: For observation \(i\), let \(Y_i\) be the response and \(\mathbf{x}_i\) its predictor vector. A GLM specifies a conditional response distribution for \(Y_i\), with conditional mean \(\mu_i=E[Y_i\mid\mathbf{x}_i]\), and relates that mean to the linear predictor by $$ g(\mu_i)=\eta_i=\mathbf{x}_i^{\mathsf T}\boldsymbol{\beta}. $$ Here \(g\) is the link, and \(g^{-1}\) is its inverse, so \(\mu_i=g^{-1}(\eta_i)\). In the usual GLM setup, responses are conditionally independent given their predictors, with distribution and dispersion assumptions appropriate to the chosen family.

Three Checks for a Coherent Model

A practical selection starts with the observed response and proceeds through three checks. These checks narrow the choices; they do not replace assessment of fit or substantive judgment.

1
Check the support.
Identify values the response can take. For example, a binary response takes values 0 and 1, a count takes nonnegative integer values, and a positive continuous measurement takes values above zero. The proposed response distribution must be compatible with those values.
2
Check the mean range.
Determine which values the conditional mean can take under the selected distribution. For every predictor value at which the model will be used, the inverse link must return a mean in that range.
3
Check the variance behavior.
Compare the assumed conditional variance with how variability is expected to change as the mean changes. A mismatch can signal that the response family is not a sensible starting point, even if its support looks plausible.

The support of the response and the range of its mean are related, but they are not identical. A Poisson response, for example, is an integer count, while its conditional mean can be any positive real number. The model predicts the mean of the count distribution, not a requirement that the mean itself be an integer.

Outcome typeCandidate response familyConditional mean rangeCommon link choiceVariance pattern
Binary indicatorBernoulli0 to 1Logit\(\mu_i(1-\mu_i)\)
Nonnegative event countPoissonPositiveLog\(\mu_i\), under the Poisson assumption
Positive, right-skewed continuous amountGammaPositiveLog\(\phi\mu_i^2\), for dispersion \(\phi>0\)
Unbounded continuous measurementNormalAny real numberIdentityConstant conditional variance under the usual model

The table gives common combinations, not mandatory pairings. A link does not change the response distribution, and a response distribution does not dictate that only one link can ever be used. The canonical link is often convenient, but a different valid link may be selected when it gives an appropriate mean relationship. “Valid” is essential: across the predictor values of interest, the inverse link must keep \(\mu_i\) within its permitted range.

Why the Inverse Link Must Respect the Mean Range

The linear predictor \(\eta_i=\mathbf{x}_i^{\mathsf T}\boldsymbol{\beta}\) is not generally bounded. Even if observed predictors lie in a limited range, different coefficients or future predictor values can make \(\eta_i\) negative, very large, or otherwise outside a convenient interval. The inverse link must handle the values the model can produce.

For a Bernoulli response, the conditional mean is a probability and must lie between 0 and 1. With an identity link, \(\mu_i=\eta_i\). Since a linear predictor can be negative or greater than 1, that choice does not guarantee valid Bernoulli means. With the logit link, the inverse link is

$$ g^{-1}(\eta_i)=\frac{e^{\eta_i}}{1+e^{\eta_i}}. $$

For every finite real \(\eta_i\), the numerator is positive and the denominator is greater than the numerator. Thus \(0<g^{-1}(\eta_i)<1\), satisfying the required range.

The same check applies to positive means. The log link has inverse \(g^{-1}(\eta_i)=e^{\eta_i}\), which is positive for every real \(\eta_i\). It is therefore a natural way to ensure positive fitted means for Poisson and Gamma models. This does not establish that either response distribution fits well; it establishes only that the link respects the mean constraint.

Worked Examples: Matching the Components

Worked Example: A Binary Claim Indicator

A hypothetical insurer records whether each sampled household submitted a water-damage claim during one year, with \(Y_i=1\) for a claim and \(Y_i=0\) otherwise. A proposed linear predictor is \(\eta_i=-0.15+0.40x_i\), where \(x_i\) is a recorded risk score. At two households, \(x_i=0\) and \(x_i=2\). Choose a response family and a suitable link, and calculate the fitted means. Explain why the identity link is unsuitable for this setup.

Method and response family. The response is binary, so a Bernoulli random component is appropriate as a starting point. Its conditional mean is the claim probability \(p_i=E[Y_i\mid x_i]\), and its variance is \(p_i(1-p_i)\).

Check the identity link. At \(x_i=0\), \(\eta_i=-0.15\), so the identity link would give \(p_i=-0.15\), which is impossible. At \(x_i=2\), \(\eta_i=-0.15+0.40(2)=0.65\), which is a possible probability, but one valid value does not make the link valid at both predictor values.

Use the logit link. At \(x_i=0\), \(p_i=1/(1+e^{0.15})\approx0.4626\). At \(x_i=2\), \(p_i=1/(1+e^{-0.65})\approx0.6570\). Both fitted means are between 0 and 1, as required.

Check. The means are valid probabilities. The corresponding conditional variances are approximately \(0.4626(1-0.4626)=0.2486\) and \(0.6570(1-0.6570)=0.2254\). The common mistake avoided here is assuming that a numerical linear predictor is itself a valid probability.

Worked Example: A Count of Service Interruptions

A hypothetical utility records the number of brief service interruptions experienced by each customer during a fixed month. Suppose a Poisson response model is considered, with predictor \(\eta_i=\ln(2)+0.30x_i\). For a customer with \(x_i=2\), find the fitted conditional mean and variance. Explain why a log link is a coherent choice.

Method and response family. The outcome is a nonnegative integer count. A Poisson random component has conditional mean \(\mu_i>0\) and, under the Poisson assumption, conditional variance \(\mu_i\). The log link gives \(\log(\mu_i)=\eta_i\), so \(\mu_i=e^{\eta_i}\).

Evaluate the predictor. \(\eta_i=\ln(2)+0.30(2)=\ln(2)+0.60\). Therefore \(\mu_i=e^{\ln(2)+0.60}=2e^{0.60}\approx2(1.8221)=3.6442\).

Calculate the variance. Under the stated Poisson model, \(\operatorname{Var}(Y_i\mid x_i)=\mu_i\approx3.6442\). The mean need not be an integer: it is the expected count across repeated observations with the same predictors.

Check. The fitted mean is positive, and the variance equals the mean as required by the assumed Poisson distribution. The common mistake avoided is rounding the mean to a whole number because observed counts are integers.

Worked Example: Positive Continuous Severity

A hypothetical benefit plan models positive claim severity in dollars. A Gamma response model is proposed, with dispersion \(\phi=0.25\). At one specified predictor value, the linear predictor is \(\eta_i=\ln(1000)+\ln(1.2)\). Select a suitable link, then calculate the fitted mean and conditional variance.

Method and response family. Claim severity is positive and continuous, so a Gamma random component is a plausible candidate when its distributional assumptions are reasonable. Under the stated Gamma mean-dispersion parameterization, \(\operatorname{Var}(Y_i\mid\mathbf{x}_i)=\phi\mu_i^2\). A log link ensures a positive fitted mean.

Calculate the mean. Since \(\eta_i=\ln(1000)+\ln(1.2)=\ln(1200)\), the log-link inverse gives \(\mu_i=e^{\eta_i}=e^{\ln(1200)}=1200\) dollars.

Calculate the variance. \(\operatorname{Var}(Y_i\mid\mathbf{x}_i)=0.25(1200)^2=0.25(1{,}440{,}000)=360{,}000\) dollars squared.

Check. The mean is positive, and the variance is positive and equals the specified dispersion times the squared mean. The common mistake avoided is interpreting \(\phi\) as the variance itself; here it is a multiplier in the variance function.

Variance Is a Diagnostic, Not a Shortcut

Matching support and mean range prevents certain impossible models, but it does not guarantee a good description of the data. The conditional variance provides another diagnostic. A Bernoulli model has variance determined by its mean, \(p_i(1-p_i)\). A Poisson model imposes equality of conditional mean and variance. A Gamma model with fixed dispersion has variance proportional to the square of the mean. These patterns are quite different.

If observed counts vary substantially more than their fitted Poisson means would suggest, for example, the Poisson variance assumption may be inadequate. That observation is a warning to investigate the model and data structure; it does not by itself identify a single replacement family. Likewise, positive skewness may motivate considering a Gamma model, but positivity and skewness alone do not prove that the Gamma distribution is suitable.

A useful distinction is between mathematical validity and statistical adequacy. A log link can guarantee positive fitted means, but it cannot make the chosen response distribution fit the observed spread. Conversely, a plausible response family does not rescue a link that produces impossible means.

Common Setup Errors

  • Using the response support as the link scale. A binary response takes values 0 and 1, but its linear predictor is not restricted to that interval. The link maps between the predictor and the conditional mean.
  • Treating counts as continuous merely because their mean is not an integer. A count distribution can have a noninteger expectation while assigning probability only to integer outcomes.
  • Using the identity link without checking the fitted range. For a Bernoulli mean it can produce values below 0 or above 1; for a positive response it can produce nonpositive values.
  • Assuming a conventional link proves the model is correct. A common link may keep means valid, but support, variance behavior, and the data’s substantive context still need consideration.
  • Confusing a link with a transformation of the observed response. The equation \(g(\mu_i)=\eta_i\) transforms the conditional mean, not automatically the observed \(Y_i\).
Key takeaway: Choose the random component from the response’s support and plausible conditional variation. Then choose a link whose inverse keeps every fitted conditional mean within the range allowed by that component. Treat variance behavior as a further diagnostic, not as a guarantee of fit.

Check Your Understanding

For each setup, identify a coherent response family and link where appropriate. Check the mean range and use the stated variance assumptions.

  1. A hypothetical binary indicator has linear predictor \(\eta=-0.30\) for one observation. Why is the identity link invalid there, and what probability does the logit inverse produce? (Answer: Identity gives the impossible mean \(-0.30\); the logit inverse gives \(1/(1+e^{0.30})\approx0.4256\), so Bernoulli with a logit link is coherent.)
  2. A Poisson model for nonnegative counts uses a log link and has \(\eta=\ln(4)-0.20x\). At \(x=2\), calculate its conditional mean and variance. (Answer: \(\mu=4e^{-0.40}\approx2.6813\), and the Poisson conditional variance is approximately \(2.6813\).)
  3. A positive continuous response is modeled as Gamma with dispersion \(\phi=0.36\). At a predictor value, \(\eta=\ln(900)+\ln(1.10)\). Using a log link, calculate the mean and variance. (Answer: \(\mu=990\), and \(\operatorname{Var}(Y\mid\mathbf{x})=0.36(990)^2=352{,}836\).)
  4. A continuous measurement can take any real value, and a candidate Normal model assumes constant conditional variance. If the identity-link predictor is 12.5, what is the fitted mean, and does it violate the mean range? (Answer: The fitted mean is 12.5; it does not violate the Normal model’s unrestricted real-valued mean range.)
  5. A response records the number of events, including zero, and the proposed predictor is \(\eta=-0.20\). Explain why this does not invalidate a Poisson model with a log link, and give its fitted mean and variance under the Poisson assumption. (Answer: The predictor may be negative because the log link acts on the positive mean; \(\mu=e^{-0.20}\approx0.8187\), and the conditional variance is also approximately \(0.8187\).)
Clinical Biostats