Unbiased Analysis of Today's Healthcare Issues

Quantile Regressions

Written By: Jason Shafrin - May• 10•11

Understanding quantiles is fairly intuitive. A physician would rank in the τth quantile of in terms of quality of care if he performs better than the proportion τ of the reference group of physicians and worse than the proportion (1–τ). For physicians at the median, half of physicians will perform worse than this doctor and half will perform better.

Quantile regressions, however, offer the power to evaluate whether the predicted effect of selected explanatory variables on the outcome of interest differs depending on the where in the distribution the individual is located. Koenker and Bassett (1978) created these regression models and based them on the same intuition used to calculate the median. Today I review contrasts how quantile regressions work compared to ordinary least squares (OLS).

Mean vs. Quantile

The simplest way to compare OLS against quantile regression is to compare optimization methods for the mean and quantiles (e.g., median). Most people know the mean and median formulas, but the following specifications detail how to calculate these values for any sample using optimization techniques.

  • Mean: min μ∈ℜ Σ (yi – μ)2
  • Quantile: min ξ∈ℜ Σ ρτ(yi – ξ)

where the function ρτ(x) = x(τ – I(x<0)). In essence, the function ρτ tilts the absolute value function towards the quantile under investigation. For the mean, the goal is to pick the a parameter (the mean) which will minimize the sum of squared deviations. For the quantile, the goal is to pick a parameter which will minimize the sum of absolute deviations. For the median, the absolute deviations are weighted equally whereas for other quantiles deviations closer the quantile of interest receive more weight than those further away.

I have created this spreadsheet to more clearly demonstrate how calculating quantiles can be done in practice.  Wikipedia also has a nice example.

OLS vs. Quantile Regression

Again, compare the mechanisms by which OLS and quantile regressions choose the coefficients (i.e., β) to optimize the equations below.

  • OLS: min β∈ℜ Σ (yi – Xβ)2
  • Quantile Regression: min βτ∈ℜ Σ ρτ(yi – Xβτ)

When you calculate the sample mean, you are calculating the unconditional population mean [i.e., E(y)]. When you conduct the OLS regression, one calculates the conditional expectation function E(y|X)]. Similarly, the quantile regression is used to estimate the conditional quantile of the dependent variable.

To conduct the quantile regression in SAS, on can perform the QUANTREG function. In Stata one can use the qreg function.

Quantile Regression in Practice

An example of a paper using Quantile Regression includes the following: Johar, M. and Katayama, H. (2011), Quantile regression analysis of body mass and wages. Health Economics, 20: n/a. doi: 10.1002/hec.1736. This paper uses the National Longitudinal Survey of Youth 1979, to explore the relationship between body mass and wages. The researchers use quantile regression to provide a broad description of the relationship across the wage distribution. “Our results find that for female workers body mass and wages are negatively correlated at all points in their wage distribution. The strength of the relationship is larger at higher-wage levels. For male workers, the relationship is relatively constant across wage distribution but heterogeneous across ethnic groups.”


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

Your email address will not be published. Required fields are marked *