From Log-Linked Coefficients to Effects on Expected Counts
A coefficient in a log-linked count model describes a change in the logarithm of the conditional mean. The effect on the expected count is therefore not usually the coefficient itself: it depends on the covariate values and, when included, the exposure. Marginal effects put results back on a scale that can be interpreted in the units of the outcome.
The distinction between continuous and discrete regressors matters. A derivative describes a small change in a continuous variable, whereas a binary regressor calls for a finite comparison between its two possible values. Effects can also vary across observations, so a reported average should make clear which observations are being averaged over.
The conditional-mean specification is the starting point for the calculations below. These effects do not require the conditional count distribution to be Poisson; they follow from the stated mean function. For inference, the coefficient covariance estimate must be appropriate to the estimator and sampling assumptions. In particular, robust sandwich covariance estimates can be used for Poisson quasi-maximum likelihood under the conditions established in the earlier material on Poisson quasi-maximum likelihood and sandwich inference.
Continuous Regressors: Derivatives and Average Effects
Suppose \(x_{ij}\) is a continuous regressor that enters the linear index \(x_i^\top\beta\) without a transformation or interaction. Holding all other regressors and exposure fixed, its observation-specific marginal effect is the derivative of the conditional mean with respect to \(x_{ij}\).
The effect has units of expected counts per one-unit increase in \(x_{ij}\). Its sign is the sign of \(\beta_j\), but its magnitude varies with \(\mu_i\). A positive coefficient thus implies a positive derivative at every observation in this simple specification, while the absolute increase in expected counts is larger where the predicted mean is larger.
In practice, replace \(\beta\) by an estimate \(\hat{\beta}\) and calculate the fitted mean \(\hat{\mu}_i=E_i\exp(x_i^\top\hat{\beta})\). The estimated observation-specific effect is \(\hat{\beta}_j\hat{\mu}_i\). For a specified set of \(n\) observations, the average marginal effect (AME) is the arithmetic mean of these effects:
This is the average of effects evaluated at the observed covariate values, not necessarily the effect evaluated at the sample means of the regressors. The two generally differ because the exponential mean function is nonlinear. If the model includes interactions or nonlinear transformations of \(x_{ij}\), differentiate the full linear predictor instead; the simple expression \(\beta_j\mu_i\) applies only when \(x_{ij}\) enters linearly and without interactions.
Worked Example: A Continuous Regressor With an Exposure Offset
Suppose a hypothetical count model has fitted mean \(\hat{\mu}_i=E_i\exp(\hat{\beta}_0+\hat{\beta}_1x_i)\), with \(\hat{\beta}_0=\log(1.20)\), \(\hat{\beta}_1=0.50\), and exposure \(E_i=1\). At \(x_i=1\), calculate the fitted mean and the marginal effect of a one-unit change in \(x_i\).
The fitted mean is
The estimated derivative is \(\hat{\beta}_1\hat{\mu}_i\), so
At these covariate and exposure values, a small increase of one unit in \(x_i\) corresponds locally to an increase of about 0.9892 in the fitted expected count. This is a derivative-based local effect, not an exact finite change for a full one-unit increase. The exposure is held at one; for another exposure, the fitted mean and absolute effect would scale with that exposure.
Discrete Regressors: Finite Changes
A derivative is not the appropriate effect for a binary regressor. Instead, predict the conditional mean once with the regressor set to zero and once with it set to one, keeping the other covariates and exposure fixed. If the regressor enters linearly with coefficient \(\beta_j\), the two means satisfy \(\mu_i(1)=\mu_i(0)\exp(\beta_j)\). Thus the absolute change in expected counts and the proportional change are:
The relative change is constant across observations in this no-interaction specification, but the absolute count change varies with the baseline mean \(\mu_i(0)\). With interactions, even the relative change can vary: calculate both means using the full linear predictor for each observation. An average discrete effect is the average of the observation-specific finite changes, not a derivative.
Worked Example: A Binary Regressor and Its Average Change
In a hypothetical log-linked count model, a binary treatment indicator has estimated coefficient \(\hat{\beta}_j=0.50\). For an observation with fitted baseline mean \(\hat{\mu}_i(0)=1.20\), calculate the fitted mean at treatment value one, the absolute change, and the percentage change.
The fitted mean with the indicator set to one is
The absolute fitted change is
The relative change is \(\exp(0.50)-1=0.648721\), or a 64.87% increase in the fitted conditional mean. This percentage is not a 64.87-count increase; the absolute increase here is 0.7785 expected counts because the baseline mean is 1.20.
Now suppose three observations have baseline means 1.20, 2.00, and 0.80, with this same coefficient and no interactions. Their fitted absolute changes are \(1.20(0.648721)=0.778466\), \(2.00(0.648721)=1.297443\), and \(0.80(0.648721)=0.518977\). Their average discrete effect is
expected counts per observation. The average is not the change at a single “average” observation; it summarizes the three finite comparisons.
Elasticities for Continuous Regressors
An elasticity expresses a proportional response in the conditional mean to a proportional change in a continuous regressor. For a positive \(x_{ij}\), define it as the derivative of the mean multiplied by \(x_{ij}/\mu_i\). Under the linear-in-level specification above, it simplifies to:
For example, an elasticity of 0.30 at an observation means that a small 1% increase in the regressor is associated, in the fitted conditional-mean function, with approximately a 0.30% increase in the expected count, holding other regressors and exposure fixed. This is a local interpretation. If the model instead includes \(\log(x_{ij})\) as a regressor, its coefficient is the elasticity with respect to \(x_{ij}\), since differentiating with respect to the level \(x_{ij}\) cancels the factor \(x_{ij}\). An elasticity with respect to a level variable is zero when that variable is zero, and is not defined by this formula for negative values as a percentage change in the regressor would not have the usual interpretation.
A binary regressor has no infinitesimal percentage change, so it does not have this derivative elasticity. For a binary regressor, report its finite percentage change \(\exp(\beta_j)-1\) or its absolute change in expected counts, as appropriate.
Uncertainty for Estimated Effects
Marginal effects and elasticities depend on estimated coefficients, so they also have sampling uncertainty. A common large-sample approach is the delta method. If \(g(\hat{\beta})\) is a differentiable function of the estimated coefficient vector and \(\widehat{V}\) estimates the covariance matrix of \(\hat{\beta}\), then its approximate variance is
For a continuous marginal effect at fixed \(x_i\) and \(E_i\), \(g(\beta)=\beta_j\mu_i\). Its gradient has a contribution from both \(\beta_j\) and the fitted mean:
where \(e_j\) is the unit vector with a one in position \(j\) and zeros elsewhere. This formula makes clear why treating the fitted mean as fixed when calculating uncertainty would generally omit part of the coefficient uncertainty. For an average marginal effect, average the observation-specific gradients before applying the covariance formula.
For a binary regressor without interactions, the percentage change \(g(\beta_j)=\exp(\beta_j)-1\) has derivative \(\exp(\beta_j)\). Its delta-method standard error is therefore approximately \(\exp(\hat{\beta}_j)\widehat{SE}(\hat{\beta}_j)\). A confidence interval based on a normal approximation is the estimate plus or minus the chosen normal critical value times this standard error. Such an interval is an approximation, particularly in small samples or when the transformation is strongly nonlinear.
Worked Example: Delta-Method Uncertainty for an Average Effect
Continue with the hypothetical continuous-regressor model \(\mu_i=\exp(\beta_0+\beta_1x_i)\), evaluated at \(x_i=0,1,2\), with equal weights and estimates \(\hat{\beta}_0=\log(1.20)\), \(\hat{\beta}_1=0.50\). Suppose the estimated covariance matrix is
The fitted means at the three covariate values are 1.200000, 1.978466, and 3.261938. The corresponding marginal effects are 0.600000, 0.989233, and 1.630969, so the estimated average marginal effect is
For each observation, the gradient with respect to \((\beta_0,\beta_1)\) is \(\mu_i(\beta_1,\ 1+\beta_1x_i)^\top\). Averaging these gradients gives approximately \(\bar{g}=(1.07340062,\ 3.56385823)^\top\). Therefore,
Using 1.96 as the normal critical value gives the approximate 95% confidence interval
Under the model and large-sample approximation, this interval describes uncertainty about the average increase in expected counts per one-unit increase in the regressor, averaged over these three covariate values. It does not mean there is a 95% probability that this fixed average effect lies in this particular interval.
Why the Distinctions Matter
Marginal effects connect a model’s fitted conditional mean to a change that can be described in outcome units. Reporting only a log-linked coefficient can obscure the scale of an absolute count difference, while reporting only one marginal effect can hide how that difference varies across observations. A useful presentation states whether the effect is observation-specific or averaged, identifies the covariate values or averaging population, and gives the units.
For a discrete regressor, the finite difference is usually the most direct effect. The associated percentage change can be useful because it is invariant to the baseline mean in a model without interactions, but it should not be mistaken for an absolute count difference. For a continuous regressor, the derivative is local; an exact change over a substantial interval can instead be calculated by predicting at both endpoints and subtracting.
- Mistake: treating a binary change as a derivative. A binary variable does not take infinitesimal changes in the usual sense. Set it to each value and subtract the two fitted means.
- Mistake: treating \(\beta_j\) as a count increase. In a log-linked model, \(\beta_j\) is a change in log mean for a one-unit increase. The continuous-regressor derivative is \(\beta_j\mu_i\); the no-interaction binary percentage change is \(\exp(\beta_j)-1\).
- Mistake: reporting an average without saying what is averaged. State the sample or target population and average observation-specific effects over that set.
- Mistake: holding a fitted mean fixed when calculating an effect’s standard error. The fitted mean also depends on estimated coefficients. Use the gradient of the full nonlinear effect with an appropriate covariance matrix.
Check Your Understanding
Work through these questions using the conditional-mean formulas in this tutorial.
- In a log-linked count model with a continuous regressor, explain why the absolute marginal effect can vary across observations even when its coefficient is constant.
- A binary regressor has coefficient \(\beta_j\) and no interactions. Write the formula for its absolute change in expected counts and its proportional change.
- Why is the derivative-based elasticity for a level regressor not the usual effect measure for a binary regressor?
- Describe how to construct an average discrete effect for a specified sample.
- In the delta method, why must the gradient include the dependence of the fitted mean on the estimated coefficients?