Tutorials › Econometrics (Graduate) › Average Marginal Effects Versus Effects at the Means

Binary Choice Models · Tutorial 462 of 952

Average Marginal Effects Versus Effects at the Means

Learn to calculate and distinguish effects averaged over observed covariate profiles from effects evaluated at the average profile.

Intermediate 10 min read

What You'll Learn

  • Define the average marginal effect and the marginal effect at mean covariates.
  • Calculate both summaries from fitted logit and probit models.
  • Explain why averaging a nonlinear marginal effect differs from evaluating it at average covariates.
  • Identify the population or covariate profile each measure summarizes.
  • Recognize when a derivative-based effect is not appropriate for a binary regressor.

Two Different Summaries of a Nonlinear Effect

A marginal effect in a binary choice model depends on the covariate values at which it is evaluated. A logit or probit coefficient therefore does not, by itself, give one constant change in outcome probability for a one-unit change in a covariate. Once pointwise marginal effects are available, a natural question is how to summarize them across individuals. Two common answers are to average the individual effects or to evaluate the effect at the average covariate profile. These calculations sound similar, but generally answer different questions.

The distinction matters when the covariates vary substantially across the target population or when the probability model is strongly nonlinear. An average marginal effect describes the average model-implied local effect across the covariate profiles being considered. A marginal effect at the mean describes the local effect at one constructed profile whose covariates equal their means. That profile need not correspond to any actual individual.

Definitions and Model Setup

Let \(Y_i\) be a binary outcome and let \(x_i\) be an individual’s covariate vector. In a logit or probit model, the conditional probability of the outcome is specified as

$$ P(Y_i=1\mid x_i)=G(x_i'\beta), $$

where \(\beta\) is a parameter vector and \(G\) is the logistic cumulative distribution function for logit or the standard normal cumulative distribution function \(\Phi\) for probit. For a continuously varying covariate \(x_{ij}\), the pointwise marginal effect is the derivative of this conditional probability with respect to that covariate, holding the other covariates fixed. Writing \(g=G'\), the derivative is

$$ \frac{\partial P(Y_i=1\mid x_i)}{\partial x_{ij}} =\beta_j g(x_i'\beta). $$

This derivative has units of probability change per one-unit change in \(x_{ij}\). It is local: it describes the slope at the specified covariate profile, not necessarily a finite change over a full unit for a large change in \(x_{ij}\). For logit, \(g(\eta)=\Lambda(\eta)[1-\Lambda(\eta)]\), where \(\Lambda\) is the logistic cumulative distribution function. For probit, \(g(\eta)=\phi(\eta)\), the standard normal density.

Definition: The average marginal effect (AME) for covariate \(x_j\) is the average of the pointwise marginal effects over the covariate profiles in a specified target population. In a sample of \(n\) observations, its plug-in estimate is
$$ \widehat{AME}_j=\frac{1}{n}\sum_{i=1}^{n}\hat{\beta}_j g(x_i'\hat{\beta}). $$
The marginal effect at the means (MEM) evaluates the marginal effect at the vector of sample mean covariates:
$$ \widehat{MEM}_j=\hat{\beta}_j g(\bar{x}'\hat{\beta}), \qquad \bar{x}=\frac{1}{n}\sum_{i=1}^{n}x_i. $$

These definitions use estimates \(\hat{\beta}\) from a fitted model. The same distinction applies to population quantities: an AME averages effects over the target population’s covariate distribution, whereas an effect at the population mean evaluates the derivative at that distribution’s mean covariate vector. The sample formulas use each observed profile with equal weight; other target populations or sampling designs may call for different weights.

The model setup assumes a correctly specified conditional probability of the stated form and a differentiable link function. A derivative-based effect also requires the covariate to be meaningfully treated as continuous over the range being interpreted. These are model-implied associations unless a separate causal design and its assumptions justify a causal interpretation. The calculations below illustrate model-based probability slopes; they do not establish causal effects.

Worked Calculations

Worked Example: Logit AME and MEM

Suppose a hypothetical fitted logit model has intercept \(-1\) and coefficient \(0.8\) on a continuously measured predictor \(x\). Four hypothetical observations have \(x=0,1,2,3\). Assume the fitted conditional probability follows the stated logit model and that these profiles are the target group to be summarized. For logit, the pointwise effect is \(\hat{\beta}_1\hat{p}_i(1-\hat{p}_i)\), where \(\hat{p}_i=\Lambda(-1+0.8x_i)\).

The four fitted indices are \(-1,-0.2,0.6,1.4\), giving fitted probabilities approximately \(0.2689,0.4502,0.6457,0.8022\). Their pointwise effects, in probability per unit of \(x\), are

$$ \begin{aligned} \hat{ME}_1(0)&=0.8(0.2689)(1-0.2689)\approx 0.1573,\\ \hat{ME}_1(1)&=0.8(0.4502)(1-0.4502)\approx 0.1980,\\ \hat{ME}_1(2)&=0.8(0.6457)(1-0.6457)\approx 0.1830,\\ \hat{ME}_1(3)&=0.8(0.8022)(1-0.8022)\approx 0.1269. \end{aligned} $$

Thus the AME is the arithmetic average of those four effects:

$$ \widehat{AME}_1 =\frac{0.1573+0.1980+0.1830+0.1269}{4} \approx 0.1663. $$

The mean predictor is \(\bar{x}=(0+1+2+3)/4=1.5\). The fitted index at that mean is \(-1+0.8(1.5)=0.2\), so the MEM is

$$ \widehat{MEM}_1 =0.8\Lambda(0.2)[1-\Lambda(0.2)] =0.8(0.5498)(0.4502) \approx 0.1980. $$

Here the average model-implied local slope across the four profiles is about \(0.1663\) probability points per unit of \(x\). The local slope at the mean profile is about \(0.1980\) probability points per unit. They differ because the first averages four separate slopes; the second calculates one slope at \(x=1.5\).

Worked Example: Probit at the Mean Index

Consider a hypothetical fitted probit model with intercept \(-0.2325\) and coefficient \(0.8\) on \(x\), using the same four hypothetical predictor values \(0,1,2,3\). Assume a probit conditional probability model and treat \(x\) as continuous. The pointwise effect is \(0.8\phi(\hat{\eta}_i)\), where \(\hat{\eta}_i=-0.2325+0.8x_i\).

The indices are \(-0.2325,0.5675,1.3675,2.1675\), and the corresponding standard normal densities are approximately \(0.3883,0.3397,0.1567,0.0381\). Averaging the four effects gives

$$ \widehat{AME}_1 =\frac{0.8}{4}(0.3883+0.3397+0.1567+0.0381) \approx 0.1846. $$

The mean of \(x\) is \(1.5\), so the index at mean covariates is \(-0.2325+0.8(1.5)=0.9675\). At this index, \(\phi(0.9675)\approx 0.2498\), and therefore

$$ \widehat{MEM}_1=0.8\phi(0.9675)\approx 0.8(0.2498)=0.1998. $$

The AME is about \(0.1846\), while the MEM is about \(0.1998\) probability points per unit of \(x\). The mean index is the average of the four indices because the index is linear in the covariates, but the density evaluated at that mean is not the average of the four densities.

Worked Example: The Mean Profile Can Hide Substantial Variation

Suppose a hypothetical logit model has intercept \(0\), coefficient \(1\) on a continuous predictor \(x\), and two equally weighted target profiles, \(x=-2\) and \(x=2\). Assume the model form is appropriate for these profiles. The pointwise effect is \(\Lambda(x)[1-\Lambda(x)]\). Since \(\Lambda(-2)\approx0.1192\) and \(\Lambda(2)\approx0.8808\), the two effects are both approximately \(0.1050\).

The AME is therefore

$$ \widehat{AME} =\frac{0.1192(1-0.1192)+0.8808(1-0.8808)}{2} \approx\frac{0.1050+0.1050}{2} =0.1050. $$

The mean predictor is \((-2+2)/2=0\). At that mean, the fitted probability is \(\Lambda(0)=0.5\), and the effect is

$$ \widehat{MEM}=\Lambda(0)[1-\Lambda(0)]=0.5(0.5)=0.2500. $$

The MEM is the slope at the middle profile, where the logistic curve is steepest. It is not the average slope for the two profiles, which are both farther from the steepest part of the curve. In this example the mean profile \(x=0\) is not one of the observed profiles.

Why Averaging and Evaluating Do Not Usually Commute

The linear index has a useful property: with an intercept and the same observations and weights, the index at the mean covariate vector equals the mean of the individual indices. In symbols, \(\bar{x}'\hat{\beta}\) equals the average of \(x_i'\hat{\beta}\). But a marginal effect also contains \(g(x_i'\hat{\beta})\), and \(g\) is nonlinear in logit and probit models. In general, applying a nonlinear function to a mean does not give the mean of the transformed values.

A short Taylor expansion makes the source of the difference precise. Let \(\eta_i=x_i'\hat{\beta}\), let \(\bar{\eta}\) be their average, and expand \(g(\eta_i)\) around \(\bar{\eta}\). To second order,

$$ g(\eta_i)\approx g(\bar{\eta}) +g'(\bar{\eta})(\eta_i-\bar{\eta}) +\frac{1}{2}g''(\bar{\eta})(\eta_i-\bar{\eta})^2. $$

Averaging this approximation over \(i\), the first-order term vanishes because the deviations from the mean sum to zero. Thus, when the approximation is adequate,

$$ \frac{1}{n}\sum_{i=1}^{n}g(\eta_i) \approx g(\bar{\eta}) +\frac{1}{2}g''(\bar{\eta}) \left[\frac{1}{n}\sum_{i=1}^{n}(\eta_i-\bar{\eta})^2\right]. $$

The second term depends on both curvature and the spread of the indices. This explains why differences can be small when indices cluster tightly and more noticeable when profiles span regions with different slopes or curvature. It does not give a universal direction for the difference: the curvature can change sign, and the effects also include the coefficient \(\hat{\beta}_j\). The examples show that one cannot assume either the AME or the MEM must be larger.

Choosing and Interpreting the Summary

The AME is usually the relevant summary when the question concerns the average model-implied local effect across a specified population or sample. Its value depends on which covariate profiles are included and how they are weighted. The MEM instead answers a narrower question: what is the local marginal effect at the profile formed by setting each covariate to its mean? It can be useful as a concise description of the slope at that profile, but should not be described as an average effect.

Both summaries are model-based and are expressed in outcome-probability units per unit of the continuous covariate. A value of \(0.05\), for example, means a local change of about 0.05 in predicted probability per one-unit increase in the covariate at the profile or profiles being summarized. It does not mean a five-percentage-point change for every individual over any arbitrary finite increase. Nor does either summary by itself establish a causal effect.

A derivative is generally not the appropriate way to summarize a binary regressor: there is no meaningful infinitesimal change from zero to one. Its probability effect is instead described by comparing predicted probabilities at the two regressor values. The interpretation must match the covariate’s scale and support.

Common Mistake

Common mistake: “The average covariate value is \(\bar{x}\), so the marginal effect at \(\bar{x}\) must equal the average marginal effect.” This reasoning averages the input before applying the nonlinear derivative. The AME first calculates an effect at each profile and then averages those effects; the MEM first averages the covariates and then calculates one effect. Because the link derivative is nonlinear, these operations generally give different results.
Key takeaway: State the target whenever reporting a nonlinear-model marginal effect. The AME averages pointwise slopes over a covariate distribution; the MEM is the slope at the mean covariate profile. Neither is automatically the preferred summary in every application.

Check Your Understanding

Use the definitions and examples above to answer these questions.

  1. In a logit model, what is averaged to calculate the AME for a continuous covariate?
  2. What does the MEM evaluate, and why might its covariate profile not be an observed individual?
  3. Why does a linear index not imply that the AME equals the MEM in a probit model?
  4. In the two-profile logit example, explain why the MEM is larger than the AME.
  5. What does an estimated marginal effect of \(0.04\) per unit mean, and what does it not establish on its own?
Clinical Biostats