Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: count number of working adult


From   Shikha Sinha <shikha.sinha414@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: count number of working adult
Date   Fri, 21 Jun 2013 12:58:02 -0700

Thanks Elan. I can get it work in the long version of the data, but
was wondering about the ways to do it in the WIDE format. I can go
back and forth from wide-long-wide, but in general I am interested in
getting "working adult' in the wide format in Stata.

Shikha

On Fri, Jun 21, 2013 at 12:50 PM, Cohen, Elan <cohened@upmc.edu> wrote:
> 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: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Shikha Sinha
> Sent: Friday, June 21, 2013 15:30
> To: statalist@hsphsun2.harvard.edu
> 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/
*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index