Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Percentage calculation by groups


From   "Leonor Saravia" <[email protected]>
To   [email protected]
Subject   st: Percentage calculation by groups
Date   Wed, 18 Jun 2008 23:31:24 -0400

Dear Statalisters,

I�m working with an employment database, which has data of working
people (self-employment or others), their age and sex (male -1 - or
female -2-). I'd like to calculate the percentage, by range of age, of
males and females who works as self-employed, but I need to calculate
this considering as the 100% of people those who belong to the
categories generated by age and sex (males or females), I mean NOT
considering as the 100% the total of people being self - employed
males or females without taking into account the age.

I'm using the next command (as Maarten Buis adviced me in another, but
similar problem):

noi tab age self-employed if sex == 1, row
noi tab age self-employed if sex == 2, row

But doing it this way Stata gives the percentage of male or female
sel-employed persons by age considering as the 100% the total of males
o females being self - employed, not the 100% of persons satisfying
those conditions AND the range of age.

I�d appreciate your help because I cannot figure out how to do it.

Thanks a lot,

Leonor

*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index