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]
RE: st: Indicating whether a family is nuclear or extended for all
From
"Ntshebe O." <[email protected]>
To
"[email protected]" <[email protected]>
Subject
RE: st: Indicating whether a family is nuclear or extended for all
Date
Mon, 22 Jul 2013 14:17:23 +0000
Dear Statalist
I wish to generate a variable indicating whether a household is nuclear or = extended for all members.
I am using the variable p05(relationship to household head), HHId identifi= es the household and totalhh is the household size.
See attached below:
(p05)
0 Head
1 Spouse
2 Son or Daughter
3 Child In-law
4 Step child
5 Grandchild
6 Parent
7 Parent In-law
8 Grand Parent
9 Brother or Sister
10 Nephew or Niece
11 Uncle or Aunt
12 Other relative
13 Not related
bys HHId: gen nuclear=0 if _N >1
replace nuclear=1 if p05==0|p05==1|p05==2
replace nuclear=. if p05==.
tab nuclear generation
tab nuclear totalhh
br HHId p05 nuclear
label variable nuclear "nuclear family"
label define nuclear 1 "yes" 0 "no"
bys HHId: gen extended=0 if _N >1
replace extended=1 if |p05==3| p05==4|p05==5|p05==6|p05==7|p05==8|p05==9|p05==10|p05==11|p05==12|p05==13
replace extended=. if p05==.
tab extended
label variable extended "extended family"
label define extended 1 "yes" 0 "no"
I did the above, but I am not sure how I make the count for nuclear or extended families
appear the same for members of the same household. A household can either be nuclear or extended.
Thanks.
Oleosi
*
* 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/