Robust Standard Errors

College Depth 83 in the knowledge graph I know this Set as goal
Unlocks 36 downstream topics
robust-SE sandwich-estimator clustered-errors inference

Core Idea

Robust standard errors (Huber-White or 'sandwich' estimators) produce valid standard errors and confidence intervals in the presence of heteroskedasticity of unknown form, without requiring knowledge of the specific variance structure. Clustered standard errors extend this to settings where observations within groups (e.g., workers in the same firm, students in the same school) share common unobserved factors, inducing within-cluster correlation. Using clustered standard errors when observations are not truly independent is essential for valid inference in panel and grouped data. Modern applied econometrics routinely reports clustered standard errors as a default.

Common Misconceptions

Explainer

You already know that heteroskedasticity — non-constant variance of the error term — does not bias OLS coefficient estimates but does invalidate the standard formula for standard errors, making hypothesis tests and confidence intervals unreliable. The classical OLS standard error formula assumes the error variance is constant across all observations (Var(εᵢ) = σ² for all i). When this assumption fails, the formula produces the wrong answer, and the t-statistics you compute do not follow a t-distribution under the null — so your p-values are wrong.

The Huber-White robust standard error (also called the sandwich estimator) corrects this without requiring you to know the specific form of the heteroskedasticity. The name "sandwich" comes from the matrix formula: the robust variance estimator is (X'X)⁻¹ × [Σ εᵢ² xᵢxᵢ'] × (X'X)⁻¹ — the bread is (X'X)⁻¹ on both sides, and the meat in the middle is estimated directly from the squared residuals. Instead of assuming a constant σ², you let each observation's squared residual stand in for its own variance. The result is a consistent estimator of the true variance-covariance matrix of β̂ regardless of the heteroskedasticity pattern, as long as n is large.

Clustered standard errors extend this logic to a second kind of violation: within-group correlation. Suppose you are studying the effect of a policy on workers in the same firm, or students in the same school. Workers in the same firm share a common manager, culture, and economic environment — their errors are likely correlated, not independent. If you treat them as independent observations, you overstate how much information you actually have. The clustered sandwich estimator replaces individual squared residuals with the sum of residuals within each cluster, then sums across clusters. This produces standard errors that are valid when observations within clusters are correlated in any arbitrary way, as long as the clusters themselves are independent.

The choice of clustering level requires judgment. You should cluster at the level where assignment variation occurs — if a policy was assigned at the state level, cluster by state, not by individual. Clustering at too fine a level wastes the correction; clustering at too broad a level risks running out of clusters (the estimator requires many clusters, typically 30-50 minimum, to be reliable). With few clusters, alternative approaches like wild cluster bootstrap are more appropriate. In modern applied econometrics, reporting clustered standard errors is the default in virtually any setting with grouped or panel data — not doing so requires justification.

One subtlety: robust and clustered standard errors do not make your OLS estimates more efficient or less biased. They only correct the inference — the standard errors, confidence intervals, and p-values. If heteroskedasticity or clustering is severe, the OLS estimator may still be inefficient compared to alternatives like GLS or FGLS, which explicitly model the error structure. But in most applied settings, OLS with clustered standard errors is preferred for its robustness: it does not require correctly specifying the within-cluster correlation structure, whereas FGLS requires you to get that structure right or risk introducing bias.

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 FitMulticollinearityRobust Standard Errors

Longest path: 84 steps · 423 total prerequisite topics

Prerequisites (3)

Leads To (2)