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

# Re: st: quantile-quantile plots

 From "Yu Chen, PhD" To statalist@hsphsun2.harvard.edu Subject Re: st: quantile-quantile plots Date Mon, 15 Apr 2013 22:07:00 -0500

```In economics, sometimes the vertical axis is used to plot independent
variable, and the horizontal axis is used to plot the dependent
variable. For example, when price goes up, you may buy less food.
Price is plotted in vertical axis, and the quantity of food is plotted
in horizontal axis. The curve is downward sloping. That might be the
reason that you heard people saying plot x versus y.

On Mon, Apr 15, 2013 at 5:21 AM, Nick Cox <njcoxstata@gmail.com> wrote:
>
> Some recent threads have mentioned quantile-quantile plots. Q-Q plots
> go back to the nineteenth century in the specific case of so-called
> normal probability plots (really observed quantiles versus expected
> normal quantiles, or vice versa,  depending on what one means by
> versus(*)).
>
> The key paper mentioned by David Hoaglin
>
> Wilk MB, Gnanadesikan R. 1968. Probability plotting methods for the
> analysis of data.  Biometrika 55:1-17.
>
> is over 40 years old, but the idea is still not yet anywhere as widely
> practised as it should be. By the way, that is a spectacular paper,
> which pays re-reading every few years.
>
> I want to push a few related hints that might otherwise be buried in
> those threads, which people interested in this topic might well not be
> following.
>
> First off, and most obviously, Stata has long had a -qqplot- command.
>
> However, it assumes that you want to compare two variables. If not,
> -cquantile-  (SSC) is a helper command that gets you to that
> situation.
>
> Quantile-quantile plots are for comparing two distributions. If you
> have several, then -qplot- (SJ) allows overlay, or display
> side-by-side.
>
> If you want yet more ideas in the same vein, check out
>
> SJ-7-2  gr0027  . .  Stata tip 47: Quantile-quantile plots without
> programming
>         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  N. J.
> Cox
>         Q2/07   SJ 7(2):275--279                                 (no
> commands)
>         tip on producing various quantile-quantile (Q-Q) plots
>
> free .pdf
> http://www.stata-journal.com/sjpdf.html?articlenum=gr0027
>
> Nick
> njcoxstata@gmail.com
>
> * A note on "versus" or "against". I was brought up -- probably in
> school physics, but it was last century, so I can't give precise
> recollections -- to say "plot y versus x" where y is, not
> surprisingly, whatever is plotted on the y or vertical axis. That
> seems to me to match mathematics and physics usages such as y is a
> function of x, or output is a function of time, where the dependent
> variable (outcome, response) is always mentioned first. But I've come
> across people saying "plot x versus y". If anyone has a logic for that
> usage, I'd be interested to hear it.
> *
> *   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/
*
*   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/
```