While OLS minimizes the sum of squared errors, quantile regression minimizes a weighted
sum of absolute values of errors with different
weights being placed on positive and negative
errors, as in equation (1) (Kennedy 2008). The
major advantage of quantile regression is the robustness to outliers and heteroskedasticity, as quantile regression estimates conditional quantiles instead of conditional means.