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

st: Graph bar: yvaroptions disable weights


From   Friedrich Huebler <huebler@rocketmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Graph bar: yvaroptions disable weights
Date   Mon, 28 Apr 2003 15:33:45 -0700 (PDT)

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/



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