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
Combining two time variables (Year & Period of year (month)) into one time variable which could be used as tsset for graphsHello Stata community; I have this dataset: Code: * Example generated by -dataex-. To install: ssc…
How can I correctly remove the missing values within group in Stata?I have a small data set laid out in longitudinal format, * Example generated by -dataex-. clear inpu…
Panel specific ar vs common arHello everyone, what are the tests/ criteria that specify which type of options should I choose when…
Remove blank lines from string colvectorIf I have a string colvector in Mata, how can I create a new string colvector that removes rows with…
How to split variable that does not have spacesHi Everyone, I would like to split (eg. Italy2019) into two variables (eg.country= Italy and year =…
Subscribe to:
Post Comments (Atom)
0 Response to Coding_column_row
Post a Comment