/*Exercise: Combining Module Data*/ /*get number of ATUS non-respondents to each module*/ tab eh_resp; tab wb_resp; /*number of module respondents in 2013 and 2014*/ tab wb_resp if year==2013; tab eh_resp if year==2014; /*number of respondents in BOTH WB and EH modules*/ tab wb_resp eh_resp; /*eliminate missings in new health variable*/ gen health=genhealth if genhealth<96; /*generate a weight equal to WB module weight if in that module and EH module weight if in that module*/ gen combwt=.; replace combwt=wbwt if wb_resp==1; replace combwt=ehwt if eh_resp==1; /*generate weighted means*/ svyset [weight=combwt]; svy: mean bls_leis_tv, over(health);