I should have added that Nick's method does work for labels with box over2
I had to create a variable that combined the two variables that I use -over-
with.
-hivst- and -sex- gives me -hivstsex-
But I would like to know if anyone knows of way to get the count value
inside the box.
egen n = sum(bmi < . & sex < .), by(hivstsex)
decode hivstsex, gen(Hivstsex)
replace Hivstsex = Hivstsex + " (n = " + string(n) + ")"
graph box bmi, medtype(line) over(sex, label(labsize(small))) over(Hivstsex)
> The method Nick Cox described did give me my sample sizes but I now have
> been asked to do the same for box plots that are over twice.
>
> graph box bmi, medtype(line) over(sex, label(labsize(small))) over(hivst)
> box(1, bfcolor(none)) ///
> box(2, bfcolor(none)) blabel(total, position(inside) format(%9.1f))
>
> -hivst- and -sex- are numeric with value labels
>
> I was wondering about the blabel option. Is it possible to get blabel to
> produce the count for that particular box?
*
* 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/