A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Within Estimator (Fixed Effects) for Panel Data

College Depth 122 in the knowledge graph I know this Set as goal
9topics build on this
899prerequisites beneath it
See this on the map →
Fixed Effects ModelsPanel Data: Structure, Notation, and Advantages+1 moreBetween and Random Effects Estimators for Panel DataHausman Test: Fixed Effects Versus Random Effects
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

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Number Bonds to 10Addition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts (0s, 1s, 2s, 5s, 10s)Multiplication 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 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineComparing and Ordering IntegersAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersDividing IntegersUnit RatesProportionsPercent ConceptConverting Between Fractions, Decimals, and PercentsOperations with Rational NumbersTwo-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 IntroductionSine, Cosine, and Tangent RatiosTrigonometric 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 VariablesProbability Density FunctionsExpected ValueWeak Law of Large NumbersProbability Axioms and RulesConditional ProbabilityIndependence of EventsSampling DistributionsStandard Error of EstimatorsHypothesis Testing: Framework and LogicP-values and Statistical SignificanceEffect Size and Practical SignificanceHypothesis Testing: Framework and LogicZ-Tests and T-Tests for MeansOne-Sample Z-Test for MeansOne-Sample and Two-Sample T-TestsInference in Linear RegressionPrediction Intervals in RegressionLinear Regression BasicsResiduals and Goodness of Fit (R²)Simple (Bivariate) OLS RegressionClassical OLS Assumptions (Gauss-Markov)Multiple RegressionInterpreting Regression CoefficientsHypothesis Testing in RegressionF-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: 123 steps · 899 total prerequisite topics

Prerequisites (3)

Leads To (2)