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

# Re: st: Quantile vs Quartile regression

 From Maarten Buis To statalist@hsphsun2.harvard.edu 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
considered.

*------------------ begin example ------------------
clear
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:
http://www.maartenbuis.nl/example_faq )

Hope this helps,
Maarten

---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/
```