9.5 When logs remove what looked like heteroskedasticity
Section 7.6 met a fan-shaped residual plot and reached for robust standard errors. Was that the only option?
Robust standard errors accept the heteroskedasticity and correct for it. The other response is to ask why it was there.
Earnings are a highly skewed variable, and skewed variables often produce fan-shaped residuals simply because their upper tail is long. Taking logarithms compresses that tail.
spread_by_quartile <- function(m) {
q <- cut(fitted(m), quantile(fitted(m), 0:4/4), include.lowest = TRUE)
s <- tapply(residuals(m), q, sd)
c(round(max(s) / min(s), 3))
}
c(levels = spread_by_quartile(lm(annual_earnings ~ education, data = wages)),
logs = spread_by_quartile(log_simple))#> levels logs
#> 3.607 1.013
In levels, the residuals in the top quarter of fitted values are 3.6 times as spread out as those in the bottom quarter. In logs the ratio is 1.01 — the spread is essentially identical across quartiles.
The heteroskedasticity was not a deep feature of the world. It was a consequence of measuring earnings in rupees rather than in proportional terms.
This is the second thing a fan-shaped residual plot can be telling you. Section 7.6 treated it as a fact about the variance, to be accepted and corrected. Sometimes it is instead a fact about the scale of the variable, and changing the scale removes it entirely.
This is why economists often try a log specification before reaching for robust standard errors.
None of this makes robust standard errors wrong.
They remain the right tool when the variance genuinely differs across observations — when the underlying variability really is larger for some units than others, and no transformation will change that. Section 7.6’s advice to report them by default in cross-sectional work stands.
The point is only that a fan-shaped plot is a symptom with two possible causes, and reaching for the correction without asking about the cause means never discovering that the variable was on the wrong scale.
Robust standard errors would have widened the intervals around the problem. Taking logs asked why it was there.