Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Bar graph ordered by values of yvar


From   David Radwin <[email protected]>
To   [email protected]
Subject   st: Bar graph ordered by values of yvar
Date   Thu, 13 Mar 2008 15:34:07 -0700

Dear Stata-listers,

I have a question analogous to one I asked last year that was graciously answered by Nick Cox (http://www.stata.com/statalist/archive/2007-08/msg00934.html).

Rather than pose the question outright, I will illustrate with a example comparing college graduates with non-college graduates:

. sysuse nlsw88, clear
. graph hbar (mean) hours wage tenure, over(collgrad) showyvars

give you a graph with the bars in the order, from top to bottom, of:

1. mean hours for non-college grads
2. mean wage for non-college grads
3. mean tenure for non-college grads
4. mean hours for college grads
5. mean wage for college grads
6. mean tenure for college grads

But what I actually want is

1. mean hours for non-college grads
2. mean hours for college grads
3. mean wage for non-college grads
4. mean wage for college grads
5. mean tenure for non-college grads
6. mean tenure for college grads

Is there a option, user-written program, or set of commands that would produce this graph?

David
--
David Radwin, Principal Analyst // [email protected]
Office of Student Research, University of California, Berkeley
*
* 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