Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: Putting 'n of cases' as labels in boxplots


From   Donald Spady <[email protected]>
To   [email protected]
Subject   Re: st: RE: Putting 'n of cases' as labels in boxplots
Date   Wed, 15 Dec 2004 16:50:31 -0700

Thanks Nick. It works, slightly differently than I had considered, now I just have to put it in my context.
Don


At 04:36 PM 12/15/2004, you wrote:

You could try hacking -graph box-. That
would give you something to tackle in
the holiday season.

I'd go for a upstream solution, something
like

sysuse auto
bysort rep78 : gen size = " (n = " + string(_N) + ")"
egen Rep78 = group(rep78 size), label
graph box mpg, over(Rep78)

Nick
[email protected]

Donald Spady MD, MSc

>   I want to create boxplots that have as the X legend the 'n'
> of cases that
> comprised the boxplot at the bottom of the graph.  I do not
> see from the
> menus how to do that and cannot find anything in the manuals.  Is it
> possible to do?  Given Stata's versatility I am sure it is
> possible somehow.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
Donald Spady MD, MSc

Department of Pediatrics & Public Health Sciences
2C3.92 WMC, University of Alberta
Edmonton, Alberta, Canada
T6G 2R7

780-407-1244:O
780-407-7136:F

Nature has no reset button.

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* 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