Tutorials › Exam SRM - Statistics for Risk Modeling › Comparing Gamma Link Functions On A Scenario

Exam SRM · Poisson and Gamma Models · Tutorial 350 of 926

Comparing Gamma Link Functions On A Scenario

Calculate and compare Gamma fitted means under three links, interpret their effects, and check that each prediction remains positive.

Advanced 11 min read

What You'll Learn

  • Calculate conditional means from log, inverse, and identity links for the same positive-response scenario
  • Compare how each link represents changes in the predictor
  • Derive multiplicative, nonlinear, and additive effect interpretations
  • Identify the predictor ranges where each link gives a valid positive mean
  • Avoid treating an invalid identity-link prediction as a feasible Gamma mean

Why Compare Gamma Link Functions?

A Gamma regression model is appropriate for a positive, continuous response when its distribution is right-skewed. The link function connects the conditional mean to a linear predictor. Different links can therefore give different fitted means and different interpretations of the same predictor, even when the response is Gamma in each model.

This comparison matters in actuarial applications such as hypothetical repair severities. A model may produce a positive mean at typical predictor values but an impossible nonpositive mean elsewhere in the range where predictions are needed. The response distribution alone does not prevent that problem: the fitted mean must also be checked.

Setup: Let \(Y_i\) be a positive continuous response for observation \(i\), and let \(z_i\) be a predictor. Assume responses are conditionally independent and Gamma distributed given their predictors, with conditional mean \(\mu_i=E[Y_i\mid z_i]>0\) and a common dispersion parameter \(\phi>0\). Under the usual Gamma mean-dispersion parameterization, \(\operatorname{Var}(Y_i\mid z_i)=\phi\mu_i^2\). A Gamma regression model specifies a link \(g\) such that \(g(\mu_i)=\eta_i\), where \(\eta_i=\beta_0+\beta_1z_i\). The link determines how the linear predictor maps to the mean.

The response and its Gamma distribution are the same across the three candidate models below; the link and fitted coefficients differ. The coefficients are hypothetical fitted values for comparison, not estimates from a real insurer or a claim that one model is statistically superior. These calculations compare means and effect interpretations, not model fit or link-selection criteria.

Three Links and Their Mean Functions

For a positive Gamma mean, the log, inverse, and identity links produce the following mean functions. The inverse link is written here as \(g(\mu)=1/\mu\), so its linear predictor must be positive. The identity link is \(g(\mu)=\mu\), so its linear predictor must also be positive. The log link permits any real linear predictor because exponentiation always gives a positive mean.

LinkModel statementFitted meanEffect of increasing \(z\) by one
Log\(\log(\mu)=\beta_0+\beta_1z\)\(\mu=\exp(\beta_0+\beta_1z)\)Multiplies the mean by \(\exp(\beta_1)\)
Inverse\(1/\mu=\beta_0+\beta_1z\)\(\mu=1/(\beta_0+\beta_1z)\)Changes the reciprocal mean by \(\beta_1\)
Identity\(\mu=\beta_0+\beta_1z\)\(\mu=\beta_0+\beta_1z\)Adds \(\beta_1\) to the mean

In all three models, the linear predictor is linear in \(z\). The fitted mean need not be linear in \(z\): it is linear only under the identity link. In particular, an inverse-link coefficient is not a change in the mean itself; it is a change in the reciprocal of the mean.

Worked Comparison: Hypothetical Repair Severity

Suppose \(Y\) is the severity of a hypothetical repair, measured in thousands of dollars, and \(z\) is a nonnegative repair-complexity score. Consider three candidate Gamma models, each with a fitted mean of 2 thousand dollars at \(z=0\):

$$ \begin{aligned} \text{Log link:}\quad &\log(\mu)=\log(2)-0.30z,\\ \text{Inverse link:}\quad &\frac{1}{\mu}=0.50+0.125z,\\ \text{Identity link:}\quad &\mu=2-0.40z. \end{aligned} $$

At \(z=0\), the log model gives \(\exp(\log(2))=2\), the inverse model gives \(1/0.50=2\), and the identity model gives \(2-0.40(0)=2\). Thus the three models share the same baseline mean, although they do not imply the same shape as \(z\) changes.

Worked Example: Calculating Means Across the Predictor Range

Using the three hypothetical models above, calculate the fitted mean at \(z=2\), \(z=4\), and \(z=6\). Give means in thousands of dollars to four decimal places. Identify any prediction that is not a feasible Gamma mean. Method: substitute the specified predictor value into each link equation, then transform the linear predictor back to the mean. Common mistake avoided: treating every linear predictor as a mean, including when the identity prediction is nonpositive.

At \(z=2\). For the log link, the linear predictor is \(\log(2)-0.30(2)=\log(2)-0.60\), so \(\mu=2e^{-0.60}=2(0.5488116\ldots)=1.0976233\ldots\), or \(1.0976\). For the inverse link, \(1/\mu=0.50+0.125(2)=0.75\), so \(\mu=1/0.75=1.3333333\ldots\), or \(1.3333\). For the identity link, \(\mu=2-0.40(2)=1.20\), or \(1.2000\). All three means are positive.

At \(z=4\). The log-link mean is \(2e^{-0.30(4)}=2e^{-1.20}=2(0.3011942\ldots)=0.6023884\ldots\), or \(0.6024\). The inverse-link predictor is \(0.50+0.125(4)=1.00\), giving \(\mu=1/1.00=1.0000\). The identity-link mean is \(2-0.40(4)=0.40\), or \(0.4000\). Each is still positive.

At \(z=6\). The log-link mean is \(2e^{-1.80}=2(0.1652989\ldots)=0.3305978\ldots\), or \(0.3306\). The inverse-link predictor is \(0.50+0.125(6)=1.25\), giving \(\mu=1/1.25=0.8000\). The identity-link mean is \(2-0.40(6)=-0.40\). This last value is not a feasible Gamma mean because a Gamma response has a strictly positive mean.

The feasible predictions need not be close: the link determines the shape of the mean across \(z\). At \(z=6\), only the log-link and inverse-link predictions are feasible. A negative identity-link result is not repaired by calling it a Gamma mean or by silently replacing it with zero.

Effect Interpretation: Why the Links Differ

For the log link, exponentiating both sides gives \(\mu(z)=\exp(\beta_0)\exp(\beta_1z)\). For a change from \(z\) to \(z+\Delta\), division of the two means gives \(\mu(z+\Delta)/\mu(z)=\exp(\beta_1\Delta)\). This ratio does not depend on the starting value of \(z\). Thus a log link gives a constant multiplicative effect for a fixed change in the predictor, not a constant dollar change.

For the inverse link, \(\mu(z)=1/(\beta_0+\beta_1z)\). Its derivative is found by differentiating the reciprocal: \(\frac{d\mu}{dz}=-\beta_1(\beta_0+\beta_1z)^{-2}=-\beta_1\mu^2\). Consequently, for a positive \(\beta_1\), the mean decreases as \(z\) rises, but its rate of decrease depends on the current mean. The inverse-link coefficient is a constant change in \(1/\mu\), not in \(\mu\).

For the identity link, \(\mu(z)=\beta_0+\beta_1z\), so \(\frac{d\mu}{dz}=\beta_1\). A one-unit increase in \(z\) changes the mean by the same additive amount throughout the predictor range. That simple interpretation comes with a constraint: the resulting mean must remain positive.

Worked Example: Comparing a Two-Unit Predictor Change

For the repair-severity models, compare the change from \(z=2\) to \(z=4\). State the log-link multiplier and percentage change, the inverse-link percentage change, and the identity-link dollar change. Method: use a ratio for multiplicative effects and a difference for additive effects. Common mistake avoided: interpreting the inverse-link coefficient as an additive change in mean severity.

The change is \(\Delta=4-2=2\). Under the log link, the multiplier is \(e^{-0.30(2)}=e^{-0.60}=0.5488116\ldots\), or \(0.5488\). The percentage change is \((0.5488116\ldots-1)\times100=-45.1188\ldots\%\), or a \(45.12\%\) decrease. This agrees with the fitted means: \(0.6023884\ldots/1.0976233\ldots=0.5488116\ldots\).

Under the inverse link, the means are \(1.3333333\ldots\) at \(z=2\) and \(1.0000\) at \(z=4\). Their ratio is \(1.0000/1.3333333\ldots=0.75\), so the change is \((0.75-1)\times100=-25\%\), a \(25\%\) decrease. Equivalently, the reciprocal mean rises from \(0.75\) to \(1.00\), an increase of \(0.25=0.125(2)\).

Under the identity link, the mean changes from \(1.20\) to \(0.40\) thousand dollars. The additive change is \(0.40-1.20=-0.80\) thousand dollars, or a decrease of $800. The relative decrease is \(0.80/1.20=2/3\), or \(66.67\%\). Unlike the log-link multiplier, this percentage depends on the starting mean.

As a check, each calculation uses the same predictor change but the link-specific scale: log ratios for the log link, reciprocal means for the inverse link, and mean differences for the identity link.

Feasibility Is Part of the Model Check

A candidate mean function must produce \(\mu>0\) wherever predictions are required. This condition is automatic for a log link, since \(\exp(\eta)>0\) for every finite \(\eta\). Under the inverse link, \(\mu=1/\eta\) is positive only when \(\eta>0\); \(\eta=0\) is undefined, and \(\eta<0\) gives a negative mean. Under the identity link, the linear predictor is the mean itself and must be strictly positive.

Worked Example: Finding the Feasible Predictor Range

For the three repair-severity models, find the predictor range over which each fitted mean is positive. Then assess predictions at \(z=5\) and \(z=6\). Method: solve the positivity condition for each model before evaluating particular values. Common mistake avoided: checking only the observed baseline and assuming the fitted mean stays positive at larger predictor values.

For the log link, \(\mu=2e^{-0.30z}\), which is positive for every finite real \(z\). In particular, the means at \(z=5\) and \(z=6\) are both positive.

For the inverse link, the predictor of the reciprocal mean is \(0.50+0.125z\). Positivity requires \(0.50+0.125z>0\). Subtracting \(0.50\) and dividing by \(0.125>0\) gives \(z>-4\). The scenario has \(z\geq0\), so its inverse-link means are positive throughout that range. At \(z=5\), the reciprocal mean is \(0.50+0.625=1.125\), giving \(\mu=1/1.125=0.8889\). At \(z=6\), the reciprocal mean is \(1.25\), giving \(\mu=0.8000\).

For the identity link, positivity requires \(2-0.40z>0\). Subtracting 2 and dividing by \(-0.40\) reverses the inequality, so \(z<5\). At \(z=5\), the fitted mean is zero, which is invalid for a Gamma mean; at \(z=6\), it is \(-0.40\), also invalid. Thus the identity model is feasible only for \(z<5\), even though its mean is positive at the baseline.

This check is about whether a prediction is mathematically compatible with the response model, not whether the observed data happened to contain a response of that size. A nonpositive fitted mean cannot be interpreted as a possible average severity.

Practical Comparison and Exam Traps

When comparing links for a positive response, separate three questions: what scale is linear in the predictor, what kind of effect the coefficient represents, and whether the resulting mean is feasible. A model can have an interpretable coefficient yet fail the positivity check for part of the prediction range.

QuestionLog linkInverse linkIdentity link
What is linear in \(z\)?\(\log(\mu)\)\(1/\mu\)\(\mu\)
Coefficient interpretationConstant multiplicative effect per predictor unitConstant additive effect on reciprocal meanConstant additive effect on mean
Positivity conditionAutomatic for finite predictorLinear predictor must be positiveFitted mean must be positive
Typical trapCalling a coefficient a dollar changeCalling a coefficient a mean changeIgnoring zero or negative fitted means

The following incorrect calculation illustrates a common trap. If an identity-link model is \(\mu=2-0.40z\), substituting \(z=6\) gives \(2-2.40=-0.40\). It is incorrect to report this as a valid Gamma prediction of negative $400, or to treat it as a positive severity. The correction is to state that the fitted value is infeasible under a Gamma response and that this identity-link model is unsuitable for prediction at \(z=6\) unless the model specification or relevant predictor range changes.

A second trap is to read \(0.125\) in the inverse-link equation as an increase of \(0.125\) thousand dollars per unit. In \(1/\mu=0.50+0.125z\), it is the reciprocal mean that increases by \(0.125\) per unit. The mean itself is the reciprocal of that expression, so it changes nonlinearly.

Key takeaway: For a Gamma response, compare links by first identifying the quantity modeled linearly: the log mean, reciprocal mean, or mean. Translate coefficients on that scale, calculate fitted means by applying the inverse link, and verify that every required mean is strictly positive.

Check Your Understanding

For each problem, calculate the requested means and effects, and check feasibility where relevant. Answers are shown at the end of each item.

  1. A hypothetical Gamma model for equipment-reconditioning severity, in thousands of dollars, has \(\log(\mu)=\log(1.5)+0.20x\). Calculate the fitted means at \(x=0\) and \(x=3\), and the multiplier for the three-unit increase. (Answer: \(\mu(0)=1.5000\), \(\mu(3)=1.5e^{0.6}=2.7332\) thousand dollars, and the multiplier is \(e^{0.6}=1.8221\).)
  2. A Gamma model for a positive laboratory-processing cost has \(1/\mu=0.40+0.08x\). Find the means at \(x=1\) and \(x=4\), and the percentage change from \(x=1\) to \(x=4\). (Answer: \(\mu(1)=1/0.48=2.0833\), \(\mu(4)=1/0.72=1.3889\), and the mean decreases by \(33.33\%\).)
  3. A Gamma model for a hypothetical positive service duration, in hours, uses the identity link \(\mu=3.2-0.35x\). Calculate the means at \(x=2\) and \(x=8\), the additive change between them, and whether both means are feasible. (Answer: \(\mu(2)=2.5000\) hours, \(\mu(8)=0.4000\) hours, the change is \(-2.1000\) hours, and both means are positive and feasible.)
  4. A candidate identity-link Gamma model for a positive repair amount is \(\mu=1.8-0.30x\), with \(x\) ranging from 0 to 7. Find the largest range of \(x\) for which the fitted mean is positive, and classify the predictions at \(x=5\), \(x=6\), and \(x=7\). (Answer: positivity requires \(x<6\); the means are \(0.3000\), \(0\), and \(-0.3000\), respectively, so only the prediction at \(x=5\) is feasible.)
  5. A candidate inverse-link Gamma model for positive claim-handling cost is \(1/\mu=0.25-0.05x\). Find the range of \(x\) giving a positive mean, calculate the mean at \(x=4\), and assess \(x=5\) and \(x=6\). (Answer: positivity requires \(x<5\); \(\mu(4)=1/0.05=20.0000\), while at \(x=5\) the reciprocal predictor is zero and the mean is undefined, and at \(x=6\) it is negative and gives an infeasible negative mean.)
Clinical Biostats