Friedrich Huebler <[email protected]> notes that when draws a bar graph
an specifies the option and suboption -yvaroptions(relabel(...))- that
-graph bar- ignores his weights,
> [...]
> . graph bar (mean) mpg turn [aw=length], legend(off) showyvars
>
> This draws the bar graph with the weighted means.
>
> . graph bar (mean) mpg turn [aw=length], legend(off) showyvars
> yvaroptions(relabel(1 "MPG" 2 "Turn"))
>
> When -yvaroptions- is added the bar graph is drawn with unweighted
> means.
This is a bug. -graph bar- is currently ignoring any specified weights if
suboptions -relabel()-, -total-, or -sort- are specified within the options
-over()- or -yvaroptions()-. The bug has been fixed and will be available in
an ado update either later today or tomorrow.
If Friedrich has an immediate need for a graph with weighted data, he can get
the correct bar heights by using -collapse- with -aweight-s and then use
-graph bar- with the -asis- option to graph to bars.
-- Vince
[email protected]
*
* 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/