Dear Statalist members,
I want to use a bar chart to display in a more visual manner the column
percentages from a crosstab for two dichotomous variables, such as
democracy and first violator.
For the two-way table, I used the command
--tab democ firstviol, column--
Which gives the following output.
First | Democracy
violator | No Yes | Total
-----------+----------------------+----------
No | 89 40 | 129
| 57.05 72.73 | 61.14
-----------+----------------------+----------
Yes | 67 15 | 82
| 42.95 27.27 | 38.86
-----------+----------------------+----------
Total | 156 55 | 211
| 100.00 100.00 | 100.00
The final product I would hope for in the corresponding bar would have
two separate pairs of columns. The first fair would have the relative
percentages for democracies (democ=1) and nondemocracies (democ=0) that
are not first violators (firstviol=0) (i.e. 72.73 and 57.05), and the
second would be the corresponding pair for first violators (firstviol=1)
(i.e. 27.27 and 42.95).
I'm assuming I would use some version of the -graph bar- command, but
I'm having trouble figuring how to specify the column percentages.
Thanks for considering my question.
Cheers, Geoff
--
Geoffrey Wallace
PhD Candidate
Department of Government
214 White Hall
Cornell University
Ithaca, NY 14853
t.202.302.4209
f.607.255.4530
http://www.people.cornell.edu/pages/gw46/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/