Tutorials › Generalized Linear Models › Log-Link Gaussian Regression and Multiplicative Effects

Gaussian GLMs and Weights · Tutorial 342 of 981

Log-Link Gaussian Regression and Multiplicative Effects

Learn to interpret log-link Gaussian coefficients as multiplicative changes in the conditional mean and to calculate fitted means and ratios from coefficient contrasts.

Beginner 11 min read

What You'll Learn

  • State the Gaussian regression assumptions and the role of the log link.
  • Convert a linear predictor into a positive fitted mean.
  • Interpret a one-unit continuous-predictor change as a mean ratio.
  • Calculate fitted means and mean ratios from contrasts between covariate profiles.
  • Explain how interactions make a multiplicative effect depend on other covariates.
  • Distinguish a positive modeled mean from a necessarily positive Gaussian response.

Why Model a Gaussian Mean on the Log Scale?

In ordinary Gaussian regression, a linear predictor describes the mean directly. A log-link Gaussian regression instead makes the logarithm of the mean linear in the covariates. This is useful when a response is measured on a scale where proportional changes are meaningful, or when the mean should be positive. The coefficients then describe multiplicative changes in the mean rather than additive changes.

The log link does not change the Gaussian distributional assumption: individual responses can still be below zero. It constrains the modeled means to be positive, not the possible response values. This distinction matters when deciding whether the model is scientifically appropriate.

Definition: In a log-link Gaussian regression, the responses \(Y_1,\ldots,Y_n\) are independent Gaussian random variables with means \(\mu_i\) and a common variance \(\sigma^2>0\), and the mean model is $$ Y_i\sim N(\mu_i,\sigma^2), \qquad \log(\mu_i)=x_i^\mathsf{T}\beta, $$ where \(x_i\) is the covariate vector for observation \(i\), including an intercept if the model has one, and \(\beta\) is the coefficient vector. Since \(\mu_i=\exp(x_i^\mathsf{T}\beta)\), every modeled mean is positive.

The same interpretation of the mean model applies if a Gaussian model uses known precision weights and its variance is \(\sigma^2/w_i\), where each \(w_i>0\). The weights alter the variance, not the formula for \(\mu_i\) or the mean ratios derived below. Unless stated otherwise, the examples use the common-variance form above.

From a Coefficient to a Mean Ratio

For two covariate profiles \(x_a\) and \(x_b\), the model assigns means \(\mu_a=\exp(x_a^\mathsf{T}\beta)\) and \(\mu_b=\exp(x_b^\mathsf{T}\beta)\). Taking their ratio cancels the common scale of the exponential and leaves a contrast of the linear predictors.

Theorem: For any two covariate profiles in a log-link mean model, their modeled mean ratio is $$ \frac{\mu_a}{\mu_b} = \exp\!\left((x_a-x_b)^\mathsf{T}\beta\right). $$ If the profiles differ by one unit in a covariate whose coefficient is \(\beta_j\), and all other model terms are unchanged, the mean ratio is \(\exp(\beta_j)\).

Proof. The model gives \(\mu_a=\exp(x_a^\mathsf{T}\beta)\) and \(\mu_b=\exp(x_b^\mathsf{T}\beta)\). Because an exponential is always positive, division is valid. The exponential identity \(\exp(u)/\exp(v)=\exp(u-v)\) then gives

$$ \frac{\mu_a}{\mu_b} = \frac{\exp(x_a^\mathsf{T}\beta)}{\exp(x_b^\mathsf{T}\beta)} = \exp\!\left(x_a^\mathsf{T}\beta-x_b^\mathsf{T}\beta\right) = \exp\!\left((x_a-x_b)^\mathsf{T}\beta\right). $$

For a one-unit increase in covariate \(j\) with no change in the other covariates or model terms, \(x_a-x_b\) has a 1 in position \(j\) and zeros elsewhere. Its inner product with \(\beta\) is \(\beta_j\), so the ratio is \(\exp(\beta_j)\). \(\square\)

A ratio \(r\) can also be expressed as a percentage change in the mean: \(100(r-1)\%\). Thus a coefficient \(\beta_j\) corresponds to a percentage change of \(100\{\exp(\beta_j)-1\}\%\) for the specified one-unit increase. This is an exact percentage change, not an approximation.

Result: If a covariate increases by \(h\) units and all other terms in the linear predictor stay fixed, its mean ratio is \(\exp(h\beta_j)\). The exact percentage change is \(100\{\exp(h\beta_j)-1\}\%\).

Derivation. The covariate change adds \(h\beta_j\) to the linear predictor, so the new mean is \(\exp(x^\mathsf{T}\beta+h\beta_j)\), while the original mean is \(\exp(x^\mathsf{T}\beta)\). Dividing the new mean by the original gives \(\exp(h\beta_j)\). Subtracting 1 from this ratio and multiplying by 100 expresses the difference relative to the original mean as a percentage. \(\square\)

Worked Mean and Ratio Calculations

With estimated coefficients, the same formulas give fitted means and fitted ratios. Write \(\hat{\beta}\) for the estimated coefficient vector and \(\hat{\mu}(x)=\exp(x^\mathsf{T}\hat{\beta})\) for the fitted mean at profile \(x\). A coefficient contrast is the difference between the linear predictors for two profiles; exponentiating that difference gives their fitted mean ratio.

Worked Example: A One-Unit Change in a Continuous Predictor

Suppose the fitted mean model for a response \(Y\) is \(\log(\mu)=0.50+0.12x\). Calculate the fitted means at \(x=3\) and \(x=4\), and interpret the one-unit change.

At \(x=3\), the linear predictor is \(0.50+0.12(3)=0.86\), so \(\hat{\mu}(3)=\exp(0.86)\approx2.3632\), or 2.363 to three decimal places.

At \(x=4\), the linear predictor is \(0.50+0.12(4)=0.98\), so \(\hat{\mu}(4)=\exp(0.98)\approx2.6645\), or 2.664 to three decimal places.

The fitted mean ratio for \(x=4\) versus \(x=3\), calculated from the unrounded fitted means, is \(\exp(0.98-0.86)=\exp(0.12)\approx1.1275\). The fitted mean is therefore about \(12.75\%\) higher at \(x=4\). If the displayed means are divided instead, \(2.664/2.363\approx1.1274\); the small discrepancy is due to rounding the means before dividing.

Worked Example: A Treatment Indicator

Let \(t=1\) denote treatment and \(t=0\) control, and let age be measured in years. Suppose the fitted model is \(\log(\mu)=0.70+0.04\,\text{age}+0.4055t\). Calculate the fitted means at age 5 for both groups and interpret the treatment contrast at that age.

For a control subject at age 5, \(t=0\), so the linear predictor is \(0.70+0.04(5)+0.4055(0)=0.90\). The fitted mean is \(\exp(0.90)\approx2.4596\), or 2.460 to three decimal places.

For a treated subject at the same age, \(t=1\), so the linear predictor is \(0.70+0.04(5)+0.4055=1.3055\). The fitted mean is \(\exp(1.3055)\approx3.6895\), or 3.690 to three decimal places.

The treatment-versus-control mean ratio at age 5 is \(\exp(1.3055-0.90)=\exp(0.4055)\approx1.5001\). Thus the model estimates a treated mean about \(50.01\%\) higher than the control mean at that age. Because this model has no treatment-by-age interaction, this ratio is the same at every age: changing age changes both linear predictors by the same amount, which cancels in their contrast.

Worked Example: A Contrast That Depends on an Interaction

Suppose dose \(d\) is numeric and group \(B\) is represented by indicator \(g=1\), with group \(A\) represented by \(g=0\). A fitted model is \(\log(\mu)=-0.20+0.30d+0.50g-0.10dg\). Find the fitted means for groups A and B at dose \(d=2\), and calculate the B-to-A mean ratio.

For group A, \(g=0\), so the predictor at dose 2 is \(-0.20+0.30(2)=0.40\). The fitted mean is \(\exp(0.40)\approx1.4918\).

For group B, \(g=1\), so the predictor is \(-0.20+0.30(2)+0.50-0.10(2)=0.70\). The fitted mean is \(\exp(0.70)\approx2.0138\).

The B-to-A predictor contrast at dose 2 is \(0.70-0.40=0.30\), and the fitted mean ratio is \(\exp(0.30)\approx1.3499\). At a general dose \(d\), the B-to-A contrast is \(0.50-0.10d\), so the ratio is \(\exp(0.50-0.10d)\). The interaction makes the group ratio depend on dose; the coefficient \(0.50\) alone gives the group contrast only at dose zero.

Interpreting Coefficient Contrasts Carefully

The general contrast formula is especially useful when a model includes categorical predictors, multiple covariates, or interactions. To compare two profiles, substitute each profile into every model term, subtract the resulting linear predictors, and exponentiate. This procedure avoids trying to interpret a coefficient without accounting for the other terms that define the comparison.

For a categorical predictor with a reference group, a group-indicator coefficient gives the log mean ratio between that group and the reference when all other model terms are held fixed. With an interaction, the contrast also contains the relevant interaction terms. For example, the treatment indicator coefficient in a treatment-by-age model is the treatment contrast at age zero; at another age, the interaction contribution must be added.

A change of units also changes a coefficient’s numerical size without changing the fitted mean comparison. If \(z=cx\), where \(c\ne0\), then a model term \(\beta_x x\) can be written as \((\beta_x/c)z\). The coefficient per unit of \(z\) is \(\beta_x/c\), and a one-unit change in \(z\) corresponds to a \(1/c\)-unit change in \(x\). The resulting predictor increment, and hence its exponentiated mean ratio, is unchanged when the same physical change is described in either unit.

Common Mistakes and Model Scope

  • Reading a log-link coefficient as an additive change in the mean. A coefficient \(\beta_j\) is an additive change in the log mean for a one-unit covariate increase. On the mean scale, the corresponding ratio is \(\exp(\beta_j)\), not an increase of \(\beta_j\) response units.
  • Calling \(\beta_j\) the exact percentage change. The exact percentage change is \(100\{\exp(\beta_j)-1\}\%\). The coefficient itself is not that percentage.
  • Ignoring an interaction. With an interaction, a main-effect coefficient describes a contrast at the value zero of the interacting covariate (or at its reference level), not necessarily a universal ratio.
  • Dividing rounded fitted means and expecting an exact coefficient ratio. Rounding each mean first can alter the displayed ratio. Compute the contrast from the unrounded predictors when possible.
  • Assuming the response must be positive. The log link guarantees \(\mu_i>0\), but a Gaussian response has support on the entire real line. If negative responses are impossible or implausible, the Gaussian distributional assumption itself needs scrutiny.

The log-link model is valuable when multiplicative comparisons are scientifically natural and positive means are appropriate. Its interpretation is direct once the comparison is stated precisely: identify the two covariate profiles, calculate their linear-predictor contrast, and exponentiate. The result is a ratio of modeled means, not a ratio of individual outcomes and not a statement that every subject’s response changes by that factor.

Check Your Understanding

Use the log-link mean model and distinguish coefficient effects from profile-specific contrasts.

  1. If a continuous predictor has coefficient \(0.20\), what is the fitted mean ratio for a two-unit increase, holding other terms fixed?
  2. A coefficient for a binary treatment indicator is \(-0.30\), with no interaction. What is the treatment-to-control mean ratio, and what is the corresponding percentage change?
  3. In a model with a group-by-dose interaction, why might the group coefficient alone fail to give the group mean ratio at dose 4?
  4. Does a log link ensure that every observed Gaussian response is positive? Explain.
  5. For two covariate profiles, what quantity should be exponentiated to obtain their modeled mean ratio?
Clinical Biostats