# Is quantile regression a special case of OLS?

Quantile regression is often advertised as a way of "predicting change in the dependent variable that is not the mean." It seems like one can do this with linear regression, however. Am I correct?

Suppose I am estimating a quantile regression (QR) with a constant and a single predictor X where I am interesting in predicting moving from the 25th percentile to the 75th percentile of a continuous dependent variable (Y): $$Y = a + X$$. My understanding is that the quantile regression models a different conditional mean: the mean for observations at those points in the distribution.

What is the difference between this approach and subsetting my data to observations in the 25th and 75th percentiles then adding a dummy to the treatment: $$Y = a + X + I + X*I$$? My hunch is that it arises because the constant term is not allowed to vary with $$I$$ and presumably the error term is different for this subpopulation.

• In general the mean is not a quantile, so the conditional mean (as per least squares) is not a conditional quantile May 21, 2019 at 5:39

Quantile regression is not a special case of OLS. The use-case for quantile regression methods is to estimate a given quantile of the distribution $$[Y|X]$$, such as the median. $$[Y|X]$$ is the distribution of $$Y$$ conditional on $$X$$, which is maybe why you have heard quantile regression as a way of "predicting change in the dependent variable that is not the mean." This is not the effect of moving between two quantiles of the variable $$Y$$. In the case of the median, the quantile regression is estimated using least absolute deviations, not least squares.