Bookmark and Share

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: How do I generate dummy variable for a nuclear family?


From   AP S <[email protected]>
To   [email protected]
Subject   st: How do I generate dummy variable for a nuclear family?
Date   Sat, 5 Nov 2011 14:39:15 -0400

Hi all,

I'm trying to generate a dummy for a nuclear family only (parents and
children) and separate them from extended family.
I have standard variables such as household id (hhid), person id(ar00) and
relationship to household head (ar02).
Based on these variables I'm trying to generate nuclear family variable but
haven't succeed so far.
Here's the code for ar02:

1.Head of household
2.Husband/wife
3.Children
4.Children
5.Sons/daughters-in-law
6.Parents
7.Father/mother-in-law
8.Siblings
9.Brother/sister-in-law
10.Grandchild
11.Grandparents
12.Uncles/aunts
13.Nephews/nieces
14.Cousins
15.Servants
16.Relative
17.Non-relative
21.Ex spouse


Here's an example of the data:
hhid  ar00 ar02
100     1     1     extended family
100     2     2
100     3     3
100     4     5
100     5     10
100     6     10
100     7     10
100     8     10
100     9     10
200     1     1     nuclear family
200     2     2
200     3     3
200     4     3
200     5     3
200     6     3
200     7     3

so I'd like to have a binary variable that say hhid=200 is a nuclear
family=1.
Could anybody help me with this problem?

Thank you in advance.

APS
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index