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