When -yvaroptions- is used with -graph bar- weights are ignored.
. sysuse auto
(1978 Automobile Data)
. tabstat mpg turn
stats | mpg turn
---------+--------------------
mean | 21.2973 39.64865
------------------------------
. tabstat mpg turn [aw=length]
stats | mpg turn
---------+--------------------
mean | 20.75919 40.09305
------------------------------
. 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. Can someone explain this behavior? Are there alternatives to
-yvaroptions- that can be used to label bars as in the example above?
I studied the manual but did not find an alternative.
Thank you.
Friedrich Huebler
__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com
*
* 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/