I have individual data set. With my dataset I want to create a living arrangement among elderly for each household. For example whether elderly is living alone, living with spouse only, living with spouse and family members. Can some please help me out in creating this new variable with my data. In the below for ro4 relationship with Household head it ranges from (1 to 12 ) and ro5 is age of the respondent.
* Example generated by -dataex-. To install: ssc install dataex
clear
input int(stateid distid psuid hhid ro4 ro5)
1 2 1 2 1 76
1 2 1 2 3 31
1 2 1 2 3 42
1 2 1 2 3 37
1 2 1 2 4 26
1 2 1 2 4 40
1 2 1 2 4 33
1 2 1 2 5 13
1 2 1 2 5 8
1 2 1 2 5 20
1 2 1 2 5 13
1 2 1 2 5 19
1 2 1 2 5 8
1 2 1 2 12 65
1 2 1 3 1 45
1 2 1 3 2 43
1 2 1 3 3 20
1 2 1 3 3 12
1 2 1 3 3 17
1 2 1 3 3 23
1 2 1 3 3 14
1 2 1 4 1 57
1 2 1 4 2 47
1 2 1 4 3 13
1 2 1 4 3 20
1 2 1 4 3 14
1 2 1 5 1 50
1 2 1 5 2 38
1 2 1 5 3 23
1 2 1 5 3 16
1 2 1 5 3 12
1 2 1 5 3 27
1 2 1 5 3 18
1 2 1 6 1 72
1 2 1 6 3 39
1 2 1 6 3 27
1 2 1 6 3 37
1 2 1 6 4 33
1 2 1 7 1 52
1 2 1 7 2 42
1 2 1 7 3 24
1 2 1 7 3 16
1 2 1 7 3 15
1 2 1 7 3 20
1 2 1 7 3 18
1 2 1 7 3 26
1 2 1 8 1 42
1 2 1 8 2 37
1 2 1 8 3 18
1 2 1 8 3 13
end
label values stateid STATEID
label def STATEID 1 "Jammu & Kashmir 01", modify
label def RO4 1 "Head 1", modify
label def RO4 2 "Wife/Husband 2", modify
label def RO4 3 "Son/Daughter 3", modify
label def RO4 4 "Child-in-Law 4", modify
label def RO4 5 "Grandchild 5", modify
label def RO4 6 "Father/Mother 6", modify
label def RO4 7 "Brother/Sister 7", modify
label def RO4 9 "Nephew/Niece 9", modify
label def RO4 10 "Sib-in-Law 10", modify
label def RO4 12 "Servant/Others 12", modify
Related Posts with Different combinations in each household
Bar Chart PercentilesHello, I plotted a bar graph of the education level agains the mean of the average pay. Because of …
hausman test problemDear all, I am working with panel data and when I use the command: hausman fe re, force, I get the…
Computing IPW estimator by handHello everyone, For my project, I try to know if a certain type of policy ("pol", which is a dummy)…
Combining a newly constructed dummy variables to one categorical variable for analysis/refcatDear Statalist, I have currently created four variables about family status: 1) Parents living toge…
New to SSC mbitobit - Bivariate Tobit modelDear all, Thanks to Professor Baum, A new command is available in SSC. -mbitobit-. This command re-a…
Subscribe to:
Post Comments (Atom)
0 Response to Different combinations in each household
Post a Comment