Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

RE: st: Several quantile plots in one diagram


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Several quantile plots in one diagram
Date   Wed, 21 Apr 2010 19:09:15 +0100

Earlier today Barbro Widerstedt started a thread that ended with a focus
on -qplot- (Stata Journal). 

I want to add a supplementary plug for quantile smoothing, or estimation
if you prefer. Although (empirical) quantile functions are
never-decreasing by definition, they can be a little irregular through
ties or other small details. Sometimes this is a feature -- a quantile
plot is a good representation of the data if you are concerned about, or
interested in, granularity -- but often it is just a distraction. 

The canonical quantile plot is an example:

. sysuse auto

. qplot mpg, over(foreign)

The staircase or flight of steps effect is no surprise. Mileages are
often rounded, and a good idea too. Note that, and go a step further by
smoothing. -hdquantile- from SSC offers one recipe: 

. ssc inst hdquantile 

. hdquantile mpg, gen(Hmpg) by(foreign)

. qplot Hmpg, over(foreign)

Better for overall comparisons? 

Nick 
n.j.cox@durham.ac.uk 

Nick Cox
========

Barbro is talking about -quantil2-, later renamed -qplot, written by
myself. 

. search quantil2

Keyword search

        Keywords:  quantil2
          Search:  (1) Official help files, FAQs, Examples, SJs, and
STBs

Search of official help files, FAQs, Examples, SJs, and STBs


SJ-6-4  gr42_4  . . . . . . . . . . . . . . . . . .  Software update for
qplot
        (help qplot if installed) . . . . . . . . . . . . . . . . .  N.
J. Cox
        Q4/06   SJ 6(4):597
        better handling of x-axis titling, a new option allowing
        the user to specify an alternative plotting position or
        rank variable

SJ-5-3  gr42_3  . . . . . . . . . . . . . . . . . .  Software update for
qplot
        (help qplot if installed) . . . . . . . . . . . . . . . . .  N.
J. Cox
        Q3/05   SJ 5(3):471
        simplified syntax; both by() and over() are now allowed

SJ-4-1  gr42_2  Software update for Quantile plots, generalized; renamed
qplot
        (help qplot if installed) . . . . . . . . . . . . . . . . .  N.
J. Cox
        Q1/04   SJ 4(1):97
        software update for quantil2, now renamed qplot

STB-61  gr42.1  . . . . . . . Quantile plots, generalized: update to
Stata 7.0
        (help quantil2 if installed)  . . . . . . . . . . . . . . .  N.
J. Cox
        5/01    pp.10--11; STB Reprints Vol 10, pp.55--56
        updated for use with Stata 7

STB-51  gr42  . . . . . . . . . . . . . . . . . .  Quantile plots,
generalized
        (help quantil2 if installed)  . . . . . . . . . . . . . . .  N.
J. Cox
        9/99    pp.16--18; STB Reprints Vol 9, pp.113--116
        generalizes the quantile command by allowing more than one
        variable (or a by() option), more graphical choices, general
        plotting positions, and an option to reverse the order



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index