Panel Random Effects Model

Econometrics
Introduced by
Balestra & Nerlove
Year
1966
Type
Panel data estimator
Family
Econometrics / time series

What does it do?

The panel random effects (RE) model treats unit-specific effects as random draws from a population distribution rather than as fixed constants.

It is estimated by generalised least squares, which allows inference about time-invariant regressors that fixed effects estimation removes. Its validity rests on the assumption that these unit-specific effects are uncorrelated with the regressors.

The intuition behind the method

Consider a panel of many firms observed over several years. Each firm has unmeasured traits, such as management culture or location advantages, that affect its outcomes. The random effects model treats these traits as draws from a common population distribution rather than as separate constants to be estimated. This lets the model use both the variation within each firm over time and the variation between firms, which typically gives more precise estimates than fixed effects when the assumption is defensible. The cost is that if those unmeasured traits are correlated with the predictors, the coefficients are biased, and the Hausman comparison with fixed effects is needed to check for this.

History

The random effects (error components) model was introduced by Balestra and Nerlove in their 1966 Econometrica paper on the demand for natural gas, where they faced the problem of pooling cross-sectional and time-series data. The variance components and GLS framework were developed further in the subsequent econometrics literature. The Hausman specification test is now the standard tool for choosing between fixed and random effects. The model is widely used in applied micro- and macroeconometrics.

When to use it

Use the random effects model when (1) you have a panel dataset with repeated observations on the same units, (2) you want to include time-invariant regressors (e.g., country, gender, industry) that fixed effects would absorb, and (3) you are willing to assume that unobserved unit-specific effects are uncorrelated with all regressors, an assumption you should test with the Hausman test. RE is particularly appropriate when units are sampled randomly from a larger population and you want to generalise to that population. Do not use RE when unobserved heterogeneity is correlated with the predictors (the Hausman test rejects); in that case fixed effects is consistent and RE is biased.

Limitations and considerations

  • Consistency requires that the unit effect be uncorrelated with the unit means of the regressors, E(x̄_i α_i) = 0, and that the composite error be uncorrelated with them, E(x̄_i u_it) = 0. These are conditions on time averages rather than zero correlation with X_it in each period. Unlike fixed effects, no within-unit transformation protects the estimator if these conditions fail.
  • If the Hausman test rejects, RE estimates are biased and inconsistent, while fixed effects remains consistent.
  • Because the transformation retains part of the between-unit variation, any correlation of unit-level regressors with u_i enters the estimate of β directly.
  • Time-constant omitted variables are absorbed into u_i under the RE assumptions, and no transformation removes them, so the estimator is less robust to them than fixed effects.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • The FGLS estimator weights within-unit and between-unit variation using the estimated variance components, so it uses information that fixed effects discards.
  • It can estimate coefficients on time-invariant variables (for example sex or country of birth), which fixed effects cannot identify.
  • Its conventional standard errors account for the within-unit correlation induced by u_i, whereas pooled OLS standard errors ignore it. This holds only if ε_it is homoskedastic and not serially correlated; otherwise cluster-robust standard errors are needed.
  • It estimates a variance structure rather than a separate intercept for every unit, so it uses fewer degrees of freedom than fixed effects, which matters in short panels.

Applications

  • Estimating the wage return to education using repeated survey data, controlling for unobserved individual ability assumed independent of schooling.
  • Analysing the effect of policy interventions across countries or regions when country-level fixed effects would absorb key explanatory variables.
  • Health economics: modelling patient outcomes across hospitals when hospital identity is treated as a random sample from a broader population.
  • Environmental economics: estimating pollution–income relationships across countries while including time-invariant geographic controls.
  • Macroeconomics: modelling cross-country growth regressions where country dummies would consume degrees of freedom.

How it works

How it works

1

The outcome for unit i at time t is written as an intercept, a linear combination of the predictors X_it with coefficients β, a unit-specific effect u_i capturing unobserved heterogeneity, and an idiosyncratic error ε_it.

Formula
y_{it} = \alpha + X_{it}\beta + u_{i} + \varepsilon_{it}
2

The unit effect u_i and the idiosyncratic error ε_it are each assumed to have constant variance and to be independent of each other and of X. Because the composite error is built from these two components, the model is also called the error components model.

Formula
\text{Var}(u_{i}) = \sigma^2_u, \quad \text{Var}(\varepsilon_{it}) = \sigma^2_\varepsilon
3

θ combines the two variance components, together with the number of periods T, into a weight between 0 and 1. In practice σ²_u and σ²_ε are unknown and must be replaced by sample estimates; common procedures are those of Swamy and Arora and of Amemiya, and software defaults differ. As the variance of the unit effect grows relative to the idiosyncratic variance, θ approaches 1 and the estimator approaches the within (fixed effects) estimator. As that variance shrinks, θ approaches 0 and the estimator approaches pooled OLS.

Formula
\theta = 1 - \frac{\sigma_\varepsilon}{\sqrt{T\sigma^2_u + \sigma^2_\varepsilon}}
4

Each observation is partially demeaned: θ times its unit mean is subtracted from y and from each X. With θ equal to 1 this is the full within transformation; with θ below 1, part of the between-unit variation is retained. The transformation removes the within-unit correlation that u_i induces in the composite error.

Formula
\tilde{y}_{it} = y_{it} - \theta\bar{y}_{i}, \quad \tilde{X}_{it} = X_{it} - \theta\bar{X}_{i}
5

Applying least squares to the transformed variables, with θ computed from the estimated variance components, gives the feasible GLS (FGLS) estimator β̂_RE. Because the variance components are estimated, the estimator is not BLUE in finite samples. With T fixed and N large it is consistent and asymptotically normal, and it is asymptotically equivalent to GLS. Under the random effects assumptions it is asymptotically more efficient than pooled OLS with corrected cluster-robust standard errors.

Formula
\hat{\beta}_{RE} = (\tilde{X}^{\top}\tilde{X})^{-1}\tilde{X}^{\top}\tilde{y}

Common pitfalls

  • Skipping the Hausman test: estimate RE and FE on the same sample and compare their coefficients on the time-varying regressors. The Durbin–Wu–Hausman test formalises this comparison by testing whether the difference between the FE and RE estimates is systematic, with degrees of freedom equal to the number of coefficients compared. A significant statistic means RE is biased and FE should be preferred. The standard form assumes homoskedastic errors and an efficient RE estimator; under heteroskedasticity or clustered errors, use a robust version, such as the regression-based test.
  • Including predictors that are themselves functions of the unobserved effect (e.g., lagged dependent variables) without addressing the resulting endogeneity, for example with GMM or other instruments.
  • Interpreting between-unit variation as causal when RE blends within and between variation; a causal reading requires the exogeneity assumption to hold.
  • Using RE on very short panels (T = 2 or 3), where the variance component estimates are imprecise and quasi-demeaning can be unreliable.
  • Using conventional standard errors when ε_it is heteroskedastic or serially correlated. Both invalidate the usual RE standard errors, although the estimator remains consistent. Use cluster-robust standard errors at the unit level in either case.

Frequently asked questions

How do I decide between fixed effects and random effects?

Run both estimators on the same sample and apply the Hausman test. A significant test statistic (small p-value) means the exogeneity assumption underlying RE is rejected and fixed effects should be used. If the test is insignificant, RE is acceptable and more efficient.

Why can random effects estimate time-invariant variables but fixed effects cannot?

Fixed effects removes all time-constant variation by demeaning each unit, so any variable that does not change over time is perfectly collinear with the unit dummy and cannot be identified. Random effects uses a partial demeaning (weight θ < 1) that preserves some between-unit variation, allowing time-invariant regressors to be estimated.

What is the error components structure?

The composite error is u_it = u_i + ε_it, combining a unit-specific component u_i (the random effect, constant across time for each unit) and an idiosyncratic component ε_it (varying across units and time). This two-level structure induces within-unit correlation across time periods, which the GLS transformation explicitly accounts for.

Does the random effects estimator work with unbalanced panels?

Yes. GLS-based RE estimation extends to unbalanced panels, where units have different numbers of time observations. The variance component estimators need adjustments for unbalanced data, and implementations can differ in how they make them.

What happens if I use pooled OLS instead of random effects on panel data?

Under the exogeneity assumption, pooled OLS point estimates remain consistent, but it ignores the within-unit correlation induced by the random effect. Its standard errors are generally incorrect and can be too small, which inflates t-statistics and leads to over-rejection of null hypotheses.

Related methods

Sources

  1. Balestra, P., & Nerlove, M. (1966). Pooling cross section and time series data in the estimation of a dynamic model: The demand for natural gas. Econometrica, 34(3), 585–612.

    Open DOI reference
  2. Wooldridge, J. M. (2010). Econometric Analysis of Cross Section and Panel Data (2nd ed.). MIT Press.

    ISBN: 978-0262232586
  3. Principles of Econometrics, 5th Edition, s. 689

  4. Panel Data Econometrics: Theory (2019), s. 376

  5. A Guide to Modern Econometrics, 5th Edition, s. 451