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
What diagnostic tests should be conducted after beta regression?Hello, I estimated a beta regression with dependent variable that falls strictly within the range of…
Deriving R2 with mi estimate: mixedHi everyone, I am interested in tabulating the mean level 1 explained variance Array and mean total …
Multicollinearity, VIF and interactionHello I have seen many posts (questions and responses) related to multicollinearity, VIF and interac…
3SLS for panel dataHi! I have been trying to estimate the relationship between an endogenous variable (say X) and Y, an…
LPM interpretation. Dummy dependent variable and Log independent variableHi everyone. I have a confusion on how to interpret a LPM where we have a dummy dependent variable …
Subscribe to:
Post Comments (Atom)
0 Response to Different combinations in each household
Post a Comment