Within Estimator (Fixed Effects) for Panel Data

College Depth 90 in the knowledge graph I know this Set as goal
Unlocks 9 downstream topics
panel-data fixed-effects within

Core Idea

The within estimator controls for unit-specific time-invariant unobserved heterogeneity by demeaning variables within each unit or including unit fixed effects. It is robust to selection based on stable individual characteristics but requires strict exogeneity: errors must be uncorrelated with past, present, and future regressors.

Explainer

You know from panel data fundamentals that the key virtue of panel data is the ability to observe the same unit — a person, firm, or country — across multiple time periods. The within estimator (also called the fixed effects estimator) exploits this longitudinal structure to eliminate a class of confounders that would otherwise bias cross-sectional OLS: stable, unobserved unit characteristics that are correlated with the regressors.

To see why this matters, suppose you want to estimate the effect of job training on wages. Workers who seek out training may differ from those who don't — in ambition, ability, or work ethic. If you simply compare trained and untrained workers in a single cross-section, these unobserved traits confound your estimate. The within estimator sidesteps this by asking a different question: within each worker's own wage history, how does their wage change when they receive training? By focusing on changes within a unit over time, you effectively hold constant everything about that worker that doesn't change — ability, family background, personality — whether or not you can measure those things.

Mechanically, the within estimator demeans every variable by its unit-specific time mean. Define ȳᵢ = (1/T)∑ₜyᵢₜ. Then the regression is run on (yᵢₜ − ȳᵢ) = (xᵢₜ − x̄ᵢ)β + (εᵢₜ − ε̄ᵢ). This transformation wipes out any time-invariant component αᵢ — because αᵢ − ᾱᵢ = 0 by construction. An equivalent approach is to include a separate dummy variable for each unit (unit fixed effects); both produce the same coefficient estimates. The within estimator uses only within-unit variation in x — the fact that a given firm's investment fluctuated over time — while the between estimator would use across-firm variation in average investment levels.

The critical assumption is strict exogeneity: E[εᵢₜ | xᵢ₁, xᵢ₂, ..., xᵢT, αᵢ] = 0. This requires the error at time t to be uncorrelated with the regressors in all periods for unit i — past, present, and future. This is stronger than the contemporaneous exogeneity assumed in cross-sectional OLS. It rules out feedback effects where past outcomes influence current regressors (e.g., if last period's wage affects this period's training decision). When strict exogeneity holds, the within estimator is consistent. When it fails — for instance, due to dynamic effects or reverse causation — the estimator is inconsistent and alternative approaches like the Arellano-Bond GMM estimator are needed. Despite this limitation, fixed effects is among the most widely used tools in empirical economics precisely because it handles the most common form of omitted variable bias with minimal assumptions about the structure of unobserved heterogeneity.

Practice Questions 5 questions

Prerequisite Chain

Counting to 10Counting to 20Understanding ZeroThe Number ZeroCounting to FiveOne-to-One CorrespondenceCombining Small Groups Within 5Addition Within 10Addition Within 20Two-Digit Addition Without RegroupingTwo-Digit Addition with RegroupingAddition Within 100Repeated Addition as MultiplicationMultiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Two-Digit by One-Digit DivisionDivision with RemaindersRemainders and Quotients in DivisionDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueReading and Writing DecimalsComparing and Ordering DecimalsAdding and Subtracting DecimalsMultiplying DecimalsDividing DecimalsDividing FractionsMixed Number ArithmeticOrder of OperationsInteger Order of OperationsVariable ExpressionsCombining Like TermsOne-Step EquationsTwo-Step EquationsSolving Multi-Step EquationsEquations with Variables on Both SidesAngle Pairs: Complementary, Supplementary, and VerticalParallel Lines and TransversalsCorresponding AnglesAlternate Interior AnglesTriangle Angle Sum TheoremExterior Angle TheoremTriangle Inequality TheoremSimilar Triangles: AA SimilaritySimilar Triangles: SSS and SAS SimilarityProportions in Similar TrianglesRight Triangle Trigonometry IntroductionTrigonometric Ratios ReviewRadian MeasureConverting Between Degrees and RadiansThe Unit CircleGraphing Sine and CosineGraphing Tangent and Reciprocal Trigonometric FunctionsDerivatives of Trigonometric FunctionsAntiderivativesIndefinite IntegralsBasic Integration RulesRiemann SumsDefinite Integral DefinitionProbability Density Functions and Continuous DistributionsCumulative Distribution FunctionsContinuous Random VariablesNormal DistributionCentral Limit TheoremConfidence Intervals for MeansZ-Tests and T-Tests for MeansOne-Sample Z-Test for MeansOne-Sample and Two-Sample T-TestsOne-Way ANOVAF-Test and Joint SignificanceR-Squared and Model FitOmitted Variable BiasCausal Inference and the Identification ProblemPotential Outcomes and the Rubin Causal ModelSelection BiasInstrumental VariablesDynamic Panel Models and Arellano-Bond/Blundell-Bond EstimationDynamic Panel Models: Arellano-Bond EstimatorFirst-Difference Estimator for Panel DataWithin Estimator (Fixed Effects) for Panel Data

Longest path: 91 steps · 485 total prerequisite topics

Prerequisites (3)

Leads To (2)