Stata FAQ
How do I interpret quantile regression coefficients?

The short answer is that you interpret quantile regression coefficients just like you do ordinary regression coefficients. The long answer is that you interpret quantile regression coefficients almost just like ordinary regression coefficients.

We can illustrate this with a couple of examples using the hsb2 dataset.
use www.ats.ucla.edu/stat/stata/notes/hsb2, clear

tabstat write, by(female) stat(p25 p50 p75)

Summary for variables: write
     by categories of: female 

female |       p25       p50       p75
-------+------------------------------
  male |        41        52        59
female |        50        57        62
-------+------------------------------
 Total |      45.5        54        60
--------------------------------------
We will begin by running median and .75 quantile regression models without any predictors.
qreg write

Iteration  1:  WLS sum of weighted deviations =    1595.95

Iteration  1: sum of abs. weighted deviations =       1591
Iteration  2: sum of abs. weighted deviations =       1571

Median regression                                    Number of obs =       200
  Raw sum of deviations     1571 (about 54)
  Min sum of deviations     1571                     Pseudo R2     =    0.0000

------------------------------------------------------------------------------
       write |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       _cons |         54   1.239519    43.57   0.000     51.55572    56.44428
------------------------------------------------------------------------------

qreg write, quantile(.75)

Iteration  1:  WLS sum of weighted deviations =  1237.9502

Iteration  1: sum of abs. weighted deviations =     1202.5
Iteration  2: sum of abs. weighted deviations =     1084.5

75 Quantile regression                              Number of obs =       200
  Raw sum of deviations   1084.5 (about 60)
  Min sum of deviations   1084.5                     Pseudo R2     =    0.0000

------------------------------------------------------------------------------
       write |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       _cons |         60   .6665574    90.01   0.000     58.68558    61.31442
------------------------------------------------------------------------------
In the median regression the constant is the median of the sample while in the .75 quantile regression the constant is the 75th percentile for the sample.

Next, we'll add the binary predictor female to the model.
qreg write female

Iteration  1:  WLS sum of weighted deviations =  1543.9433

Iteration  1: sum of abs. weighted deviations =       1545
Iteration  2: sum of abs. weighted deviations =       1542
Iteration  3: sum of abs. weighted deviations =       1536

Median regression                                    Number of obs =       200
  Raw sum of deviations     1571 (about 54)
  Min sum of deviations     1536                     Pseudo R2     =    0.0223

------------------------------------------------------------------------------
       write |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      female |          5   2.611711     1.91   0.057    -.1503394    10.15034
       _cons |         52   1.927268    26.98   0.000     48.19939    55.80061
------------------------------------------------------------------------------

predict p50
(option xb assumed; fitted values)

tabulate p50

     Fitted |
     values |      Freq.     Percent        Cum.
------------+-----------------------------------
         52 |         91       45.50       45.50
         57 |        109       54.50      100.00
------------+-----------------------------------
      Total |        200      100.00

qreg write female, quantile(.75)

Iteration  1:  WLS sum of weighted deviations =  1204.3893

Iteration  1: sum of abs. weighted deviations =       1272
Iteration  2: sum of abs. weighted deviations =     1154.5
Iteration  3: sum of abs. weighted deviations =       1060

75 Quantile regression                              Number of obs =       200
  Raw sum of deviations   1084.5 (about 60)
  Min sum of deviations     1060                     Pseudo R2     =    0.0226

------------------------------------------------------------------------------
       write |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      female |          3    1.23163     2.44   0.016     .5712035    5.428796
       _cons |         59   .9385943    62.86   0.000     57.14908    60.85092
------------------------------------------------------------------------------

predict p75
(option xb assumed; fitted values)

tabulate p75

     Fitted |
     values |      Freq.     Percent        Cum.
------------+-----------------------------------
         59 |         91       45.50       45.50
         62 |        109       54.50      100.00
------------+-----------------------------------
      Total |        200      100.00
From this point on I'll describe what is going on in the median regression model. The interpretation for the .75 quantile regression is basically the same except that you substitute the term 75th percentile for the term median.

With the binary predictor, the constant is median for group coded zero (males) and the coefficient is the difference in medians between males and female (see the tabstat above).

Looking at the tabulated predicted scores we see that we get two values, the conditional median for males (52) and the conditional median for female (57).

Now, let me show you something that is really neat about quantile regression. I will replace the highest value of write (67) with the value of 670 and rerun these analyses.
replace write=670 if write==67
(7 real changes made)

qreg write female

Iteration  1:  WLS sum of weighted deviations =  8319.5083

Iteration  1: sum of abs. weighted deviations =       6544
Iteration  2: sum of abs. weighted deviations =       6156
Iteration  3: sum of abs. weighted deviations =       5757

Median regression                                    Number of obs =       200
  Raw sum of deviations     5792 (about 54)
  Min sum of deviations     5757                     Pseudo R2     =    0.0060

------------------------------------------------------------------------------
       write |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      female |          5   2.611711     1.91   0.057    -.1503394    10.15034
       _cons |         52   1.927268    26.98   0.000     48.19939    55.80061
------------------------------------------------------------------------------

qreg write female, quantile(.75)

Iteration  1:  WLS sum of weighted deviations =   11445.07

Iteration  1: sum of abs. weighted deviations =       7582
Iteration  2: sum of abs. weighted deviations =       7461
Iteration  3: sum of abs. weighted deviations =     7391.5

75 Quantile regression                              Number of obs =       200
  Raw sum of deviations     7416 (about 60)
  Min sum of deviations   7391.5                     Pseudo R2     =    0.0033

------------------------------------------------------------------------------
       write |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      female |          3    1.23163     2.44   0.016     .5712035    5.428796
       _cons |         59   .9385943    62.86   0.000     57.14908    60.85092
------------------------------------------------------------------------------
Notice that neither the coefficients nor the standard errors changed. This is because changing this extreme score does not change either the median or the 75th percentile. The only changes that effect the results are when a value crosses a quantile boundary. For example, changing a value of 58 to 580 would not effect the median but would effect the 75th percentile.

For the last example, we will reload the data and use a continuous predictor in the model.
use www.ats.ucla.edu/stat/stata/notes/hsb2, clear

qreg write socst

Iteration  1:  WLS sum of weighted deviations =  1219.9071

Iteration  1: sum of abs. weighted deviations =  1219.9333
Iteration  2: sum of abs. weighted deviations =     1212.8
Iteration  3: sum of abs. weighted deviations =  1212.5667
Iteration  4: sum of abs. weighted deviations =   1209.375
Iteration  5: sum of abs. weighted deviations =     1208.9

Median regression                                    Number of obs =       200
  Raw sum of deviations     1571 (about 54)
  Min sum of deviations   1208.9                     Pseudo R2     =    0.2305

------------------------------------------------------------------------------
       write |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       socst |   .6333333   .0571053    11.09   0.000     .5207206    .7459461
       _cons |   20.03333   3.069487     6.53   0.000     13.98025    26.08642
------------------------------------------------------------------------------

predict double p50
(option xb assumed; fitted values)

qreg write socst, quantile(.75)

Iteration  1:  WLS sum of weighted deviations =     992.87

Iteration  1: sum of abs. weighted deviations =  1003.2667
Iteration  2: sum of abs. weighted deviations =     950.85
Iteration  3: sum of abs. weighted deviations =  936.30001
Iteration  4: sum of abs. weighted deviations =  928.66667
Iteration  5: sum of abs. weighted deviations =  926.07501
Iteration  6: sum of abs. weighted deviations =  924.30001

75 Quantile regression                              Number of obs =       200
  Raw sum of deviations   1084.5 (about 60)
  Min sum of deviations    924.3                     Pseudo R2     =    0.1477

------------------------------------------------------------------------------
       write |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       socst |         .4   .0408158     9.80   0.000     .3195104    .4804896
       _cons |       37.6   2.187081    17.19   0.000     33.28704    41.91296
------------------------------------------------------------------------------

predict double p75
(option xb assumed; fitted values)
With the continuous predictor socst the constant is the predicted value when socst is zero. The quantile regression coefficient tells us that for every one unit change in socst that the predicted value of write will increase by .6333333.

We can show this by listing the predictor with the associated predicted values for two adjacent values. Notice that for the one unit change from 41 to 42 in socst the predicted value increases by .633333.
sort socst

list socst p50 p75 in 42/43

     +--------------------------+
     | socst         p50    p75 |
     |--------------------------|
 42. |    41          46     54 |
 43. |    42   46.633333   54.4 |
     +--------------------------+

How to cite this page

Report an error on this page or leave a comment

The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California.

IDRE Research Technology Group

High Performance Computing

Statistical Computing

GIS and Visualization

  • High Performance Computing
  • GIS
  • Statistical Computing
  • Hoffman2 Cluster
  • Mapshare
  • Classes
  • Hoffman2 Account Application
  • Visualization
  • Conferences
  • Hoffman2 Usage Statistics
  • 3D Modeling
  • Reading Materials
  • UC Grid Portal
  • Technology Sandbox
  • IDRE Listserv
  • UCLA Grid Portal
  • Tech Sandbox Access
  • IDRE Resources
  • Shared Cluster & Storage
  • Data Centers
  • Social Sciences Data Archive
  • About IDRE
  • About
  • Contact
  • News
  • Events
  • Our Experts
  • © 2016 UC Regents
  • Terms of Use & Privacy Policy
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.