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).
Or perhaps frequency polygons, overlaid:
rename npract00 npract2000
rename npract90 npract1990
reshape long npract , i(houscode) j(year)
contract npract year , zero
egen percent = pc(_freq), by(year)
separate percent , by(y)
graph percent???? npract , c(ll) sort
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/