Uncertainty Is Not the Same as the Mean Model
A standard error describes uncertainty in an estimate; it does not decide whether the estimate answers the intended question. Heteroskedasticity-robust standard errors address one particular problem: conventional variance calculations can be wrong when the errors have unequal variances. They do not change the regression line, add a missing predictor, or make a curved conditional mean linear.
This distinction matters because regression analysis involves both a model for the conditional mean and a model for the variability around that mean. Robust covariance estimates relax the equal-variance part of the usual calculation. They still rely on the fitted predictors and mean structure being suitable for the coefficient interpretation at issue.
For a sample of \(n\) observations, write the fitted linear model in matrix form as \(y=X\beta+\varepsilon\). Here \(y\) is the response vector, \(X\) is the design matrix (including a column of ones if there is an intercept), \(\beta\) is the coefficient vector, and \(\varepsilon\) is the error vector. The ordinary least-squares estimate is \(b=(X^\mathsf{T}X)^{-1}X^\mathsf{T}y\), assuming \(X\) has full column rank.
For the coefficients to describe the stated conditional mean, the mean assumption is \(E(\varepsilon\mid X)=0\). Errors may have different conditional variances, so let \(\Omega=\operatorname{Var}(\varepsilon\mid X)\). Under independent observations, \(\Omega\) is diagonal, but its diagonal entries need not be equal. Conditional on \(X\), the covariance of the OLS estimate is then
The heteroskedasticity-consistent HC0 estimate replaces the unknown error variances in this expression with squared OLS residuals. It estimates covariance; it does not modify \(X\), \(y\), or the OLS coefficient vector \(b\). Under suitable large-sample conditions—including a correctly specified conditional mean, independent observations, full rank, and finite moments—this sandwich estimate can support approximate inference despite unequal error variances. It does not, by itself, guarantee accurate small-sample inference.
What a Robust Standard Error Changes
Consider hypothetical observations with a single predictor and an intercept. The fitted line is \(b_0+b_1x\), and its residuals are \(e_i=y_i-b_0-b_1x_i\). For HC0, the estimated covariance matrix is
where \(x_i^*\) is the column vector of predictors for observation \(i\), including the intercept entry \(1\). The square root of a diagonal entry is the HC0 standard error for the corresponding coefficient. The estimate uses the same OLS residuals and the same coefficient estimate as ordinary least squares; only the estimated covariance calculation changes.
Worked Example: HC0 Changes the Estimated Uncertainty
Suppose a hypothetical sample has predictor values \(0,0,1,1\) and responses \(10,12,12,18\). Fit an intercept and a slope. For illustration, assume observations are independent and the intended conditional mean is linear, while the response variance may differ between the two predictor values. This four-observation calculation illustrates the estimator, not a recommendation to trust small-sample robust inference.
The mean response at \(x=0\) is \(11\), and at \(x=1\) it is \(15\). With two predictor levels, the fitted intercept and slope are therefore \(b_0=11\) and \(b_1=15-11=4\). The fitted values are \(11,11,15,15\), so the residuals are \(-1,1,-3,3\).
For the slope, the row of \((X^\mathsf{T}X)^{-1}\) corresponding to \(b_1\) is \((-0.5,1)\), because
The HC0 variance estimate for the slope is the sum of the squared residuals multiplied by the squared slope-weight for each observation. The slope-weights are \(-0.5,-0.5,0.5,0.5\), giving
The coefficient remains \(4\) units of response per one-unit increase in \(x\). HC0 supplies an estimated standard error of about \(2.236\) units of slope; it has not changed the fitted line or established that the linear mean assumption is true. With only four observations, the estimate may be unstable, and large-sample justification is weak.
The example separates two outputs that are sometimes mistakenly treated as one. The point estimate \(b_1\) comes from OLS. Its estimated variability comes from a covariance calculation. Replacing the conventional covariance estimate with HC0 can change standard errors, confidence intervals, and test statistics, but it leaves the point estimate intact.
Omitted Curvature Changes What the Slope Represents
If the true conditional mean is curved but a straight line is fitted, a robust covariance estimate cannot make the straight-line mean correct. In general, the OLS line then summarizes a linear approximation over the observed predictor values. Its slope need not equal a constant scientific effect or the rate of change of the true conditional mean throughout that range.
Worked Example: A Straight-Line Fit to a Curved Mean
Suppose a hypothetical process has conditional mean \(E(Y\mid x)=10+2x+x^2\), and observations are taken at \(x=0,1,2,3\). For a transparent illustration, take the responses to equal their conditional means at these four points: \(10,13,18,25\). Fit an intercept and a straight-line slope, omitting the quadratic term.
The predictor mean is \(\bar{x}=1.5\), the response mean is \(\bar{y}=16.5\), and
Thus the OLS slope is \(b_1=25/5=5\), and the intercept is \(b_0=\bar{y}-b_1\bar{x}=16.5-5(1.5)=9\). The fitted line is \(9+5x\), with fitted values \(9,14,19,24\) and residuals \(1,-1,-1,1\).
The true conditional mean has rate of change \(2+2x\), which ranges from \(2\) to \(8\) over \(x=0\) to \(x=3\). The fitted slope of \(5\) is a linear summary for these predictor values, not a constant derivative of the curved mean. A robust standard error could alter the estimated uncertainty around \(5\), but it cannot add the missing \(x^2\) term or turn \(5\) into the varying rate of change.
This example also shows why a robust standard error is not a cure for a mean-model problem. The residuals have a systematic pattern across the predictor values rather than being evidence that the mean is a straight line. A covariance adjustment concerns estimated variability around the fitted coefficients; it does not remove that pattern or change the target represented by the fitted line.
Omitting a Predictor Can Shift the Slope
A coefficient can also be misleading when an important predictor is omitted. The issue is not just that the omitted variable may add variability. If it is associated with a predictor that remains in the regression, its contribution can be absorbed into that predictor's fitted coefficient. Robust standard errors estimate uncertainty for the coefficient produced by the fitted model; they do not undo this omitted-variable contribution.
Worked Example: An Omitted Predictor Alters the Slope
Consider hypothetical observations with \(x=(0,1,2,3)\), \(z=(0,0,1,1)\), and responses generated exactly by \(y=5+2x+4z\). The coefficient of \(x\) in this two-predictor mean is \(2\). Now fit a regression using only an intercept and \(x\).
The responses are \(5,7,13,15\), with \(\bar{x}=1.5\), \(\bar{z}=0.5\), and \(\bar{y}=10\). The sums are \(S_{xx}=5\) and \(S_{xz}=2\). The omitted-variable expression gives
Direct calculation agrees: \(\sum_i(x_i-\bar{x})(y_i-\bar{y})=18\), so the fitted slope is \(18/5=3.6\), not \(2\). The difference is \(1.6\), contributed by the omitted predictor term. A robust covariance estimate for the one-predictor fit can estimate uncertainty around the coefficient produced by that fit. It cannot make that coefficient equal the two-predictor coefficient.
The derivation uses a sample-level condition on the error covariance with \(x\) to display the omitted-variable contribution exactly. In a population argument, the analogous condition is that the error has zero conditional mean given the included and omitted predictors; the slope contribution then depends on the relationship between \(x\) and \(z\). This is a mean-model issue, not a variance-model issue.
Interpret Robust Results Within Their Limits
It is useful to ask separately what a coefficient estimates and how uncertain that estimate is. If the conditional mean is correctly specified and observations meet the relevant independence and sampling conditions, heteroskedasticity-robust covariance estimates can provide inference that does not require equal error variances. If the mean is misspecified, the coefficient may instead describe a linear projection or absorb omitted structure. A robust standard error does not correct that interpretation.
Nor does the term “robust” mean robust to every possible problem. The heteroskedasticity-consistent covariance estimates discussed here address unequal variances under their assumptions. They do not automatically handle dependence between observations, repair measurement errors, or correct selection bias. The mean and sampling assumptions still require attention.
Common Mistake
Wrong reasoning: “I used robust standard errors, so my regression is now valid even though the response curve is nonlinear or an important predictor is missing.” This confuses uncertainty estimation with model specification.
Correction: First identify the mean structure needed for the coefficient interpretation. Then consider whether unequal variance makes the conventional covariance estimate unsuitable. Robust standard errors can address the latter under appropriate conditions; they do not supply missing terms or remove bias relative to a target coefficient.
Check Your Understanding
Answer each question by distinguishing the fitted coefficient from its estimated uncertainty.
- In OLS, what does replacing a conventional covariance estimate with HC0 change, and what does it leave unchanged?
- A fitted straight line is used when the conditional mean is quadratic. What does a robust standard error fail to correct?
- In the omitted-variable derivation, what happens to the one-predictor slope contribution when \(S_{xz}=0\)?
- If an omitted predictor is associated with the included predictor and affects the response mean, why may the fitted slope differ from the coefficient in the full mean model?
- Name one assumption, other than unequal or equal error variances, that must still be considered when using heteroskedasticity-robust inference.