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

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


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Putting 'n of cases' as labels in boxplots
Date   Wed, 15 Dec 2004 23:36:24 -0000

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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index