Tutorials › Econometrics (Graduate) › Bias From Pooling Heterogeneous Slopes

Panel Designs and Unbalanced Data · Tutorial 288 of 952

Bias From Pooling Heterogeneous Slopes

Learn how a pooled panel slope weights heterogeneous unit-specific slopes and why that weighting changes the estimand.

Intermediate 10 min read

What You'll Learn

  • Derive the pooled fixed-effects slope from unit-demeaned observations
  • Identify how each unit’s observed within-unit regressor variation determines its weight
  • Distinguish the pooled slope from an equal-unit average slope
  • Relate the difference between those targets to the association between slopes and regressor variation
  • Explain why pooling without unit effects can add between-unit relationships
  • Recognize the exogeneity and variation conditions needed for the interpretation

Why a Pooled Slope Can Be Misleading

A pooled panel regression reports one slope even when units may respond differently to changes in a regressor. That single number can be useful, but it does not generally represent the response of a typical unit or the simple average of unit-specific responses. The reason is that units contribute different amounts of within-unit information about the regressor.

This tutorial derives the pooled slope for a regression with unit effects, where identification comes from comparing changes within each unit. The key result is that the pooled slope is a weighted average of unit-specific slopes, with weights proportional to each unit’s observed within-unit variation in the regressor. We also distinguish this result from ordinary pooled regression without unit effects, where between-unit differences can affect the coefficient.

Model and assumptions: For unit \(i\) and observed period \(t\), suppose \(y_{it}=\alpha_i+\beta_i x_{it}+u_{it}\). The intercept \(\alpha_i\) and slope \(\beta_i\) may vary across units. A unit-fixed-effects regression includes a separate intercept for each unit but imposes one common fitted slope. For the usual conditional interpretation, assume strict exogeneity, \(E(u_{it}\mid X_i,\alpha_i,\beta_i)=0\), where \(X_i\) denotes the unit’s observed regressor values. Each unit used to identify a slope must have within-unit variation in \(x\); units without it contribute no slope information.

For an unbalanced panel, let \(O_i\) be the set of periods in which unit \(i\) is observed, and let \(T_i\) be the number of such periods. Define \(\bar{x}_i\) and \(\bar{y}_i\) as that unit’s observed-period means. Demeaning within unit removes its intercept: \(y_{it}-\bar{y}_i=\beta_i(x_{it}-\bar{x}_i)+(u_{it}-\bar{u}_i)\). The unit’s contribution to the regressor’s within variation is

$$ S_{xx,i}=\sum_{t\in O_i}(x_{it}-\bar{x}_i)^2. $$

This quantity is nonnegative and is zero when the observed regressor is constant for that unit. If \(T_i>1\), it can also be written as \((T_i-1)s_{x,i}^2\), where \(s_{x,i}^2\) is the sample variance of the unit’s observed regressor values. Thus the weight reflects both the number of observations and how widely the regressor varies within the unit.

Deriving the Pooled Fixed-Effects Slope

The common fixed-effects slope is the ordinary least-squares slope from the demeaned observations pooled across units. Its numerator adds within-unit cross-products of regressor and outcome; its denominator adds within-unit regressor sums of squares.

$$ \hat{\beta}_{FE} = \frac{\displaystyle\sum_i\sum_{t\in O_i}(x_{it}-\bar{x}_i)(y_{it}-\bar{y}_i)} {\displaystyle\sum_i S_{xx,i}}. $$

Substituting the unit-specific model after demeaning separates the contribution of each slope from the contribution of the errors. This gives the exact finite-sample identity:

$$ \hat{\beta}_{FE} = \sum_i w_i\beta_i + \frac{\displaystyle\sum_i\sum_{t\in O_i}(x_{it}-\bar{x}_i)(u_{it}-\bar{u}_i)} {\displaystyle\sum_i S_{xx,i}}, \qquad w_i=\frac{S_{xx,i}}{\sum_j S_{xx,j}}. $$

The weights are nonnegative and sum to one when the denominator is positive. Since \(\sum_{t\in O_i}(x_{it}-\bar{x}_i)=0\), the error cross-product for unit \(i\) can equivalently use \(u_{it}\) in place of \(u_{it}-\bar{u}_i\). Under the stated strict-exogeneity assumption, the error term has conditional expectation zero given the regressors and unit-specific parameters. Consequently, the conditional expectation of the estimator is the variance-weighted combination \(\sum_i w_i\beta_i\). In a realized sample, the error term need not be exactly zero.

Interpretation: Under the model and exogeneity condition, the pooled fixed-effects slope summarizes unit-specific slopes using weights proportional to observed within-unit regressor variation. It gives more influence to units with more informative within-unit variation—not necessarily to units that are more numerous, more typical, or more important for a particular policy question.

Worked Examples of the Weighting

Worked Example: Calculating the Pooled Slope

Consider three hypothetical units. Suppose their within-unit regressor sums of squares and unit-specific slopes are as follows. Assume the within-unit error cross-products are zero in this constructed example.

Unit\(S_{xx,i}\)\(\beta_i\)
A21
B83
C105

The total within variation is \(2+8+10=20\), so the weights are \(w_A=2/20=0.10\), \(w_B=8/20=0.40\), and \(w_C=10/20=0.50\). The pooled slope is

\(\hat{\beta}_{FE}=0.10(1)+0.40(3)+0.50(5)=0.10+1.20+2.50=3.80.\)

The equal-unit average of these slopes is \((1+3+5)/3=3.00\). The pooled estimate is higher because the units with larger slopes also have more within-unit regressor variation in this example. The difference is about the estimand and the weights; it does not, by itself, establish that the pooled slope is incorrectly calculated.

Worked Example: Unequal Panel Length and Unequal Variation

Suppose two hypothetical units have the following observed centered regressor values. Unit A has four observations, \(x_{it}-\bar{x}_i=(-1,0,0,1)\), and slope \(\beta_A=2\). Unit B has three observations, \(x_{it}-\bar{x}_i=(-2,0,2)\), and slope \(\beta_B=5\). Let the within-unit errors be zero.

For A, \(S_{xx,A}=(-1)^2+0^2+0^2+1^2=2\). For B, \(S_{xx,B}=(-2)^2+0^2+2^2=8\). Therefore the pooled slope is

\(\hat{\beta}_{FE}=\{2(2)+8(5)\}/(2+8)=(4+40)/10=4.40.\)

The equal-unit average is \((2+5)/2=3.50\). B receives 80% of the pooled weight because \(8/(2+8)=0.80\), despite having fewer observed periods. The number of observations alone does not determine a unit’s influence: the spread of its observed regressor values matters as well.

When Does the Pooled Slope Match an Equal-Unit Average?

For \(N\) units with positive within variation, define the equal-unit average slope as \(\bar{\beta}=N^{-1}\sum_i\beta_i\), and the average within sum of squares as \(\bar{S}_{xx}=N^{-1}\sum_i S_{xx,i}\). Ignoring the sampling error term for the moment, the difference between the variance-weighted slope and the equal-unit average is

$$ \frac{\sum_i S_{xx,i}\beta_i}{\sum_i S_{xx,i}}-\bar{\beta} = \frac{\frac{1}{N}\sum_i(S_{xx,i}-\bar{S}_{xx})(\beta_i-\bar{\beta})}{\bar{S}_{xx}}. $$

To verify the identity, write \(S_{xx,i}=\bar{S}_{xx}+(S_{xx,i}-\bar{S}_{xx})\) and \(\beta_i=\bar{\beta}+(\beta_i-\bar{\beta})\). In the weighted numerator, the terms involving only one deviation sum to zero because \(\sum_i(S_{xx,i}-\bar{S}_{xx})=0\) and \(\sum_i(\beta_i-\bar{\beta})=0\). Subtracting \(\bar{\beta}\sum_i S_{xx,i}\) leaves \(\sum_i(S_{xx,i}-\bar{S}_{xx})(\beta_i-\bar{\beta})\). Dividing by \(\sum_i S_{xx,i}=N\bar{S}_{xx}\) gives the displayed identity.

The numerator on the right is the across-unit covariance, using divisor \(N\), between within variation and slope. If units with larger within variation tend to have larger slopes, the weighted slope tends to exceed the equal-unit average. If their slopes tend to be smaller, it tends to fall below it. The two averages coincide if all slopes are equal, if all units have equal within variation, or more generally if the across-unit covariance is zero.

Worked Example: How Slope–Variation Association Changes the Target

Return to the three hypothetical units in the first example. Their average within variation is \(\bar{S}_{xx}=(2+8+10)/3=6.667\), and their equal-unit average slope is \(\bar{\beta}=3\). The covariance between within variation and slope, with divisor 3, is

\(\{(2-6.667)(1-3)+(8-6.667)(3-3)+(10-6.667)(5-3)\}/3\)
\(=\{9.334+0+6.666\}/3=5.333.\)

Dividing by \(\bar{S}_{xx}\) gives \(5.333/6.667=0.800\). Thus the weighted slope exceeds the equal-unit average by 0.800, matching \(3.80-3.00=0.80\). The larger-slope units account for more of the observed within variation, so they shape the pooled slope more strongly.

Why Unit Effects Matter for This Interpretation

The variance-weighted result applies to the regression with unit effects. A regression that pools all observations with only a common intercept does not generally have this interpretation. It can use both within-unit movements and differences between unit means. If unit means of \(x\) are related to unit means of \(y\), that between-unit relationship can change the pooled coefficient even when every unit-specific within slope is known.

Worked Example: Between-Unit Differences Alter the Pooled Slope

Consider two hypothetical units observed twice. Unit A has \(x=(0,2)\) and \(y=(0,2)\), so its within-unit slope is 1. Unit B has \(x=(8,10)\) and \(y=(-3,3)\), so its within-unit slope is 3. These data follow unit-specific linear relationships, with different intercepts.

Without unit effects, ordinary pooled regression uses the total centered cross-product divided by the total centered \(x\) sum of squares. The overall means are \(\bar{x}=5\) and \(\bar{y}=0.5\). The four \(x\) deviations are \((-5,-3,3,5)\), and the four \(y\) deviations are \((-0.5,1.5,-3.5,2.5)\). Thus the numerator is

\((-5)(-0.5)+(-3)(1.5)+(3)(-3.5)+(5)(2.5)=2.5-4.5-10.5+12.5=0,\)

while the denominator is \((-5)^2+(-3)^2+3^2+5^2=68\). The ordinary pooled slope is therefore \(0/68=0\), not a weighted average of the two within slopes. In contrast, the fixed-effects slope is \(\{2(1)+2(3)\}/(2+2)=2\). Here between-unit differences offset the within-unit cross-products in the regression without unit effects. This example shows why the regression specification must be stated before interpreting a pooled coefficient.

Conditions, Scope, and a Common Pitfall

The weighting identity is a statement about the fixed-effects least-squares calculation. Interpreting its error term as having conditional expectation zero requires an exogeneity assumption; if within-unit regressor changes are related to the error, pooling does not remove that source of bias. The panel must also contain positive total within variation, \(\sum_i S_{xx,i}>0\), or the common within slope is not identified.

In an unbalanced panel, observed periods determine both the means used for demeaning and the resulting \(S_{xx,i}\). Therefore the weights describe the units and periods actually represented in the regression. They need not correspond to an equal-unit target, and they can differ from weights based on a different panel composition. Interpreting the estimate for another population or observation pattern requires an explicit argument about that target; the algebra alone does not supply one.

  • Pitfall: “The pooled slope is the average effect across units.” This ignores the weights. The fixed-effects pooled slope is generally weighted by \(S_{xx,i}\), not equally across units.
  • Correction: State which average is being discussed. For the unit-fixed-effects regression, report the within-variation-weighted interpretation unless additional conditions make it equal to the target of interest.
  • Pitfall: “Fixed effects make any pooled slope a within-unit average.” A pooled regression without unit indicators can incorporate between-unit differences.
  • Correction: Check whether the fitted regression includes unit effects, and distinguish within-unit variation from between-unit variation before interpreting its coefficient.
  • Pitfall: “A unit with more observed periods must have more weight.” Period count matters through the sum of squares, but the within spread of the regressor matters too.
  • Correction: Inspect \(S_{xx,i}\), not just \(T_i\). A unit with many observations but little within variation may contribute less slope information than a shorter panel with substantial variation.
Key takeaway: With unit effects, heterogeneous-slope pooling produces a within-variation-weighted slope plus a within-error term. The pooled coefficient equals an equal-unit average only under special conditions; without unit effects, between-unit relationships can alter it further.

Check Your Understanding

Use the definitions and weighting result to answer the following questions.

  1. Two units have slopes 2 and 6, and within sums of squares 3 and 9. What is the variance-weighted slope, and what is the equal-unit average?
  2. What does \(S_{xx,i}=0\) imply about unit \(i\)’s contribution to a fixed-effects slope?
  3. Under what condition on the across-unit association between slopes and within variation does the weighted slope exceed the equal-unit average?
  4. Why can an ordinary pooled regression without unit effects fail to be a weighted average of unit-specific within slopes?
  5. Does the variance-weighting identity by itself guarantee that the pooled slope estimates a causal effect? Explain briefly.
Clinical Biostats