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
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.
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
| Estimator | Key condition for the slope | Variation and main trade-off |
|---|---|---|
| Pooled OLS | The 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 differences | The 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 effects | In 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 effects | The 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:
| Unit | Period 1: \(x\) | Period 2: \(x\) | Period 1: \(y\) | Period 2: \(y\) |
|---|---|---|---|---|
| A | 1 | 2 | 3 | 5 |
| B | 2 | 4 | 7 | 10 |
| C | 4 | 5 | 12 | 14 |
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
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
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
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\):
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\) |
|---|---|---|---|---|---|---|
| A | 1 | 3 | 8 | 12 | 2 | 10 |
| B | 2 | 4 | 13 | 17 | 3 | 15 |
| C | 4 | 6 | 23 | 27 | 5 | 25 |
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
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.
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.
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.
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.
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.
Check Your Understanding
For each question, state the relevant assumption or identifying variation, not just the estimator’s name.
- Which estimator removes an additive unit-specific component that is constant over time, and what exogeneity condition remains necessary?
- Why can RE be more precise than FE when its assumptions hold, and why can the same feature cause bias when those assumptions fail?
- In a two-period panel with the same regressors and specification, what is the relationship between the FE and FD slope estimates?
- A regressor never changes within any unit. Can FE identify its slope? Explain using the transformed regressor.
- What additional modeling step distinguishes CRE from conventional RE when unit effects may be related to regressors?