On Tue Sep 24, 2002 14:15, Kazi Ali Toufique wrote:
> Hello,
> I would like to crosstabulate a categorical row variable (say sex) and a
> categorical column variable (say religion) and the cells would be sum of
> income (total income of male of a particular religion and so on). The
> problem is how do I get column percentages of income without transferring
> the tabulation results to XL?
> Toufique
collapse (sum) income, by(sex religion)
egen total = sum(income), by(religion)
replace income = 100*income/total
table sex religion, c(m income)
*
* 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/