Concept

Sandwich estimator — where it appears

A variance estimate for a fitted coefficient built as A⁻¹BA⁻¹, from the design's second moment and the same moment weighted by squared errors. The bread A is what the fit inverted and the filling B is what the errors did; where the error variance is constant the two cancel and it collapses to the model-based estimate exactly.

Named by 6 essays across 3 fields — each of them below, with the objects they name alongside it.

What each error is a claim about, and what the claim comes out as. Each variance estimate's average over 20000 draws, divided by the variance the slope actually has across those same draws, at 80 rows with the error variance leaning towards the edges of the design (γ = 0.8). One is a standard error that is right. The model-based estimate reads 0.6081 of the spread, so its standard error is 77.98% of the one it should report; the four robust corrections read 0.9576, 0.9821, 0.9961, 1.0362. Two further routes agree with the count and share none of its arithmetic: n times the counted variance is 4.8905 against a population sandwich of 4.9200, and the counted ratio of the two standard errors is 1.2799 against a closed form of 1.2806.

The bread and the filling

The robust standard error is not a safety margin. At one setting of the error variance it is 1.2806 times the model-based one and at another it is 0.8246 times it, and the sign of a single dial decides which.

sandwich · Misspecification
What each correction is worth, exactly. Each variance estimate's expectation under a constant error variance, divided by the variance the slope actually has, at 20 rows on an even design, by two routes: the closed form E[eᵢ²] = σ²(1 − hᵢᵢ) carried through each correction's own weight, and the mean of 20000 counted estimates. The maximum leverage here is 0.1857 and the design's fourth-moment share Σu⁴/(Σu²)² is 0.0897, which is the only thing the closed form reads. HC0 comes out at 0.8603 — short by construction, since its factor is exactly 1 − 1/n − Σu⁴/(Σu²)². HC1 reaches 0.9559, HC2 is exactly 1.0000 at every design and every sample size, and HC3 overshoots to 1.1647. On an even design the four are within a fifth of each other and the choice barely matters.

Three corrections and a leverage

On an even design of twenty rows the four robust corrections read 0.8603, 0.9559, 1.0000 and 1.1647 of the truth and the choice barely matters. Add one point at x = 8 and they read 0.3191, 0.3419, 1.0000 and 5.1127.

sandwich · Misspecification
Six intervals for the white predictor, a five-period moving average. Under a five-period moving average, over 200 regressions of 120 rows with an eight-lag band, how often each 95% interval for the white predictor's coefficient covers it: two-step band, as reported 95.5%; joint fit, as reported 72.0%; joint fit, White's sandwich 71.0%; joint fit, four-lag sandwich 71.0%; joint fit, band maximised again 85.5%; the law's own covariance 92.0%. The bootstrap redraws each regression 24 times from its fitted coefficients and fitted band, maximising the band afresh on every redraw.

An interval that knows the band was maximised

A regression whose coefficients and eight-lag error band are maximised together prints an interval that covers 72% to 83% where 95% was promised, because it reports nearly the precision of a known covariance and delivers less. Two repairs were named. A sandwich standard error read off the whitened residuals repairs nothing — 71% to 83% — because the maximisation has already made those residuals look independent. A parametric bootstrap that redraws from the fitted band and maximises the band again on every redraw repairs about half the gap, to 85.5% to 89%, by pricing the maximisation through repeating it. What it cannot price is that the band it redraws from is the maximised one.

family · Dependence
The rows are held fixed; only the clusters move. Counted coverage of four 95% intervals for a slope, at five cluster counts with the row count held at 300 throughout and a within-cluster correlation of 0.1, over 6000 draws apiece, with the sizes equal. The interval that counts rows covers 53.42% at 5 clusters — a second closed form says 2Φ(z/√D) − 1 = 54.44% for a design effect of 6.900, and reads nothing about clusters at all. The cluster-robust interval read against a normal covers 74.43% there and 94.20% at 100 clusters; read against a t on G − 1 it covers 85.08% and 94.47%. The number of independent things is the cluster count, and every quantity here is blind to how many rows were typed.

The count that is not the rows

Three hundred rows in five clusters of sixty carry 6.9000 times the variance an independent-rows calculation reports, and the interval that counts rows covers 53.42%. The same five unequal sizes laid out two ways give design effects of 9.3158 and 5.4652.

sandwich · Misspecification
One estimator, three answers, and only the reference changes. Coverage of the cluster-robust 95% interval for the slope against the number of clusters, at 30 rows in each. The estimator is identical in all three curves; what differs is the number it is compared against. At 5 clusters it covers 75.05% against a normal, 85.30% against a t on 4 degrees of freedom and 87.95% against a t on 3. At 80 clusters the three agree to within a point. The correction costs nothing: the same standard error, a different table.

The reference the sandwich is read against

The cluster-robust interval covers 75.05% at five clusters and 93.58% at eighty. The same estimate read against a t on G − 2 covers 87.95% at five, and the estimator is unchanged — three hundred rows grouped into five clusters cover 74.28% where the same three hundred grouped into seventy-five cover 94.63%.

sandwich · Misspecification
Six intervals, one of them honest by right. How often each rule's reported 95% interval covers the true coefficient under a five-period moving average, over 1000 draws of 120 rows, for the most persistent predictor (its own lag-one correlation 0.9) and the white one. The law's own covariance covers 94.9% and 94.1%. Least squares covers 65.0% on the persistent predictor and 94.4% on the white one; a fitted ρ̂ 93.0% and 96.3%; the two-step band 86.5% and 97.3%. The joint fit covers 73.2% and 71.4% — short on both, and short on the white predictor where every other rule is honest — and counting its eight band coefficients gives 76.1% and 73.5%.

The interval the joint fit reports

Maximising a regression's coefficients and an eight-lag covariance band together gives a better estimate than plugging the band in. It also prints an interval that covers 71% to 85% of the time where 95% was promised — on the white predictor too, where every other rule is honest — because it reports almost the precision of the law's own covariance and delivers less than half of that advantage. Counting the eight lags it estimated buys one to two points.

timeseries · Dependence

Named alongside it

The objects these essays reach for when they reach for this one.

Monte CarloDegrees of freedomConfidence intervalCoverageEstimated varianceLeverageStandard errorClosed formCluster-robust standard errorCluster sizeClustered samplingCovariance matrix

All concepts