Statalist


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

RE: st: weighted boxplot ?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: weighted boxplot ?
Date   Mon, 8 Feb 2010 17:09:53 -0000

Stata included scope for this in its old graphics. 

. sort rep78

. graph7 mpg, box by(rep78) vwidth

Thanks to Maarten for his -stripplot- example. This doesn't vary box sizes, meaning widths, but does make it evident that different groups have different numbers of values. 

There are no plans to include varying box widths in -stripplot-. 

Nick 
[email protected] 

Maarten buis

What about this example from Nick Cox's -stripplot-? You 
can download -stripplot- by typing in Stata 
-ssc install stripplot-.

*--------------------- begin example -------------------------
sysuse auto, clear
stripplot mpg, over(rep78) box(bfcolor(black) blcolor(white) /// 
                barw(0.2))  boffset(-0.2) stack h(0.5)
*----------------------- end example -------------------------

--- On Mon, 8/2/10, Jeph Herrin wrote:
> For an analysis comparing two groups of hospitals I have
> generated some nice box plots
> 
>  graph box yvar, over(group) ...
> 
> One concerning issue is that the two groups identified
> by -group- are highly imbalanced - something like 4000
> vs 50. Thus my co-author writes: "I think the boxplots
> should be drawn to reflect the actual number of hospitals
> as they are misleading right now.

*
*   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