* Compare education of mother-in-law and daughter-in-law in Pakistan 2017-18 survey * Mother-in-law is female head of household (hv101=1 and hv104=2) * or is female spouse of head (hv101=2 and hv104=2). (There can b exceptions) * Daughter-in-law: hv101=4 and hv104=2 * The education variables for all household members are hv106-hv109 * The number of household members is coded in the PR file as hv009 * Open the PR file use "C:\Users\26216\ICF\Analysis - Shared Resources\Data\DHSdata\PKPR71FL.DTA", clear describe hv101 * The label of hv101 is HV101 label list HV101 * Keep women who are the head or spouse of head * This should be at most one person in the household keep if hv104==2 & (hv101==1 | hv101==2) keep hv001 hv002 hv101 hv106-hv109 * PROBLEM: There are households with multiple wives. I will drop these households but you * may want to review them. If you don't drop them, the following merge will not work. gen one=1 egen cases=count(one),by(hv001 hv002) tab cases drop if cases>1 drop one cases rename hv10* hv10*_moinlaw * Merge this person's education variables onto every person in the household merge 1:m hv001 hv002 using "C:\Users\26216\ICF\Analysis - Shared Resources\Data\DHSdata\PKPR71FL.DTA" tab _merge drop _merge * Identify women who are daughters-in-law of a female household head gen dtrinlaw=0 * Daughter-in-law of female head replace dtrinlaw=1 if hv101==4 & hv104==2 & hv101_moinlaw==1 * Daughter-in-law of female spouse of head replace dtrinlaw=2 if hv101==4 & hv104==2 & hv101_moinlaw==2 label define dtrinlaw 0 "NOT a dtrinlaw of head" 1 "Dtrinlaw of head; head is moinlaw" 2 "Dtrinlaw of head; spouse of head is moinlaw" label values dtrinlaw dtrinlaw tab dtrinlaw * Simple comparison: crosstab of hv106 for the two types of dtrinlaw tab hv106 hv106_moinlaw if dtrinlaw==1 tab hv106 hv106_moinlaw if dtrinlaw==2