Statalist


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

st: RE: Boxplots


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Boxplots
Date   Sun, 11 Oct 2009 18:27:21 +0100

Thanks for the compliment. I haven't rummaged around to try to find the
precise recipe behind the graph in question, but it looks similar in
content to a strip plot with added mean and median. I'd like to see the
justification for the design. I'd rather show the data a little more
directly. 

With -stripplot- from SSC, you can go 

sysuse auto
egen mean = mean(mpg), by(foreign)
egen median = median(mpg), by(foreign)

stripplot mpg, over(foreign) vertical stack center height(0.2)  ///
addplot(scatter mean median foreign, ms(Sh Dh) msize(*2 ..)) ///
legend(on order(2 "mean" 3 "median") pos(3) col(1))

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

Fred Wolfe
Yesterday, Andrew Gelman placed this on his blog:

"I'd love if someone else were to write my article, tentatively titled
"Better than a boxplot," with the following abstract: "We demonstrate
graphical options that dominate the boxplot. We hope that, once these
alternatives are understood, boxplots are never used again." But I
have a horrible feeling I'm going to have to write this article
itself."

One response was this:
Jesse | October 9, 2009 10:10 PM | Reply
Here is the first image that comes up when you google it:
http://www.mathworks.com/matlabcentral/fx_files/23661/3/distributionPlot
.png
The one on the bottom left is pretty great.

Great, indeed. Perhaps Nick Cox, the great Stata GraphMaker, or
someone else could make a Stata program to do this?


*
*   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   |   What's new   |   Site index