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

Re: st: Graph bar: yvaroptions disable weights


From   [email protected] (Vince Wiggins, StataCorp)
To   [email protected]
Subject   Re: st: Graph bar: yvaroptions disable weights
Date   Tue, 29 Apr 2003 14:13:56 -0500

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/



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