Macroeconomic model reference

Fixed-effects panel Model

Pooled cross-country or cross-region regression with country and time fixed effects to net out unit-level and aggregate variation.

Empirical forecasting models · Model guide

Fixed-effects panel: question, structure, and use cases

Pooled cross-country or cross-region regression with country and time fixed effects to net out unit-level and aggregate variation.

How do you estimate causal effects across countries or regions while controlling for all time-invariant unobserved heterogeneity?

Background

Cross-country growth regressions (Barro 1991, Mankiw-Romer-Weil 1992) estimate the determinants of GDP growth across 50-150 countries. The problem: countries differ in countless unobserved ways - institutions, culture, geography, colonial history - that are correlated with the regressors. A regression of GDP growth on investment share, education, and population growth will be biased if omitted institutional quality is correlated with investment. OLS attributes the institutional effect to investment, inflating its estimated coefficient. The fixed-effects estimator solves this by including a separate intercept (dummy variable) for each country. These country-specific intercepts absorb all time-invariant unobserved heterogeneity, purging the within-country estimates of omitted-variable bias from permanent cross-country differences.

The estimation works by demeaning. Subtract each country's time-series average from every observation: y_it - bar{y}_i = beta * (x_it - bar{x}_i) + (epsilon_it - bar{epsilon}_i). The country fixed effect alpha_i cancels out. What remains is the within-country variation: how changes in x within a given country over time relate to changes in y within that same country. This is the 'within estimator.' It identifies beta from temporal variation only, discarding all cross-sectional information. If x does not vary over time within countries (e.g., a time-invariant institutional index), the fixed-effects estimator cannot estimate its effect at all.

Time fixed effects (year dummies) complement entity fixed effects. A two-way fixed-effects model includes both country dummies and year dummies: y_it = alpha_i + gamma_t + beta * x_it + epsilon_it. The year dummies absorb global shocks (oil crises, financial contagion, pandemics) that hit all countries simultaneously. After two-way demeaning, beta is identified from within-country, within-year variation: how a country's deviation from its own average and from the global year average relates to its regressor's deviation from the same double average.

The fixed-effects panel is the default specification in empirical macroeconomics and public economics when panel data is available. The IMF's cross-country fiscal policy studies, the World Bank's growth diagnostics, OECD economic surveys, and the academic growth-institutions literature (Acemoglu, Johnson, Robinson 2001 for instruments; Rodrik, Subramanian, Trebbi 2004 for comparison) all rely on fixed-effects panels as their baseline specification. The Hausman test adjudicates between fixed and random effects; when it rejects random effects (as it almost always does in macro panels), fixed effects is the standard.

How the Parts Fit Together

The data structure is a balanced or unbalanced panel: N entities (countries, states, industries) observed over T time periods (years, quarters). The dataset has N x T observations (or fewer if unbalanced). Each observation is indexed by (i, t). The dependent variable y_it is the macroeconomic outcome of interest (GDP growth, inflation, unemployment, debt-to-GDP ratio). The regressors x_it are the policy or structural variables whose effects we want to estimate (tax rate, trade openness, government spending share, institutional quality index).

The model separates the error term into three components. The entity fixed effect alpha_i captures all time-invariant unobserved characteristics of entity i (geography, deep institutions, culture). The time fixed effect gamma_t captures all entity-invariant shocks at time t (global recessions, oil shocks, technology shifts). The idiosyncratic error epsilon_it is the remaining variation specific to entity i at time t, assumed to satisfy strict exogeneity: E[epsilonitxi1,...,xiT,alphai,gammat]=0E[epsilon_it | x_i1, ..., x_iT, alpha_i, gamma_t] = 0.

Estimation by OLS on the demeaned data (within transformation) is algebraically equivalent to LSDV (least squares with dummy variables) but computationally cheaper for large N. Standard errors must be clustered at the entity level to account for serial correlation in the idiosyncratic error within each entity's time series. Failure to cluster produces dramatically understated standard errors and spurious significance. With small N (fewer than 50 clusters), cluster-robust standard errors are themselves unreliable; the wild cluster bootstrap (Cameron, Gelbach, Miller 2008) provides a finite-sample correction.

Applications

The IMF's cross-country fiscal policy research uses fixed-effects panels extensively. Fiscal Monitor chapters often estimate how consolidation episodes, spending cuts, tax changes, and debt dynamics relate to GDP growth, unemployment, and inequality after absorbing country and year effects. These estimates inform policy advice, but they are not the same object as a structural fiscal-multiplier estimate from a time-series SVAR.

Growth regressions in the Barro tradition pool 50-100 countries over 30-50 years, with country fixed effects absorbing deep determinants (geography, colonial legacy) and identifying beta from within-country changes over time (how a country's GDP growth changed when its investment share changed). The World Bank's World Development Report and the OECD's Going for Growth publication rely on panel-FE estimates of the growth effects of structural reforms (product market regulation, labor market flexibility, trade openness).

Monetary policy transmission studies use panel-FE across euro area countries or US states to estimate how interest rate changes affect output and prices while controlling for country-specific structural characteristics. Romer and Romer (2004) inspired a literature using narrative identification of monetary shocks in panel settings. Regional panels (US states, EU NUTS-2 regions) estimate local fiscal multipliers, spatial spillovers, and the effects of place-based policies.

Do not use fixed-effects panels when the variable of interest does not vary over time within entities (e.g., the effect of latitude on growth - FE cannot estimate this), when T is very small (T < 5) so that within-entity variation is minimal, when cross-sectional dependence is strong and standard FE inference fails, or when the true model is dynamic (lagged dependent variable) and strict exogeneity is violated.

Components

αi\alpha_iEntity fixed effect

Time-invariant unobserved heterogeneity for entity i. Absorbs all permanent cross-entity differences (institutions, geography, culture). Eliminated by the within transformation.

γt\gamma_tTime fixed effect

Entity-invariant shock at time t. Absorbs all common time-series variation (global recessions, commodity cycles). Estimated by year dummies or time demeaning.

β\betaSlope coefficients

The causal parameters of interest. Estimated from within-entity, within-time variation. Identified under strict exogeneity of the regressors.

εit\varepsilon_{it}Idiosyncratic error

Entity-time-specific disturbance. Must be uncorrelated with all leads and lags of x within the entity (strict exogeneity). Allowed to be serially correlated and heteroskedastic.

y¨it=yityˉiyˉt+yˉˉ\ddot{y}_{it} = y_{it} - \bar{y}_i - \bar{y}_t + \bar{\bar{y}}Double-demeaned dependent variable

After subtracting entity mean, time mean, and adding back the grand mean. This is the transformed variable in the two-way FE regression.

N,TN, TPanel dimensions

N = number of cross-sectional entities. T = number of time periods. Asymptotics depend on which dimension grows: N-large-T-fixed (micro panels), T-large-N-fixed (time-series panels), or both growing (macro panels).

Assumptions

Strict exogeneityTestable

E[epsilonitxi1,xi2,...,xiT,alphai]=0E[epsilon_it | x_i1, x_i2, ..., x_iT, alpha_i] = 0 for all t. Current idiosyncratic error is uncorrelated with past, present, and future regressors within the entity.

If violated: If past y affects current x (reverse causality) or if current shocks affect future x (feedback), the within estimator is inconsistent. Dynamic panels (lagged dependent variable) violate strict exogeneity by construction; the Arellano-Bond GMM estimator is needed instead.

No time-varying omitted variablesMaintained

All time-varying determinants of y_it correlated with x_it are included in the model. The fixed effects absorb time-invariant confounders but not time-varying ones.

If violated: If a time-varying confounder (e.g., policy expectations, political regime change) is omitted and correlated with x, the within estimator is biased. Fixed effects are not a panacea for endogeneity; they only address the time-invariant component.

Homogeneous slope coefficientsTestable

The effect of x on y is the same across all entities: beta does not vary with i. The within estimator pools all entities and estimates a single beta.

If violated: If beta_i varies across countries (heterogeneous effects), the pooled FE estimator converges to a weighted average of entity-specific betas, with weights that depend on within-entity variance of x. This weighted average may not represent any individual country's effect and can even have the wrong sign (negative weighting problem).

Sufficient within-entity variationTestable

The regressors x_it vary meaningfully over time within each entity. Variables that are constant or nearly constant within entities have no identifying variation after demeaning.

If violated: Time-invariant regressors (distance to equator, colonial origin) are perfectly collinear with entity fixed effects and cannot be estimated. Slowly varying regressors (institutional indices that change once per decade) have very little within-entity variation, producing large standard errors and imprecise estimates.

No cross-sectional dependence (for standard inference)Testable

epsilon_it is independent across entities i for any given t, after conditioning on entity and time fixed effects.

If violated: Cross-sectional dependence (spatial spillovers, common unobserved factors beyond time dummies) produces biased standard errors even with entity-level clustering. Driscoll-Kraay standard errors or factor-augmented models are needed.

Correct functional formTestable

The relationship between y and x is linear in parameters (possibly after transformation). No threshold effects, interactions, or nonlinearities are omitted.

If violated: A linear specification misses diminishing returns (e.g., the effect of education on growth declines at higher education levels), interaction effects (the effect of trade openness depends on institutional quality), and threshold effects (fiscal multipliers differ above and below some debt-to-GDP ratio).

Continue reading

Concepts, data, and nearby models

Open the concept, data series, policy setting, or neighboring model that anchors this page.