Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Help


From   <ffkb2@kent.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   st: Help
Date   Mon, 07 Mar 2005 09:26:45 GMT

Dear Statalist.

I want to generate a code for the household industry. The household industry is the industry in which the household head is engaged in. However for some households where the industry code is missing for the household head, I want to assign the next non missing industry code as the for the household.

My data looks like this

hhid member indicode
1         1                 1
1          2                 2
1          3                  3
2           1                  .
2            2                 4
2            3                  4
3            1                   .
3            2                   .
3            3                   1

I used the collapse command to get the household industry but do not seem to find a command that can be combined with collapse to pick the first non missing indicode for the household.

Please help.


_________________________________________
Fanwell Kenala Bokosi
Department of Economics
Keynes College
University of Kent
Canterbury
CT2 7NP
United Kingdom

Tel: (Office) + 44 1227 827655
Tel: (Home) + 44 1634 582530
Tel: (Mobile) + 44 7939 447392

email: ffkb2@kent.ac.uk or
fanwellbokosi@onetel.com
_______________________________________


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index