Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: RE: count number of working adult
From
"Cohen, Elan" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: RE: count number of working adult
Date
Fri, 21 Jun 2013 19:50:27 +0000
Shikha,
reshape long person age working, i(hhid) j(personid)
egen numadultwork = sum((work==1)*(age>17 & !mi(age))), by(hhid)
* Assuming you want to go back to wide format (though I don't see why):
reshape wide person age working, i(hhid) j(personid)
HTH,
- Elan
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Shikha Sinha
Sent: Friday, June 21, 2013 15:30
To: [email protected]
Subject: st: count number of working adult
Hi,
I want to estimate how many working adults are in each household. The
data is in wide format. Adult is defined as age >17 and working info
is coded as 1/0.
hhid peson1-person11 age1-age11 working1-working11
Thanks,
Shikha
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/