* How many couples per household? * Specify a workspace cd e:\DHS\DHS_data\scratch * Collapse the CR file to get the number of couples in a household * A man may appear in more than one couple * Households with no couples will not be included use v001 v002 v003 v024 mv003 using "C:\Users\26216\ICF\Analysis - Shared Resources\Data\DHSdata\IACR74FL.DTA", clear rename v024 region rename v001 cluster rename v002 hh rename v003 wline rename mv003 hline gen couples=1 collapse(sum) couples, by(region cluster hh) sort region cluster hh save IACRtemp.dta, replace * Must add in the households with no couples * Must take into account whether the household was selected for the male subsample use hv001 hv002 hv024 hv027 using "C:\Users\26216\ICF\Analysis - Shared Resources\Data\DHSdata\IAHR74FL.DTA", clear rename hv024 region rename hv001 cluster rename hv002 hh * Households with hv027=0 save IAHRtemp.dta, replace keep if hv027==0 drop hv027 gen couples=99 save IAHRtemp99.dta, replace * Households with hv027=1 use IAHRtemp.dta, clear keep if hv027==1 drop hv027 sort region cluster hh merge region cluster hh using IACRtemp.dta drop _merge replace couples=0 if couples==. append using IAHRtemp99.dta sort label variable couples "Number of couples in HH" label define couples 99 "HH not in male sample" label values couples couples tab couples