Dear statalist community, I am in need to do the following exercise for my research, can anyone please offer help?
[CODE]
tab Household_composition
Relationship to head
|------------------+-----------------------------------
| Head 1
| Wife/Husband 2
| Son/Daughter 3
| Son -in-Law 4
| Grandchild 5
| Father/Mother 6
| Brother/Sister 7
| Parent-in-Law 8
| Nephew/Niece 9
| Sib-in-Law 10
| Other rel 11
|Servant/Others 12
/CODE]
In a household, there could be members, as given in the table above. If the household is a nuclear family ( i.e., "Head 1 with Wife/Husband 2 with/without Son/Daughter 3") then we assign 1 to the DUMMY variable. If the household has other members apart from "Head with Wife/Husband 2 with/without Son/Daughter 3", then we assign 0 to the Dummy variable.
I have a unique identifier for the household in which members live.
I need to generate this DUMMY variable.
regards,
ajay
Related Posts with Coding_column_row
Differences in correlation coefficients produced by corr and regFor certain variables, corr and reg produce different correlation coefficients that cannot be explai…
Finding the totals of string variablesHi everyone, I have this dataset that i need to calculate the totals for each program. So, for exam…
Two-way graph for panel dataDear, I want to plot a variable in panel data. Below is an example of my data. Code: year provinc…
Two-way graph for panel dataDear, I want to plot a variable in panel data. Below is an example of my data. Code: year provinc…
Model Validation Using StataHi all, I have a question about how to do model validation using Stata. I used a training dataset …
Subscribe to:
Post Comments (Atom)
0 Response to Coding_column_row
Post a Comment