Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Quantile vs Quartile regression

From   Maarten Buis <>
Subject   Re: st: Quantile vs Quartile regression
Date   Wed, 29 May 2013 09:29:41 +0200

On Wed, May 29, 2013 at 5:38 AM, David Hoaglin wrote:
> For the .50 quantile, the summary you are fitting is the conditional
> median, as a function of the predictors.  In general it differs from
> the conditional mean (i.e., the OLS regression).

It can also be informative to consider when linear regression and
quantile regression produce the same results. This occurs when the
distribution of the error term is symmetric (this could be the
normal/Gaussian distribution, but it could also be any other symmetric
distribution). In addition the coefficients for the predictors will in
this case be (approximately) the same regardless of which quantile is

*------------------ begin example ------------------
set obs 5000
gen x = rnormal()

// this result does not require normally/Gaussian
// distributed error term, to illustrate that I
// use an error term with a uniform distribution
gen y = -.5 + x + runiform()

// the effect of x is the same for both linear
// regression and quantile regression (regardless
// of which quantile is being considered)
reg y x
sqreg y x, q(.25 .5 .75)
*------------------- end example -------------------
(For more on examples I sent to the Statalist see: )

Hope this helps,

Maarten L. Buis
Reichpietschufer 50
10785 Berlin
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index