When Gamma Regression Is Useful
Some outcomes are measured on a continuous scale, must be positive, and tend to have a long right tail. Examples include hypothetical claim severities, repair costs, and time until a positive-duration event. Their variability may also increase as their mean increases. A Gamma generalized linear model (GLM) can represent these features while relating the conditional mean to predictors.
The response’s support matters: a Gamma random variable is strictly positive and continuous. It is therefore a candidate for positive amounts, not a model for integer counts or outcomes that can be zero or negative. Right skew alone is not enough to justify the model; the conditional mean and variance patterns should also be plausible.
This parameterization uses scale, not rate: a Gamma distribution with shape \(\alpha\) and scale \(\theta\) has mean \(\alpha\theta\) and variance \(\alpha\theta^2\). With \(\alpha=1/\phi\) and \(\theta=\phi\mu_i\), these become \(\mu_i\) and \(\phi\mu_i^2\), respectively. The dispersion parameter controls variability relative to the squared mean: the conditional coefficient of variation is \(\sqrt{\phi}\).
Why the Log Link Gives Multiplicative Effects
The linear predictor is a linear combination of the predictors, but the response mean is obtained by exponentiating it. This keeps the fitted mean positive and gives coefficients a multiplicative interpretation. For a one-unit increase in predictor \(x_j\), with other predictors fixed, the change in the linear predictor is \(\beta_j\).
The equality follows because the difference of two logarithms is the logarithm of a ratio, and exponentiation reverses the logarithm. Thus \(\exp(\beta_j)\) is a ratio of conditional means, not an additive change in the response. The corresponding percentage change is \(100\{\exp(\beta_j)-1\}\%\). For a change of \(c\) units, the mean ratio is \(\exp(c\beta_j)\).
Worked Example: Interpreting Predictors in a Gamma GLM
A hypothetical repair-cost study models positive costs in dollars. Its fitted Gamma GLM has a log link: \(\log(\mu)=\log(800)+\log(1.25)z+\log(1.10)x\), where \(z=1\) for a specified repair category and \(z=0\) otherwise, and \(x\) is the vehicle’s age measured in ten-year units. Find the fitted mean for a vehicle with \(z=1\) and \(x=2\), and interpret both effects.
Method. Substitute the predictor values into the linear predictor, then exponentiate to obtain the mean.
Step 1: Calculate the linear predictor. The intercept contributes \(\log(800)\), the category contributes \(\log(1.25)\), and two age units contribute \(2\log(1.10)\). Therefore \(\eta=\log(800)+\log(1.25)+2\log(1.10)\).
Step 2: Exponentiate. Using the sum-of-logarithms rule, \(\mu=\exp(\eta)=800(1.25)(1.10)^2\). Since \(1.10^2=1.21\), \(800(1.25)=1{,}000\), and \(1{,}000(1.21)=1{,}210\), the fitted mean is $1,210.
Interpret the coefficients. Holding age fixed, the specified category has a mean repair cost \(1.25\) times the reference category’s mean, or 25% higher. Holding category fixed, each additional ten years multiplies the mean by \(1.10\), or increases it by 10%. The two age units multiply the mean by \(1.10^2=1.21\), a 21% increase relative to the same category at \(x=0\).
Check. At \(z=1,x=0\), the mean is \(800(1.25)=1{,}000\). Applying two ten-year increases gives \(1{,}000(1.21)=1{,}210\), as calculated. The common mistake avoided here is treating a log-link coefficient as an amount to add to the response.
Mean-Variance Pattern and Comparison With Poisson Regression
A central modeling distinction is how the variance changes with the conditional mean. Under a Gamma GLM with common dispersion \(\phi\), doubling \(\mu_i\) multiplies the variance by four. Under a Poisson regression model, the response is a count and its conditional variance equals its conditional mean, so doubling the mean doubles the variance.
| Model | Response support | Conditional mean | Conditional variance |
|---|---|---|---|
| Gamma GLM | Positive continuous values | \(\mu_i\) | \(\phi\mu_i^2\) |
| Poisson regression | Nonnegative integer counts | \(\mu_i\) | \(\mu_i\) |
These models are not interchangeable just because each can use a log link. The link specifies how predictors relate to the mean; the response family specifies the outcome distribution and variance pattern. A continuous positive amount is not a Poisson count. Conversely, a count with many zeros is not made suitable for a Gamma model by having a right-skewed histogram.
Worked Example: Checking a Gamma Variance Calculation
For a hypothetical positive claim-severity response, a fitted Gamma model gives a conditional mean of $1,210 and dispersion \(\phi=0.16\). Calculate its conditional variance and standard deviation. Also express the corresponding Gamma shape and scale parameters.
Method. Apply \(\operatorname{Var}(Y\mid x)=\phi\mu^2\), then use the stated shape-scale parameterization.
Step 1: Square the mean. \(1{,}210^2=1{,}464{,}100\).
Step 2: Calculate the variance. \(0.16(1{,}464{,}100)=234{,}256\) dollars squared.
Step 3: Calculate the standard deviation. \(\sqrt{234{,}256}=484\) dollars, since \(484^2=234{,}256\).
Step 4: Calculate the distribution parameters. The shape is \(\alpha=1/\phi=1/0.16=6.25\). The scale is \(\theta=\phi\mu=0.16(1{,}210)=193.6\) dollars. Checking, the Gamma mean is \(6.25(193.6)=1{,}210\), and its variance is \(6.25(193.6)^2=234{,}256\).
The calculation gives a standard deviation in dollars and a variance in dollars squared. The common mistake avoided is using \(\phi\mu\) as the variance; that expression is the Gamma scale here, not the variance.
Worked Example: Distinguishing Gamma and Poisson Variance Patterns
A hypothetical analyst considers two positive continuous response levels with fitted means of $100 and $200. Under a Gamma model, the estimated common dispersion is \(\phi=0.30\). Calculate the Gamma variances and compare them with the variances that a Poisson model would assign to counts with the same means.
Method. Calculate each variance under each model separately; then compare how the variance changes when the mean doubles.
Step 1: Gamma variance at mean $100. \(0.30(100^2)=0.30(10{,}000)=3{,}000\) dollars squared.
Step 2: Gamma variance at mean $200. \(0.30(200^2)=0.30(40{,}000)=12{,}000\) dollars squared. The variance ratio is \(12{,}000/3{,}000=4\).
Step 3: Poisson variance at the two means. For a Poisson count, variance equals mean, so the variances would be 100 and 200 counts squared. The variance ratio is \(200/100=2\).
Check and interpretation. Doubling the mean quadruples the Gamma variance under common \(\phi\), but doubles the Poisson variance. A Poisson model would also assign integer-valued support, so it is not an appropriate distribution for the continuous dollar outcomes in this scenario. The common mistake avoided is choosing a Poisson family merely because its mean can be modeled with a log link.
Assessing Whether the Model Is Plausible
A Gamma GLM is a reasonable candidate when the response is positive and continuous, right skew is plausible, and conditional variability appears to increase roughly in proportion to the square of the conditional mean. These are modeling assumptions, not guarantees based only on the response’s overall histogram. Predictors can explain some variation in the mean; the Gamma variance relationship concerns the remaining conditional variation.
Check the measurement and data collection before fitting the model. Exact zeros or negative observations fall outside the ordinary Gamma support. Do not silently add a small constant to every response and proceed as if the original model still applied: that changes the modeled quantity and requires a defensible reason. If zero is a genuine possible outcome, a Gamma GLM for the unmodified response is not suitable without a different modeling strategy.
Likewise, the conditional mean relationship should be credible. A log link guarantees positive fitted means, but does not by itself guarantee a correct model. The predictors must be represented appropriately in the linear predictor, and the assumed dispersion and variance pattern should be checked against the data. A suitable response family is one part of a defensible model, not a substitute for checking its assumptions.
Common Exam Trap
A frequent error is to interpret \(\beta_j\) itself as the percentage change in the mean. In a log-link model, the exact percentage change for a one-unit increase is \(100\{\exp(\beta_j)-1\}\%\). For example, if \(\beta_j=\log(1.25)\), the mean is multiplied by \(1.25\), an exact 25% increase. It is not an additive increase of 0.25 dollars, nor is it a 25-dollar increase.
Another error is to claim that Gamma variance is proportional to the mean. The assumed relationship is \(\phi\mu^2\). For instance, if \(\mu\) doubles while \(\phi\) stays fixed, the variance becomes \(\phi(2\mu)^2=4\phi\mu^2\), not \(2\phi\mu^2\). Keeping the response support, link, and variance function distinct prevents both errors.
Check Your Understanding
For each problem, identify the relevant model feature and calculate the requested quantity.
- A response records strictly positive repair durations in hours and is continuous and right-skewed. Is a Gamma GLM a plausible candidate based on support and shape alone? Name one additional relationship to assess. (Answer: Yes, as a candidate; assess whether conditional variance is plausibly proportional to the square of the conditional mean.)
- In a Gamma GLM with a log link, a predictor coefficient is \(\log(0.80)\). What is the mean ratio for a one-unit increase, and what is the percentage change? (Answer: Ratio \(0.80\); a 20% decrease.)
- A fitted Gamma GLM has mean 250 and dispersion \(\phi=0.04\). Find its variance, standard deviation, shape, and scale. (Answer: Variance \(2{,}500\), standard deviation \(50\), shape \(25\), scale \(10\).)
- A Gamma log-link model has \(\log(\mu)=\log(500)+\log(1.20)z\), where \(z\) is binary. Find the fitted mean for \(z=1\), and compare it with the mean for \(z=0\). (Answer: \(600\); it is 20% higher than the \(z=0\) mean of \(500\).)
- Under a Gamma GLM with fixed dispersion, a conditional mean changes from 80 to 160. By what factor does its modeled variance change? If instead it were a Poisson count model, by what factor would the variance change? (Answer: Gamma variance changes by a factor of 4; Poisson variance changes by a factor of 2.)