Thanks Nick
True to your word, my horrible design wont even work, here is the error
message
. fbar year, by(npract) perc
too many categories in by() variable
Any ideas on a better approach to simply illustrate (graphically) that
either more or less housholds have done something from 1990 to 2000.
Ronnie
-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Nick Cox
Sent: 22. januar 2003 18:11
To: [email protected]
Subject: st: RE: Graph question
Ronnie Babigumira
> Basic graphics question I cant seem to figure out (I am
> using stata 7 on
> win2k). I have household data (sample below)
>
> houscode npract00 npract90
> 1. 12110001 0 0
> 2. 12110002 0 0
> 3. 12110003 1 1
> 4. 12401001 1 0
> 5. 12401002 0 0
> 6. 12401003 6 2
> 7. 12403001 0 0
> 8. 12403002 0 0
> 9. 12403003 1 0
>
> Where npracts00 npracts90 are number of practices (2000 and
> 1990 resptively
> and run from 0 - 6). To get the percentages of households
> in the diffrent
> practice classes for 2000, I tabulate npract00.
>
> I would like to represent this information graphically
> where on on the x
> axis I have practices and on y I have percentage. However,
> I want the bars
> for 2000 and 1990 for O practices to be side by side and so
> forth (so it is
> clear to see if there was a change between the two years).
> How do I do this
> in stata.
>
Check out -fbar- from SSC. It seems to
need a -reshape- first.
Thisn't quite what you want
(which personally I think is a horrible design)
but it is near.
rename npract00 npract2000
rename npract90 npract1990
reshape long npract, i(id) j(year)
fbar year, by(npract) perc
(There is lots of scope for bar charts
in Stata 8.)
Nick
[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/
*
* 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/