Statalist


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

st: RE: Boxplot


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Boxplot
Date   Thu, 2 Jul 2009 16:19:48 +0100

A search, even casual, of the archives would reveal that users often
report on Statalist their difficulty going beyond -graph box- or -graph
hbox-, usually because in fact they want something other than a standard
kind of box plot, and neither command promises to provide that. 

The same search would reveal many suggestions for how to tackle such
problems.  

Here is one using -stripplot- from SSC. 

sysuse auto

set scheme s1color

stripplot length, over(foreign) vertical stack center ///
height(0.1) width(2) box                              ///
addplot(scatter length foreign in 17) xla(, notick) 

This is not claimed to be exactly what you are asking for. It flows from
my prejudice that box plots are often oversold, as they typically omit
too much detail -- especially when as here only a few groups are being
compared and there is plenty of room for that detail. 

If half each distribution is inside the boxes, then half must be
outside, and often the more interesting or important half. At worst, if
there are no points beyond 1.5 IQR of the quartiles, box plots can even
include _no_ detail within each tail. 

Nick 
[email protected] 

Joerg Eulenberger

i want to draw an Boxplot graph, like this:

sysuse auto
graph box  length, over(foreign)

Now i want an additional point (red) in the box plot for the lenth-value
from observation with the number 17. 
Known everyone an solution for this problem. 

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index