Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: -qplot- package available on SSC

From   "Nick Cox" <>
To   <>
Subject   st: -qplot- package available on SSC
Date   Thu, 13 Nov 2003 19:47:36 -0000

Thanks to Kit Baum, a new package -qplot- has been added to SSC. 

-qplot- produces quantile plots. It requires Stata 8. 

. ssc inst qplot 

will install in a net-aware Stata 8. 

-quantile- has long been available as an official Stata command
for quantile plots. In Stata 8 the graphics were revised to match
the new graphics, but the functionality was unchanged. 

In STB-51 I published -quantil2-, which was a generalisation of
-quantile- for Stata 6, apart from one detail omitted, the
reference line. (The ugly name -quantil2- was a carryover from the
8.3 filename.ext tradition, which no longer applies to any platform
on which Stata is currently supported.) This remains available to
Stata 6 users. 

In STB-61 -quantil2- was revised for Stata 7, although any Stata 7
users are better advised to install it from SSC. 

-qplot- is a rewriting (and further generalisation) of -quantil2-
for Stata 8's graphics. It is, in effect, a sibling of -distplot-,
also on SSC, which produces cumulative distribution plots and some
relatives.  The choice is thus mostly one of choice of axes, and
thus in a sense trivial, but different conventions may seem
natural for different problems and even different fields or
traditions. In particular, I note a growth of interest in quantile
functions as responses, which makes -qplot- a possible choice. 

-qplot- is generalised over -quantile- in various ways: 

1. Support for several variables. 

2. Support for several groups, through a -by()- option.  

3. Choice of -twoway- plottypes, from area, bar, connected, dot,
dropline, line, scatter or spike. These are not in general equally
useful or attractive, but there is at least much choice, courtesy
of -twoway-'s generous design. 

4. Choice of a in a general rule for plotting position (i - a) /
(n - 2a + 1) for i = 1, ..., n. The default is a = 0.5, giving 
(i - 0.5) / n. Other choices include a = 0, giving i / (n + 1), and 
a = 1/3, giving (i - 1/3) / (n + 1/3). The choice is often
immaterial, but some authorities have strong opinions on best
choice on various grounds, some even statistical. 

5. Support for use of ranks rather than plotting positions.

6. Support for reversing the sort order, so that values decrease
from top left. 

7. Support for alternative transformed scales for plotting
positions (or ranks). 

Some examples were shown at the last London users' meeting in May.
The slides are accessible at 
(Since then, the -tscale()- option has been renamed -trscale()- to
avoid a clash with official Stata's new -tscale()- option.) 


*   For searches and help try:

© Copyright 1996–2023 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index