- Introduced by
- Koenker & Bassett
- Year
- 1978
- Type
- Conditional quantile regression
What does it do?
Quantile regression models conditional quantiles of an outcome, such as the median or the 25th and 75th percentiles, rather than the conditional mean that OLS targets.
Introduced by Koenker and Bassett in 1978, it shows how predictors act across the whole distribution, including its tails.
The intuition behind the method
OLS fits a single line through the average of the data. Quantile regression instead fits a separate line for each part of the distribution: one for the bottom, one for the middle (the median), one for the top. This lets you see whether a predictor matters more for low outcomes than for high ones - for example, whether an extra year of schooling lifts low earners and high earners by different amounts.
History
Quantile regression was introduced by Roger Koenker and Gilbert Bassett in their 1978 Econometrica paper Regression Quantiles, which extended median regression to arbitrary quantiles through the check-loss objective. Koenker's 2005 monograph Quantile Regression, a full treatment of the subject covering linear and nonlinear, parametric and nonparametric models, consolidated the theory and its estimation. The method is now a standard tool in applied econometrics for studying distributional effects.
When to use it
Choose quantile regression when the outcome is continuous and the question concerns effects away from the average, such as the lower or upper tail of the distribution or effects that differ between low, middle and high outcome values. For count outcomes, standard quantile regression needs special handling (see limitations). The method assumes that the conditional quantile function is linear in the predictors, so it is a poor fit when that assumption is implausible for the quantiles of interest. Do not use it when only the average effect is of interest, since OLS answers that question more simply. The required sample size depends on the quantiles of interest: extreme quantiles need substantially more observations than the median, and no single minimum applies to all designs. Standard errors can be obtained by bootstrap or by asymptotic sandwich estimators; state which one was used.
Limitations and considerations
- Assumes the conditional quantile function is linear in x for each τ; if it is nonlinear, the estimated β(τ) are misspecified at that quantile.
- The check-loss estimator has no simple closed-form variance like OLS. Inference typically relies on bootstrap or asymptotic sandwich estimators, and the bootstrap requires more computation.
- Separately estimated linear quantile functions can cross, so that a higher quantile is predicted below a lower one for some values of x; this is a constraint that must be checked rather than assumed away.
- For count outcomes, standard quantile regression is not directly appropriate because the fitted quantiles are discrete; use smoothing or jittering approaches and interpret results with caution.
- Extreme quantiles are estimated from few observations in the tails and need a substantially larger sample than the median; the required size depends on the quantiles of interest.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Gives a separate coefficient vector for each quantile, so it can show how a predictor's effect changes across the conditional distribution, which a single OLS slope cannot.
- Because the loss uses absolute rather than squared residuals, extreme values of the outcome affect the fitted median only through which side of the line they fall, so the fit is insensitive to outliers in y. Outliers in the predictors can still have strong influence.
- Does not require normally distributed errors, since the check-loss objective is defined without a distributional assumption on the residuals.
Applications
- Studying how predictors affect the tails of an outcome distribution, such as the upper and lower ends of the wage distribution.
- Detecting heterogeneous effects that differ across low, median and high outcome levels.
- Modelling continuous or count outcomes where the conditional mean alone hides differences in the shape of the distribution.
How it works
How it works
Instead of modelling the mean of y, the τ-th conditional quantile is written as a linear function of the predictors x, so the coefficient vector β(τ) is allowed to differ at each quantile level τ (such as 0.25, 0.50, 0.75). Each element of β(τ) is the change in the τ-th conditional quantile of y for a one-unit change in that predictor, holding the other predictors fixed.
Formula
Q_{y}(\tau \mid x) = x^{\top}\beta(\tau)The coefficients are estimated by minimising the check (pinball) loss, an asymmetrically weighted sum of absolute residuals. Positive and negative residuals are weighted by τ and 1−τ, so the penalty for over- and under-prediction differs with τ. Standard errors can be obtained by bootstrap, which is often preferred in smaller samples or where the error variance changes with x, or by asymptotic sandwich estimators. The inference method used should be stated alongside the results.
Formula
\hat{\beta}(\tau) = \arg\min_{\beta} \sum_{i} \rho_{\tau}\big(y_i - x_i^{\top}\beta\big),\quad \rho_{\tau}(u) = u\big(\tau - \mathbb{1}\{u < 0\}\big)Common pitfalls
- Reporting standard errors or confidence intervals without stating the inference method (bootstrap or asymptotic), or using a variance estimator that does not suit the design, which can misstate significance.
- Estimating very extreme quantiles (for example the 5th or 95th) from a small sample, where coefficients become unstable.
- Treating a single median fit as a summary of the whole distribution; the method's value lies in comparing coefficients across several quantiles.
- Using quantile regression when only the average effect is of interest, where OLS is simpler and adequate.
Frequently asked questions
How is quantile regression different from OLS?
OLS estimates the conditional mean of the outcome, while quantile regression estimates conditional quantiles such as the median or the 25th and 75th percentiles. This lets a predictor have different effects at different points of the distribution instead of a single average effect.
How are standard errors obtained?
The check-loss estimator does not have the simple closed-form variance that OLS has. Standard errors and confidence intervals are usually obtained either by bootstrap resampling or by asymptotic sandwich estimators. Report which method was used with the results.
What is the check (pinball) loss?
It is an asymmetrically weighted sum of absolute residuals: positive and negative residuals are weighted by τ and 1−τ respectively. Minimising it yields the τ-th conditional quantile, just as minimising squared residuals yields the conditional mean.
When should I prefer quantile regression over OLS?
Choose it when you care about effects in the tails of the distribution or suspect that a predictor's effect differs across low, middle and high outcome values. If only the average effect matters, OLS is simpler and sufficient.
How do I interpret a coefficient?
Each coefficient in β(τ) gives the change in the τ-th conditional quantile of the outcome for a one-unit change in that predictor, holding the other predictors fixed. It describes the distribution of outcomes among units with the same predictor values, not a prediction for any single unit.
Can I conclude that a predictor's effect differs across quantiles?
Only after testing. Compare coefficients at different quantiles with a formal test of equality, such as a bootstrap-based Wald test, before treating differences as real heterogeneity rather than sampling variation.
Related methods
Sources
Koenker, R. & Bassett, G., Jr. (1978). Regression Quantiles. Econometrica, 46(1), 33-50.
Open DOI referenceKoenker, R. (2005). Quantile Regression. Cambridge University Press.
Open DOI reference