Quantile Regression (Nonparametric Variants)

Statistics
Introduced by
Koenker & Bassett
Year
1978
Type
Quantile regression (nonparametric variants)

What does it do?

Quantile regression, introduced by Koenker and Bassett in 1978, models a chosen conditional quantile of a continuous outcome, such as the median or the 25th and 75th percentiles, rather than its mean.

This page covers the linear form, in which the conditional quantile is linear in the predictors and is estimated by minimising the check loss. Nonparametric variants, such as the additive total-variation-penalised spline fitting in the rqss function of R's quantreg package, use a different estimator that is not specified here. Koenker's 2005 monograph treats both the linear and nonlinear, parametric and nonparametric cases.

The intuition behind the method

Ordinary regression draws a single line through the average of the data, which can be pulled off course by skew and outliers. Quantile regression instead lets you trace several lines — one through the middle (the median), and others through the lower and upper parts of the spread — so you can see how the relationship between predictors and outcome changes across the bottom, the middle, and the top of the distribution.

History

Roger Koenker and Gilbert Bassett introduced quantile regression in their 1978 Econometrica paper 'Regression Quantiles', which extended median (least absolute deviations) regression to arbitrary quantiles. Koenker's 2005 monograph 'Quantile Regression' is described as the first comprehensive treatment of the subject, covering models that are linear and nonlinear, parametric and nonparametric. This page covers only the linear case.

When to use it

Use quantile regression when the outcome is continuous and the question concerns more than the average, such as the spread, the tails, or how predictor effects differ between low and high values of the response. It is well suited to skewed outcomes and to data with outliers, where the mean is a poor summary and an error distribution is hard to justify. Do not use it when the target is the conditional mean and mean regression assumptions are defensible, or when the sample is small, since quantile estimates become unstable.

Limitations and considerations

  • Stable quantile estimates need a reasonable sample size. With small samples, individual quantile estimates become unstable, so results should be checked by bootstrap or sensitivity analysis.
  • The linear formula on this page is a distinct estimator from nonparametric alternatives such as additive total-variation-penalised splines (rqss in the quantreg package). Those alternatives need their own tuning, and their results are not covered by the formula given here.
  • Estimating several quantiles separately gives no guarantee that the fitted quantile curves are ordered (non-crossing) across τ, so the results should be checked for this.

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

Strengths

  • Requires no distributional assumption about the errors, so it is robust on skewed data and to outliers.
  • Estimates the effect of predictors across the whole conditional distribution, not just the mean, revealing how relationships differ in the lower and upper tails.
  • At the median it minimises absolute deviations, giving a robust central-tendency fit that resists the influence of extreme observations.

Applications

  • Studying how predictor effects differ across the lower and upper parts of an outcome distribution, such as wages or expenditure.
  • Modelling skewed continuous outcomes where the conditional mean is a poor summary.
  • Robust estimation of central tendency through median regression when outliers are present.
  • Analyses in economics, biology, ecology and finance, the fields illustrated in Koenker's 2005 monograph.

How it works

How it works

1

Instead of modelling the conditional mean, the method describes the τ-th conditional quantile of the outcome Y as a linear function of the predictors X, Q_Y(τ | X) = Xβ(τ). Fitting the model at several values of τ (for example 0.25, 0.5 and 0.75) gives a separate coefficient vector β(τ) for each part of the conditional distribution. Each coefficient β_j(τ) is the estimated change in the τ-quantile of Y for a one-unit increase in predictor x_j, holding the other predictors fixed. Comparing β_j(0.25), β_j(0.5) and β_j(0.75) shows whether the effect of x_j differs across the distribution.

Formula
Q_{Y}(\tau \mid X) = X\beta(\tau)
2

The coefficients for a given τ are found by minimising the asymmetric check (pinball) loss ρ_τ, which weights positive and negative residuals differently. At τ = 0.5 the loss is proportional to the absolute residual, so the fit is median (least absolute deviations) regression. The formula above has no smoothing parameter and describes the linear model only; nonparametric variants rely on a different estimator.

Formula
\hat{\beta}(\tau) = \arg\min_{\beta} \sum_{i} \rho_{\tau}\!\left(y_i - x_i^{\top}\beta\right),\quad \rho_{\tau}(u) = u\,(\tau - \mathbf{1}\{u < 0\})

Common pitfalls

  • Reading the coefficients at one τ as describing the whole distribution. Effects can differ across τ, so fit and compare several quantiles.
  • Applying the method to very small samples, where individual quantile estimates are unreliable and conclusions should be treated as tentative.
  • Reporting only the median fit and missing the differences in the tails that motivated quantile regression in the first place.
  • Assuming standard errors are valid without checking. Standard errors for quantile regression depend on the estimator and sample size, so check the inference method your software uses and consider bootstrap intervals for small samples.

Frequently asked questions

How is quantile regression different from ordinary regression?

Ordinary regression models the conditional mean of the outcome, while quantile regression models a chosen conditional quantile, such as the median or any percentile. This shows how predictors affect the lower, middle, and upper parts of the distribution rather than only its average.

What does τ mean and which values should I pick?

τ (tau) is the quantile being modelled, between 0 and 1. τ = 0.5 gives the median; common choices are 0.25, 0.5, and 0.75 for the lower quartile, median, and upper quartile. You can fit any set of quantiles relevant to your question.

Why does it not need a normality assumption?

Quantile regression estimates coefficients by minimising an asymmetric absolute-error (check) loss rather than squared error, so it does not assume a particular error distribution. This is why it is robust on skewed data and to outliers.

What sample size do I need?

Quantile estimates are unstable in small samples, so conclusions from small samples should be treated as tentative and checked by bootstrap or sensitivity analysis. Stability also depends on how many quantiles you fit and how spread out the outcome is.

Related methods

Sources

  1. Koenker, R. & Bassett, G. (1978). Regression Quantiles. Econometrica, 46(1), 33-50.

    Open DOI reference
  2. Koenker, R. (2005). Quantile Regression. Cambridge University Press.

    ISBN: 978-0521608275
  3. quantreg (R package documentation), p. 55