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.