Tutorials › Regression Analysis (Undergraduate) › Common Misreadings of Conditional and Average Effects

Simple Slopes and Marginal Effects · Tutorial 391 of 991

Common Misreadings of Conditional and Average Effects

Use the interaction model’s equations and uncertainty calculations to identify common misreadings and report conditional and average effects accurately.

Intermediate 10 min read

What You'll Learn

  • Identify which conditional slope an interaction coefficient represents.
  • Calculate and interpret a contrast between two conditional effects.
  • Distinguish an average marginal effect from an effect evaluated at mean covariates.
  • Explain why overlapping confidence intervals do not determine a contrast test.
  • Check units and uncertainty when combining estimated coefficients.

Why Effects in Interaction Models Are Easy to Misread

An interaction model does not have one universal slope for every setting of its predictors. A coefficient attached to an interaction term describes how one slope changes with another predictor; it is not automatically the slope for every observation. Related mistakes arise when an average effect is treated as an effect at mean covariates, or when two separate confidence intervals are used to judge whether two effects differ.

The key is to state precisely which quantity is being interpreted: a model coefficient, a conditional effect at specified covariate values, an average over a defined set of observations, or a contrast between two effects. These quantities can be related, but they are not interchangeable.

Interaction Coefficients and Conditional Slopes

Consider a linear model for an outcome \(Y\), a continuous predictor \(X\), and a binary group indicator \(G\), coded 0 or 1. Suppose the conditional mean is modeled as

$$ E(Y\mid X,G)=\beta_0+\beta_1X+\beta_2G+\beta_3XG. $$

Here \(\beta_0,\beta_1,\beta_2,\beta_3\) are population model coefficients. The fitted model replaces them with estimates \(\hat{\beta}_0,\hat{\beta}_1,\hat{\beta}_2,\hat{\beta}_3\). The conditional slope of \(Y\) with respect to \(X\) is the change in the modeled mean outcome for a one-unit increase in \(X\), holding \(G\) fixed.

$$ \frac{\partial E(Y\mid X,G)}{\partial X}=\beta_1+\beta_3G. $$

For \(G=0\), the slope is \(\beta_1\). For \(G=1\), it is \(\beta_1+\beta_3\). Thus, \(\beta_3\) is the difference between the group-1 slope and the group-0 slope. It is not, by itself, the slope in both groups. This interpretation follows directly from the model algebra; a causal interpretation would require additional design and assumptions beyond this equation.

Definition: A conditional effect is an effect defined at specified values of other predictors. An average marginal effect is an average of observation-specific marginal effects over a stated set of covariate values, using specified weights. The target observations and weights are part of what the average means.

Worked Example: What the Interaction Coefficient Represents

Suppose a hypothetical model predicts a task score in points from practice time \(X\), measured in hours, and group \(G\). The estimated coefficients are \(\hat{\beta}_1=2.0\) points per hour and \(\hat{\beta}_3=-0.8\) points per hour. Assume the conditional mean has the group-by-practice form above.

Group 0 slope. Substituting \(G=0\) into the slope formula gives \(\hat{\beta}_1+\hat{\beta}_3(0)=2.0\) points per hour.

Group 1 slope. Substituting \(G=1\) gives \(\hat{\beta}_1+\hat{\beta}_3(1)=2.0-0.8=1.2\) points per hour.

Meaning of the interaction coefficient. The group-1 slope minus the group-0 slope is \(1.2-2.0=-0.8\) points per hour. Thus, the estimated practice-time slope is 0.8 points per hour lower in group 1 than in group 0. The interaction coefficient is the slope difference, not the slope for group 1 alone. These are model-based associations; the calculations do not establish that additional practice causes the score change.

Average Effects and Effects at Mean Covariates

Averages need a target: an average over which observations, and with what weights? In a model where the marginal effect is a linear function of one moderator, averaging that effect over a specified sample gives the same result as evaluating it at that moderator’s sample mean. For example, if the slope is \(\hat{\beta}_1+\hat{\beta}_3 Z_i\), its unweighted sample average is \(\hat{\beta}_1+\hat{\beta}_3\bar{Z}\). This special equality should not be generalized to every interaction model.

With multiple interacting moderators, the marginal effect can include products of covariates. The average of a product is not generally the product of averages. Consequently, an average marginal effect over observations can differ from the effect evaluated at the vector of mean covariates. They also answer different questions: the former averages over the chosen observations; the latter evaluates the model at one covariate profile, which may not represent any actual observation.

Worked Example: An Average Slope Versus a Slope at Mean Covariates

Suppose the conditional mean of a hypothetical score \(Y\) includes a continuous practice variable \(X\) and two binary indicators \(Z\) and \(W\), each coded 0 or 1. The model includes all terms shown below. The coefficients relevant to the slope in \(X\) are estimated as \(\hat{\beta}_1=1.0\), \(\hat{\beta}_4=0.4\), \(\hat{\beta}_5=0.2\), and \(\hat{\beta}_7=1.2\), in points per practice hour.

$$ \widehat{E}(Y\mid X,Z,W)= \hat{\beta}_0+\hat{\beta}_1X+\hat{\beta}_2Z+\hat{\beta}_3W+ \hat{\beta}_4XZ+\hat{\beta}_5XW+\hat{\beta}_6ZW+\hat{\beta}_7XZW. $$

The estimated conditional slope in \(X\) is

$$ \hat{\beta}_1+\hat{\beta}_4Z+\hat{\beta}_5W+\hat{\beta}_7ZW. $$

Consider a hypothetical set of 10 observations: four have \((Z,W)=(0,0)\), one has \((0,1)\), one has \((1,0)\), and four have \((1,1)\). Each of the four combinations is represented. The sample means are \(\bar{Z}=5/10=0.5\) and \(\bar{W}=5/10=0.5\), while the sample mean of the product is \(\overline{ZW}=4/10=0.4\).

Average marginal effect over these observations. Averaging the slope formula across the 10 observations gives

$$ 1.0+0.4(0.5)+0.2(0.5)+1.2(0.4) =1.0+0.2+0.1+0.48=1.78 $$

The average estimated slope is 1.78 score points per practice hour for this set of observations.

Effect at the mean covariates. Substituting \(Z=0.5\) and \(W=0.5\) into the same slope formula gives

$$ 1.0+0.4(0.5)+0.2(0.5)+1.2(0.5)(0.5) =1.0+0.2+0.1+0.3=1.60 $$

This is 1.60 score points per practice hour, not 1.78. The difference occurs because \(\overline{ZW}=0.4\), whereas \(\bar{Z}\bar{W}=0.25\). An average of the interaction product uses the observed joint values; evaluating at the means uses the product of the separate means. Before reporting either number, state which covariate profile or observation set defines the quantity.

Why Overlapping Intervals Do Not Test a Difference

A confidence interval for one effect describes uncertainty about that effect. To assess whether two effects differ, the relevant quantity is their contrast and the uncertainty of that contrast. The variance of a difference depends on both individual variances and their covariance. Looking only at whether two separate intervals overlap discards that covariance and is not a valid substitute for testing the difference.

$$ \widehat{\operatorname{Var}}(\hat{\theta}_1-\hat{\theta}_0) = \widehat{\operatorname{Var}}(\hat{\theta}_1) +\widehat{\operatorname{Var}}(\hat{\theta}_0) -2\widehat{\operatorname{Cov}}(\hat{\theta}_1,\hat{\theta}_0). $$

For a contrast, the standard error is the square root of its estimated variance. A confidence interval or test for the contrast is then based on that standard error, using the appropriate reference distribution for the analysis. In an interaction model, a group-slope difference is often precisely the interaction coefficient, but its uncertainty still needs to be assessed directly.

Worked Example: Testing the Difference Between Two Slopes

Suppose a hypothetical model estimates a group-0 practice slope of \(\hat{\theta}_0=2.0\) points per hour and a group-1 slope of \(\hat{\theta}_1=1.2\) points per hour. Each slope has standard error 0.4 points per hour. Their estimated covariance is \(0.120\) (points per hour)\(^2\). Assume large-sample normal inference is appropriate for this illustration.

The separate approximate 95% confidence intervals are calculated as estimate \(\pm 1.96\) standard errors:

$$ 2.0\pm1.96(0.4)=[1.216,2.784],\qquad 1.2\pm1.96(0.4)=[0.416,1.984]. $$

The intervals overlap from 1.216 to 1.984 points per hour. That overlap alone does not settle whether the slopes differ. The estimated difference, group 1 minus group 0, is \(1.2-2.0=-0.8\) points per hour. Its estimated variance is

$$ 0.4^2+0.4^2-2(0.120)=0.16+0.16-0.24=0.08 \quad\text{(points per hour)}^2. $$

Therefore the standard error of the difference is \(\sqrt{0.08}=0.2828\) points per hour. The test statistic for a zero difference is

$$ z=\frac{-0.8-0}{0.2828}=-2.828. $$

The two-sided normal-approximation p-value is about 0.0047. Under the assumed model and reference distribution, this is evidence against equal population slopes. The approximate 95% confidence interval for the difference is

$$ -0.8\pm1.96(0.2828)=[-1.354,-0.246] \quad\text{points per hour}. $$

This interval excludes zero, agreeing with the test. The conclusion comes from the contrast’s uncertainty, not from the overlap pattern of the two separate intervals.

A Short Derivation: The Interaction Coefficient Is a Slope Difference

For the group-by-continuous model, substitute \(G=1\) and \(G=0\) into the conditional mean. The mean functions are \(\beta_0+\beta_1X+\beta_2+\beta_3X\) and \(\beta_0+\beta_1X\), respectively. Differentiating each with respect to \(X\) gives slopes \(\beta_1+\beta_3\) and \(\beta_1\). Subtracting the second slope from the first yields

$$ (\beta_1+\beta_3)-\beta_1=\beta_3. $$

This algebra explains the coefficient’s interpretation. If the scientific question concerns the slope within group 1, report \(\hat{\beta}_1+\hat{\beta}_3\), with its uncertainty calculated for that sum. If the question concerns how the slopes differ between groups, report \(\hat{\beta}_3\), with its own standard error or interval.

Common Misreadings and Corrections

  • Wrong: “The interaction coefficient is the slope in the non-reference and reference groups.” Correction: In the binary-group model, it is the difference between the group slopes. Calculate each conditional slope from the model.
  • Wrong: “The average effect must equal the effect at average covariate values.” Correction: That equality holds for some linear effect functions, but interaction products can make the average product differ from the product of averages. Specify the target average and compute it accordingly.
  • Wrong: “The two confidence intervals overlap, so the effects are not significantly different.” Correction: Form the contrast and calculate its standard error using the covariance between estimates; then assess the contrast directly.
  • Wrong: “The estimated effects are in points per hour, so their covariance is in squared points per hour.” Correction: A covariance has the product of the two quantities’ units. For two slopes measured in points per hour, the covariance is in (points per hour)\(^2\), equivalently points\(^2\) per hour\(^2\).

These distinctions matter because an accurate coefficient calculation can still answer the wrong question if its conditioning values, averaging population, or contrast are left unstated. Clear interpretation names the outcome and predictor units, identifies the group or covariate values, and says whether the result is a conditional effect, an average, or a difference between effects.

Check Your Understanding

For each question, identify the relevant effect or contrast before calculating or interpreting it.

  1. In a model with a binary group indicator \(G\) and interaction \(XG\), what does the coefficient of \(XG\) represent when \(G\) is coded 0 and 1?
  2. A slope is \(\hat{\beta}_1+\hat{\beta}_3Z\). Explain why its unweighted average over observations equals its value at \(\bar{Z}\).
  3. In a model whose slope includes a \(ZW\) term, which sample quantity is needed to average that part of the slope over observations?
  4. Why is overlap between two separate confidence intervals not a direct test of the difference between their estimates?
  5. If two slope estimates both have units of meters per second, what are the units of their covariance?