Geoffrey Wallace <[email protected]>:
Try also:
ssc inst byhist, replace
clear
set obs 211
g d=(_n<56)
g fv=(_n<16) if d
sort d
replace fv=(_n<68) if d==0
la def fv 0 "No" 1 "Yes"
la val fv fv
la def d 0 "Not Democ" 1 "Democ"
la val d d
la var fv "First Violator"
ta fv d, col nofr
byhist fv, by(d) frac disc tw(xla(0/1,val))
On Thu, Feb 12, 2009 at 12:58 PM, Geoffrey Wallace <[email protected]> wrote:
> Hi Nick,
>
> I was able to get the basic outlines of what I was looking for using
> -spineplot- and will only need to tinker with the options to get the desired
> appearance.
<...>
>> Geoffrey Wallace, Ph.D. candidate
>> 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
...
*
* 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/