Tutorials › Econometrics (Graduate) › Selecting An Estimator For A Static Panel

Fixed and Random Effects · Tutorial 270 of 952

Selecting An Estimator For A Static Panel

Learn how each static-panel estimator uses within-unit or between-unit variation, and choose one by assessing its assumptions rather than relying on a test alone.

Intermediate 10 min read

What You'll Learn

  • State the assumptions under which pooled OLS, fixed effects, and random effects identify a common slope.
  • Distinguish the within-unit variation used by fixed effects and first differences from the between-unit variation retained by pooled and random-effects models.
  • Recognize when first differences and fixed effects give the same slope and when their error structures differ.
  • Explain how correlated random effects can model a relationship between unit effects and regressor means.
  • Choose an estimator by matching the research design and assumptions, not by treating a specification test as a decision rule.

Introduction

A static panel follows the same units over time and relates an outcome to contemporaneous regressors. Several familiar estimators can be applied to the same data, but they do not rely on the same assumptions or use the same variation. The choice is therefore substantive: it depends on whether persistent unit characteristics may be related to the regressors, and on whether the relationship of interest is identified by changes within units or differences between them.

This tutorial gives a decision framework for pooled ordinary least squares (pooled OLS), fixed effects (FE), first differences (FD), random effects (RE), and correlated random effects (CRE). The goal is not to declare one estimator universally best. It is to identify which assumptions each estimator needs, what variation supports its slope, and what to do when an assumption is not credible.

The Static-Panel Model and the Identifying Variation

Let \(i=1,\ldots,N\) index units and \(t=1,\ldots,T\) index periods. A basic static-panel model is

$$ y_{it}=x_{it}'\beta+a_i+u_{it}. $$

Here \(y_{it}\) is the outcome, \(x_{it}\) is a vector of observed regressors, \(\beta\) is the slope vector, \(a_i\) is an unobserved unit-specific component that is constant over time, and \(u_{it}\) is a time-varying disturbance. “Static” means the model does not include a lagged outcome as a regressor. The assumptions below concern the relationship between regressors and disturbances; they do not, by themselves, settle issues such as measurement error, functional form, or omitted time-varying confounders.

Definition: Within-unit variation is variation in \(x_{it}\) over time for a given unit, measured relative to that unit’s mean or through changes between periods. Between-unit variation is variation in unit-level averages, such as \(\bar{x}_i=T^{-1}\sum_t x_{it}\), across units. Pooled OLS and RE can use both sources; FE and FD remove the time-constant \(a_i\) and identify slopes from within-unit variation.

For simplicity, the formulas here use a balanced panel. If the substantive model needs common period shocks, time indicators can be included; the relevant assumptions then apply conditional on those included time effects. In all cases, a slope cannot be estimated if the relevant transformed regressors have no independent variation.

What Each Estimator Assumes and Uses

EstimatorKey condition for the slopeVariation and main trade-off
Pooled OLSThe combined omitted component \(a_i+u_{it}\) has conditional mean zero given the regressors.Uses within- and between-unit variation. It is vulnerable to bias if \(a_i\) is related to the regressors.
Fixed effects\(E(u_{it}\mid a_i,X_i)=0\) for every \(t\), where \(X_i\) denotes the unit’s full regressor history.Uses within-unit variation and permits \(a_i\) to be related to \(X_i\). Time-invariant regressors are removed.
First differencesThe differenced disturbance is mean-independent of the differenced regressors; strict exogeneity of \(u_{it}\) given \(a_i\) and \(X_i\) is a sufficient condition.Uses changes over time and removes \(a_i\). Its efficiency relative to FE depends on the error structure and panel length.
Random effectsIn addition to exogeneity of \(u_{it}\), \(E(a_i\mid X_i)=0\).Uses within- and between-unit variation and models the panel error covariance. It is inconsistent for the common slope if the required orthogonality fails.
Correlated random effectsThe conditional mean of \(a_i\) given \(X_i\) is adequately represented by a specified function of unit-level regressor summaries, commonly their means.Includes those summaries alongside the original regressors; its slope on time-varying regressors can match the FE within slope under the stated specification.

The condition for pooled OLS can be written \(E(a_i+u_{it}\mid X_i)=0\) at each period. Because \(a_i\) is repeated in every observation for unit \(i\), treating the panel as an ordinary independent sample does not make this condition true. Even when pooled OLS consistently estimates the slope, its standard errors must account for dependence within units if that dependence is present.

FE removes \(a_i\) by subtracting each unit’s time average. For a scalar regressor, its slope is identified from the demeaned regression, provided the demeaned regressor has nonzero variation. FD instead subtracts adjacent observations. Both transformations remove any time-constant component, but neither removes confounding by a time-varying omitted variable that changes alongside \(x_{it}\).

RE uses a generalized least-squares transformation determined by the variance components. It can be more precise than FE when its assumptions hold because it retains between-unit information. But that information is precisely why correlation between \(a_i\) and the regressors matters: RE cannot treat it as harmless without an orthogonality assumption.

Worked Comparisons

Worked Example: Pooled OLS and FE Use Different Associations

Suppose a hypothetical balanced panel contains three units observed in two periods. The recorded values are:

UnitPeriod 1: \(x\)Period 2: \(x\)Period 1: \(y\)Period 2: \(y\)
A1235
B24710
C451214

The pooled OLS slope, with an intercept, is the cross-product of deviations from the overall means divided by the sum of squared regressor deviations. Here \(\bar{x}=3\) and \(\bar{y}=8.5\), so

$$ \hat{\beta}_{\mathrm{pooled}} =\frac{\sum_{i,t}(x_{it}-3)(y_{it}-8.5)} {\sum_{i,t}(x_{it}-3)^2} =\frac{32}{12}=2.667. $$

For two periods, the FE slope can be calculated from the changes, using a regression through the origin after removing the unit intercepts. The changes \(\Delta x_i\) are \(1,2,1\), and the changes \(\Delta y_i\) are \(2,3,2\). Therefore

$$ \hat{\beta}_{\mathrm{FE}} =\frac{\sum_i \Delta x_i\Delta y_i}{\sum_i(\Delta x_i)^2} =\frac{(1)(2)+(2)(3)+(1)(2)}{1^2+2^2+1^2} =\frac{10}{6}=1.667. $$

The pooled and FE slopes differ because the pooled calculation also uses differences in average \(x\) and average \(y\) across units. The difference alone does not prove which estimate is correct. If persistent unit characteristics are correlated with \(x\), pooled OLS’s between-unit association may confound the slope; FE avoids that particular problem, provided its within-unit exogeneity assumption is credible. Both slopes are descriptive calculations on hypothetical data, not evidence of a causal effect.

Worked Example: Checking Whether RE’s Transformation Fits the Question

Consider a hypothetical balanced panel with \(T=2\). Suppose, for illustration, that the variance of the unit component is \(\sigma_a^2=4\) and the variance of the idiosyncratic component is \(\sigma_u^2=1\). The RE quasi-demeaning factor is

$$ \lambda =1-\sqrt{\frac{\sigma_u^2}{\sigma_u^2+T\sigma_a^2}} =1-\sqrt{\frac{1}{1+2(4)}} =1-\frac{1}{3} =\frac{2}{3}. $$

For unit A, suppose \(x_{i1}=2\) and \(x_{i2}=4\), giving \(\bar{x}_i=3\). Quasi-demeaning replaces each observation by \(x_{it}-\lambda\bar{x}_i\):

$$ x_{i1}^{*}=2-\frac{2}{3}(3)=0, \qquad x_{i2}^{*}=4-\frac{2}{3}(3)=2. $$

For another unit with \(x_{i1}=x_{i2}=5\), the transformed observations are both \(5-\frac{2}{3}(5)=1.667\). Unlike full demeaning, which would turn a time-constant regressor into zero, quasi-demeaning retains some between-unit information when \(\lambda<1\). That can improve precision if \(E(a_i\mid X_i)=0\) and the variance-components model is appropriate. If the unit component is related to the regressor history, retaining that between-unit information can instead undermine the slope’s consistency. The numerical transformation does not test the orthogonality assumption; that assumption must be defended using the research setting and relevant specification analysis.

Worked Example: Choosing FE, FD, or CRE When Unit Effects Are Related to Regressor Means

Suppose three hypothetical units are observed twice, with the following exact data:

Unit\(x_{i1}\)\(x_{i2}\)\(y_{i1}\)\(y_{i2}\)\(\bar{x}_i\)\(\bar{y}_i\)
A13812210
B241317315
C462327525

The change is \(\Delta x_i=2\) and \(\Delta y_i=4\) for every unit. Thus the FE slope and the FD slope are both

$$ \hat{\beta} =\frac{\sum_i \Delta x_i\Delta y_i}{\sum_i(\Delta x_i)^2} =\frac{3(2)(4)}{3(2^2)} =\frac{24}{12}=2. $$

The unit means also show a strong between-unit pattern: \(\bar{y}_i=5\bar{x}_i\) for each unit. A CRE model takes the form \(y_{it}=\beta x_{it}+\theta\bar{x}_i+c_i+u_{it}\), where the regressor mean represents the modeled relationship between persistent unit heterogeneity and the regressor history. In these data, within-unit changes give \(\beta=2\). The mean relationship gives \(\bar{y}_i=(\beta+\theta)\bar{x}_i=5\bar{x}_i\), so \(\theta=5-2=3\). Thus the example’s between association does not have to be imposed on the within slope: CRE represents it through the mean term.

This calculation is exact for the constructed data and is not a general guarantee that CRE is correctly specified. In an application, CRE requires the included summaries to represent the conditional mean of \(a_i\) adequately, and the slope still requires informative within-unit variation. With two periods, FE and FD yield the same slope under the same regressor specification; with more periods, they generally transform the data differently and need not yield the same estimate.

A Practical Selection Process

A defensible choice begins with the estimand and the source of credible variation, not with a contest among software outputs. The following sequence makes the assumptions explicit.

1
Specify the static model and target slope.
State the outcome, regressors, period effects if needed, and whether the target is a common slope. Consider whether persistent unit differences plausibly move with the regressors.
2
Check within-unit information.
Ask whether the regressors of interest change enough within units to identify a slope after removing \(a_i\). If a regressor is constant within every unit, FE and FD cannot identify its separate slope.
3
Assess the exogeneity conditions.
If correlation between \(a_i\) and \(X_i\) is credible, do not rely on pooled OLS or conventional RE for the common slope. FE or FD can remove \(a_i\), but still require suitable exogeneity of the time-varying disturbances.
4
Choose how to use between-unit information.
Use RE when its orthogonality and covariance assumptions are defensible. Consider CRE when dependence of \(a_i\) on regressor means is plausible and a specified conditional-mean model is appropriate. Compare results as a sensitivity analysis, not as proof that the assumptions hold.

Hausman specification tests can inform a comparison of FE and RE under their conditions, but a test result does not establish the model’s substantive assumptions. In particular, a failure to reject is not proof that \(a_i\) is uncorrelated with the regressors, and a rejection does not diagnose every possible source of misspecification. The earlier material on Hausman tests is useful for interpreting that evidence; the estimator choice should still be tied to the design and identifying variation.

Common Pitfalls and Why the Choice Matters

  • Choosing RE because it is more precise. Potential precision gains matter only if the RE orthogonality and covariance assumptions hold. A smaller standard error cannot repair an inconsistent slope.
  • Assuming FE solves all confounding. FE removes additive, time-invariant unit heterogeneity. It does not remove time-varying confounders, reverse causation, or errors correlated with current or past regressors.
  • Treating a Hausman result as an automatic verdict. Tests have assumptions and finite-sample limitations. Use their results alongside design knowledge and sensitivity analyses.
  • Forgetting what variation identifies the estimate. FE and FD answer a within-unit question. If the scientifically relevant information is only between units, their slopes are not identified from that information.
  • Calling pooled OLS invalid merely because it is pooled. It can be consistent under the appropriate conditional-mean assumption. The issue is whether that assumption is plausible, not the estimator’s label.
Key takeaway: Select an estimator by matching the identifying variation to the scientific question and the estimator’s assumptions to the panel design. FE and FD protect against correlation between time-constant unit effects and regressors; RE and pooled OLS require stronger orthogonality to use between-unit information, while CRE models a specified relationship between unit effects and regressor summaries.

Check Your Understanding

For each question, state the relevant assumption or identifying variation, not just the estimator’s name.

  1. Which estimator removes an additive unit-specific component that is constant over time, and what exogeneity condition remains necessary?
  2. Why can RE be more precise than FE when its assumptions hold, and why can the same feature cause bias when those assumptions fail?
  3. In a two-period panel with the same regressors and specification, what is the relationship between the FE and FD slope estimates?
  4. A regressor never changes within any unit. Can FE identify its slope? Explain using the transformed regressor.
  5. What additional modeling step distinguishes CRE from conventional RE when unit effects may be related to regressors?
Clinical Biostats