Skip to main content
Macro by Mark
  • Home
  • News
  • Calendar
  • Indicators
  • Macro
  • About
Sign inSign up
Macro by Mark

Global Economic Data, Empirical Models, and Macro Theory
All in One Workspace

Public data from government agencies and multilateral statistical releases, anchored in official sources

© 2026 Mark Jayson Nation

Product

  • Home
  • Indicators
  • News
  • Calendar

Macro

  • Overview
  • Models
  • Labs
  • Glossary

Learn

  • Concepts
  • Models
  • Schools
  • History
  • Docs

Account

  • Create account
  • Sign in
  • Pricing
  • Contact
AboutPrivacy PolicyTerms of ServiceTrust and securityEthics and Compliance

Data-Driven Models

Loading Data-Driven Models

Macro by Mark

Unlock Full Macro Model Library with Starter.

This feature is exclusively available to Starter, Research, and Pro. Upgrade when you need this workflow, review pricing, or send a question before changing plans.

Upgrade to StarterView pricingQuestions?Already subscribed? Sign in

What you keep on Free

  • Create and edit one custom board
  • Use up to 3 widgets on each Free board
  • Browse indicators and calendar
← ModelsOverviewHistoryConceptsModelsSchools

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.

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[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. Blanchard and Perotti (2002) estimated fiscal multipliers with country and year fixed effects in a panel of OECD countries. The IMF's Fiscal Monitor routinely reports panel-FE estimates of how fiscal consolidation (spending cuts vs. tax hikes) affects GDP growth, unemployment, and inequality across advanced and emerging economies. These estimates directly inform the Fund's policy advice to member countries.

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.

Literature and Extensions

Key Papers

  • Mundlak (1978) -- formal equivalence between the within estimator and LSDV; conditions under which fixed effects is preferred to random effects
  • Hausman (1978) -- specification test for fixed vs. random effects: tests whether the entity effects are correlated with the regressors
  • Arellano (1987) -- cluster-robust standard errors for panel fixed effects: corrects inference for serial correlation and heteroskedasticity within entities
  • Cameron, Gelbach, and Miller (2008) -- wild cluster bootstrap for small-N panels: finite-sample correction when entity-level clustering is unreliable
  • de Chaisemartin and d'Haultfoeuille (2020) -- heterogeneous treatment effects in two-way FE: the weighted-average interpretation and negative-weight problem

Named Variants

  • One-way FE (entity only): y_it = alpha_i + x_it beta + epsilon_it. Absorbs time-invariant confounders only.
  • Two-way FE (entity + time): y_it = alpha_i + gamma_t + x_it beta + epsilon_it. Absorbs both time-invariant and entity-invariant confounders.
  • Correlated random effects (Mundlak): random effects with entity means of x as additional regressors. Equivalent to FE for the time-varying regressors but also estimates effects of time-invariant variables.
  • Interactive fixed effects (Bai 2009): y_it = alpha_i' f_t + x_it beta + epsilon_it. Replaces additive two-way FE with factor structure alpha_i' f_t that captures heterogeneous responses to common shocks.
  • Difference-in-differences (DID): two-way FE applied to policy evaluation with staggered treatment adoption. Under scrutiny since de Chaisemartin and d'Haultfoeuille (2020) and Sun and Abraham (2021) showed negative weighting problems.

Open Questions

  • The 'negative weighting' problem in staggered DID: standard two-way FE can assign negative weights to some treatment effects under heterogeneous treatment timing. New estimators (Callaway-Sant'Anna, Sun-Abraham, Borusyak-Jaravel-Spiess) fix this but have not yet been universally adopted.
  • How to handle the Nickell bias in dynamic panels when T is moderate (15-30)? Arellano-Bond GMM works for large N, small T. Bias-corrected LSDV (Kiviet 1995) works for moderate T. Neither is ideal for the typical macro panel (N = 50, T = 30).
  • Should researchers report FE estimates alongside correlated random effects estimates to assess sensitivity to the within-variation restriction?

Components

αi\alpha_iαi​Entity 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_tγt​Time 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.

β\betaβSlope coefficients

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

εit\varepsilon_{it}ε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=yit−yˉi−yˉt+yˉˉ\ddot{y}_{it} = y_{it} - \bar{y}_i - \bar{y}_t + \bar{\bar{y}}y¨​it​=yit​−yˉ​i​−yˉ​t​+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, 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[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).