Statalist


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

Re: st: weighted boxplot ?


From   Jeph Herrin <[email protected]>
To   [email protected]
Subject   Re: st: weighted boxplot ?
Date   Tue, 09 Feb 2010 14:24:49 -0500

Thanks Nick, and Maarten - I would not have stumbled
across either of these solutions on my own.

cheers,
Jeph

Nick Cox wrote:
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/

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