Huber Regression

Statistics
Introduced by
Peter J. Huber
Year
1964
Type
Robust linear regression (M-estimation)

What does it do?

Huber regression is a robust linear regression method built on the M-estimation loss that Peter J. Huber introduced in 1964 for estimating a location parameter.

It applies a squared loss to small residuals and a linear loss to large ones, so outlying values in the outcome have bounded influence on the fitted coefficients. The loss does not down-weight unusual predictor values, so high-leverage observations can still pull the fit.

The intuition behind the method

Plain least squares squares every residual, so a single far-off point can drag the whole line toward it. Huber regression draws a threshold: while a residual stays small it is penalised like OLS, but once it grows past the threshold the penalty switches to a gentler linear cost. The line therefore still follows the bulk of the data closely while refusing to chase a handful of outliers.

History

Peter J. Huber's 1964 paper, Robust Estimation of a Location Parameter, introduced the loss function on which this method rests. That paper treats estimation of a location parameter under contaminated normal models and proposes estimators lying between the sample mean and the sample median. Its use in linear regression developed within the broader robust-statistics literature rather than in the 1964 paper. Hampel, Ronchetti, Rousseeuw and Stahel's 1986 book Robust Statistics: The Approach Based on Influence Functions presents robust estimation from an influence-function perspective.

When to use it

Use Huber regression when the outcome is continuous, the relationship is approximately linear, the observations are roughly independent, and you suspect that some outliers in the outcome would distort an ordinary least squares fit. The fit is more stable with a moderately large sample, because with very few observations the choice of scale and threshold can dominate the result. Do not rely on it when the outlying observations sit in the predictor space (high-leverage points), when outliers make up a large share of the data, when errors are clustered or serially dependent as in repeated measures, or when the real problem is a mis-specified non-linear form.

Limitations and considerations

  • Its loss bounds the influence of outlying outcome values but not of high-leverage predictor values, so such points can still pull the fit; a bounded-influence estimator such as an MM-estimator is preferable in that case.
  • When outliers form a large share of the data, the estimate can still be drawn toward them, and a high-breakdown method such as least trimmed squares may be needed.
  • Results depend on the scale σ and the threshold δ, so the fit changes with these choices and they must be reported.
  • The loss is written for independent observations, so it is not appropriate as it stands for clustered or repeated-measures data.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Resistant to outliers in the outcome: large residuals receive only a bounded, linear penalty so they cannot dominate the fit.
  • Behaves like OLS for residuals below the threshold, so the fit on the clean part of the data stays close to the familiar least squares result.
  • Produces linear coefficients that can be read in the same way as ordinary regression output.

Applications

  • Fitting a linear model when a minority of observations are outlying and would distort ordinary least squares.
  • Estimating predictor effects on a continuous outcome in settings where measurement errors or gross errors are a known concern.
  • Producing a robust fit to compare against ordinary regression, to see how much outliers are affecting the estimated coefficients.

How it works

How it works

1

The continuous outcome y is modelled as a linear function of the predictors X plus an error term ε, exactly as in ordinary regression. The coefficients β describe how each predictor relates to the outcome.

Formula
y = X\beta + \varepsilon
2

Instead of minimising the sum of squared residuals, Huber regression minimises a sum of Huber losses ρ_δ applied to the residuals, each divided by a scale value σ so that the threshold δ is measured in units of that scale. For residuals smaller than δ the loss is quadratic (½r²), matching OLS; for larger residuals it is linear (δ(|r| − ½δ)), so the influence of any single outlying outcome value is bounded. The scale σ is not known in advance: it is commonly estimated robustly, for example from the median absolute deviation (MAD) of the residuals, and updated iteratively alongside β. The coefficients are typically found by iterative reweighting rather than in a single closed-form step. The threshold δ is a tuning choice rather than a value derived from the data; a conventional value that gives high efficiency when errors are in fact normal is often used as a starting point, and its effect should be checked by sensitivity analysis.

Formula
\hat{\beta} = \arg\min_{\beta} \sum_{i} \rho_{\delta}\!\left(\frac{y_i - x_i^{\top}\beta}{\sigma}\right),\quad \rho_{\delta}(r) = \begin{cases} \tfrac{1}{2} r^2 & |r| \le \delta \\ \delta\left(|r| - \tfrac{1}{2}\delta\right) & |r| > \delta \end{cases}

Common pitfalls

  • Using Huber regression to correct a mis-specified functional form: the method addresses outliers in the residuals, not a wrong model for the mean.
  • Ignoring high-leverage observations, which the Huber loss does not down-weight in the predictor space.
  • Leaving the threshold δ and scale σ at default settings without checking how much the coefficients change when they are varied.
  • Applying the method to clustered or serially dependent data, where the independence assumption behind the loss is violated and the standard errors may be misleading.

Frequently asked questions

How does Huber regression differ from OLS?

OLS squares every residual, so far-off points have a large, unbounded influence. Huber regression uses a squared loss only for small residuals and switches to a linear loss for large ones, capping the influence of any single outlying outcome value while staying close to OLS on the clean data.

What is the threshold δ (epsilon) in Huber regression?

δ is the residual size, measured in units of the scale σ, at which the loss switches from quadratic to linear. Smaller δ makes the method more robust to outliers but less efficient; larger δ behaves more like OLS. It governs the trade-off between robustness and efficiency. Because δ is expressed in units of σ, its meaning depends on how σ is estimated, so the scale convention should be reported together with the chosen δ.

How many outliers can Huber regression tolerate?

Huber regression has a limited breakdown point: it does not carry a high-breakdown guarantee, so if outliers make up a substantial share of the data, the estimate can be pulled away from the bulk of the data. In that situation a high-breakdown method such as least trimmed squares is more appropriate.

What about high-leverage points?

Huber regression bounds the influence of outliers in the outcome but not of outliers in the predictor space (high-leverage points). When such points are present, a bounded-influence estimator such as an MM-estimator is the better choice.

Related methods

Sources

  1. Huber, P. J. (1964). Robust Estimation of a Location Parameter. Annals of Mathematical Statistics, 35(1), 73-101.

    Open DOI reference
  2. Hampel, F. R., Ronchetti, E. M., Rousseeuw, P. J., & Stahel, W. A. (1986). Robust Statistics: The Approach Based on Influence Functions. Wiley.

    ISBN: 978-0471735779
  3. MASS, function huber (Huber M-estimator of location with MAD scale), p. ?