Statalist


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

Re: st: graph bar


From   David Airey <[email protected]>
To   [email protected]
Subject   Re: st: graph bar
Date   Mon, 7 Apr 2008 09:50:28 -0500

One solution is to reshape your data so you have wave and time as variables.

For example,

clear
set obs 70
egen panel = seq(), from(1) to(2) block(35)
gen id = _n
forvalues i = 1/7 {
gen x`i' = invnorm(uniform()) + panel
}
reshape long x, i(id) j(time)
graph bar x, over(panel) over(time)

If you just wanted the x1-x7 labeled, you would need to have your data organized into two responses by panel, e.g., panel1 and panel2, and then issue

graph bar panel1 panel2, over(time)

-Dave

On Apr 6, 2008, at 10:55 PM, Lloyd Dumont wrote:

Hello, everyone. I'm having trouble doing what ought
to be a simple bar graph. I have panel data that
includes some variables along the lines of...

X1 X2 ... X7

I am interested in their means by survey wave for each
of two waves. But, in terms of groupings...
I would like there two be 7 groups, each containing
two bars--one for wave I and one for wave II.

No matter what I do, it seems to want to create 2
groups of 7 bars each--the oppposite of what I want.

Thank you! Lloyd.


____________________________________________________________________________________
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.
http://tc.deals.yahoo.com/tc/blockbuster/text5.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/
*
*   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