frame reset use "${inter}/Psycorona_long_full",clear cap drop id_wave egen id_wave= tag(id wave) drop if cases_population_7day==. cap drop country encode CountryName,gen(country) cap drop coronaClose gen coronaClose=1 if w_coronaClose_1==1 & w_coronaClose_2==1 replace coronaClose=2 if w_coronaClose_1==1 & w_coronaClose_2==0 replace coronaClose=3 if w_coronaClose_2==1 & w_coronaClose_1==0 replace coronaClose=0 if mi(coronaClose) cap label drop coronaClose label define coronaClose 1 "self+family" 2"self" 3"family" 0 "no" std global x i.age i.gender i.unemployment i.education w_PFS lnCOUNTRYGDPpc COUNTRYOut_of_pocket2019 cases_population_7day stringency_index frame create panela1 coef1 lb1 ub1 xtset id wave xtreg w_c19perBeh01_Harmonized sft_pca $x if m2!=2, vce(cluster country) lincom _b[sft_pca] frame post panela1 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19perBeh02_Harmonized sft_pca $x if m2!=2, vce(cluster country) lincom _b[sft_pca] frame post panela1 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19perBeh03_Harmonized sft_pca $x if m2!=2, vce(cluster country) lincom _b[sft_pca] frame post panela1 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_Vaccine sft_pca $x if m2!=2, vce(cluster country) lincom _b[sft_pca] frame post panela1 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19RCA01 sft_pca $x if m2!=1, vce(cluster country) lincom _b[sft_pca] frame post panela1 (`r(estimate)') (`r(lb)') (`r(ub)') frame change panela1 format coef1 %3.2f format lb1 %3.2f format ub1 %3.2f save "${inter}/panela1",replace use "${inter}/Psycorona_long_full",clear cap drop id_wave egen id_wave= tag(id wave) drop if cases_population_7day==. cap drop country encode CountryName,gen(country) std global x i.age i.gender i.unemployment i.education w_PFS lnCOUNTRYGDPpc COUNTRYOut_of_pocket2019 cases_population_7day stringency_index people_vaccinated_per_hundred frame create panela2 coef2 lb2 ub2 xtset id wave xtreg w_c19perBeh01_Harmonized sft_pca $x if m2!=2, vce(cluster country) lincom _b[sft_pca] frame post panela2 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19perBeh02_Harmonized sft_pca $x if m2!=2, vce(cluster country) lincom _b[sft_pca] frame post panela2 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19perBeh03_Harmonized sft_pca $x if m2!=2, vce(cluster country) lincom _b[sft_pca] frame post panela2 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_Vaccine sft_pca $x if m2!=2, vce(cluster country) lincom _b[sft_pca] frame post panela2 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19RCA01 sft_pca $x if m2!=1, vce(cluster country) lincom _b[sft_pca] frame post panela2 (`r(estimate)') (`r(lb)') (`r(ub)') frame change panela2 format coef2 %3.2f format lb2 %3.2f format ub2 %3.2f save "${inter}/panela2",replace use "${inter}/Psycorona_long_full",clear cap drop id_wave egen id_wave= tag(id wave) drop if cases_population_7day==. cap drop country encode CountryName,gen(country) cap drop coronaClose gen coronaClose=1 if w_coronaClose_1==1 & w_coronaClose_2==1 replace coronaClose=2 if w_coronaClose_1==1 & w_coronaClose_2==0 replace coronaClose=3 if w_coronaClose_2==1 & w_coronaClose_1==0 replace coronaClose=0 if mi(coronaClose) cap label drop coronaClose label define coronaClose 1 "self+family" 2"self" 3"family" 0 "no" std global x i.age i.gender i.unemployment i.education w_PFS lnCOUNTRYGDPpc COUNTRYOut_of_pocket2019 cases_population_7day stringency_index people_vaccinated_per_hundred frame create panela3 coef3 lb3 ub3 xtset id wave xtreg w_c19perBeh01_Harmonized sft_pca $x if m2!=2&coronaClose==0, vce(cluster country) lincom _b[sft_pca] frame post panela3 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19perBeh02_Harmonized sft_pca $x if m2!=2&coronaClose==0, vce(cluster country) lincom _b[sft_pca] frame post panela3 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19perBeh03_Harmonized sft_pca $x if m2!=2&coronaClose==0, vce(cluster country) lincom _b[sft_pca] frame post panela3 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_Vaccine sft_pca $x if m2!=2&coronaClose==0, vce(cluster country) lincom _b[sft_pca] frame post panela3 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19RCA01 sft_pca $x if m2!=1&coronaClose==0, vce(cluster country) lincom _b[sft_pca] frame post panela3 (`r(estimate)') (`r(lb)') (`r(ub)') frame change panela3 format coef3 %3.2f format lb3 %3.2f format ub3 %3.2f save "${inter}/panela3",replace use "${inter}/panela1",clear append using "${inter}/panela2" append using "${inter}/panela3" replace coef2=coef2[_n+5] if coef2==. replace coef3=coef3[_n+10] if coef3==. replace lb2=lb2[_n+5] if lb2==. replace lb3=lb3[_n+10] if lb3==. replace ub2=ub2[_n+5] if ub2==. replace ub3=ub3[_n+10] if ub3==. drop if coef1==. cap drop label2 gen label2=_n cap drop label1 gen label1=_n-0.2 cap drop label3 gen label3=_n+0.2 graph twoway (scatter label1 coef1 , lcolor("5 101 141") sort msize(vsmall) mfcolor("5 101 141") mlcolor("5 101 141") msymbol(diamond)) (rconnected lb1 ub1 label1 if label1<=0, msize(vsmall) mfcolor("5 101 141") mlcolor("5 101 141") msymbol(diamond)) (rcap lb1 ub1 label1,color("5 101 141") horizontal) /// (scatter label2 coef2 , sort msize(vsmall) mfcolor("130 208 221") mlcolor("130 208 221") msymbol(diamond) lpattern(dash) lcolor(gray)) (rconnected lb2 ub2 label2 if label2<=0, msize(vsmall) mfcolor("130 208 221") mlcolor("130 208 221") msymbol(diamond) lcolor("130 208 221") ) (rcap lb2 ub2 label2,color("130 208 221") horizontal) /// (scatter label3 coef3, msize(vsmall) mfcolor("223 82 54") mlcolor("223 82 54") msymbol(diamond) lpattern(dash) lcolor(gray)) (rconnected lb3 ub3 label3 if label3<=0, msize(vsmall) mfcolor("223 82 54") mlcolor("223 82 54") msymbol(diamond) lcolor("223 82 54") )(rcap lb2 ub2 label3,color("223 82 54") horizontal), /// xlab(-0.1(0.1)0.2,labsize(small) format(%3.1f)) ylab(1 "Hand-washing frequency" 2"Avoid crowds" 3 "Self-quarantine" 4 "Vaccine for self" 5 "Mandatory vaccination", angle(0) labsize(small) labcolor(black) axis(1)) xline(0, lp(dash)) xtitle("Estimated Coefficients",size(small)) subtitle("Panel A. All age") scheme(s1mono) legend(order(3 "All respondents" 6 `"All respondents"' `" (controlling for vaccine coverage)"' 9 `"Subset of respondents"' `"without infected family members"' `"(controlling for vaccine coverage)"') on size(small) row(4)) yscale(reverse)saving("${output}/graph1pa",replace) use "${inter}/Psycorona_long_full",clear cap drop id_wave egen id_wave= tag(id wave) drop if cases_population_7day==. cap drop country encode CountryName,gen(country) std global x i.age i.gender i.unemployment i.education w_PFS lnCOUNTRYGDPpc COUNTRYOut_of_pocket2019 cases_population_7day stringency_index frame create panelb1 coef1 lb1 ub1 xtset id wave xtreg w_c19perBeh01_Harmonized sft_pca $x if m2!=2&age<=5, vce(cluster country) lincom _b[sft_pca] frame post panelb1 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19perBeh02_Harmonized sft_pca $x if m2!=2&age<=5, vce(cluster country) lincom _b[sft_pca] frame post panelb1 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19perBeh03_Harmonized sft_pca $x if m2!=2&age<=5&age<=5, vce(cluster country) lincom _b[sft_pca] frame post panelb1 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_Vaccine sft_pca $x if m2!=2&age<=5, vce(cluster country) lincom _b[sft_pca] frame post panelb1 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19RCA01 sft_pca $x if m2!=1&age<=5, vce(cluster country) lincom _b[sft_pca] frame post panelb1 (`r(estimate)') (`r(lb)') (`r(ub)') frame change panelb1 format coef1 %3.2f format lb1 %3.2f format ub1 %3.2f save "${inter}/panelb1",replace use "${inter}/Psycorona_long_full",clear cap drop id_wave egen id_wave= tag(id wave) drop if cases_population_7day==. cap drop country encode CountryName,gen(country) std global x i.age i.gender i.unemployment i.education w_PFS lnCOUNTRYGDPpc COUNTRYOut_of_pocket2019 cases_population_7day stringency_index people_vaccinated_per_hundred frame create panelb2 coef2 lb2 ub2 xtset id wave xtreg w_c19perBeh01_Harmonized sft_pca $x if m2!=2&age<=5, vce(cluster country) lincom _b[sft_pca] frame post panelb2 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19perBeh02_Harmonized sft_pca $x if m2!=2&age<=5, vce(cluster country) lincom _b[sft_pca] frame post panelb2 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19perBeh03_Harmonized sft_pca $x if m2!=2&age<=5, vce(cluster country) lincom _b[sft_pca] frame post panelb2 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_Vaccine sft_pca $x if m2!=2&age<=5, vce(cluster country) lincom _b[sft_pca] frame post panelb2 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19RCA01 sft_pca $x if m2!=1&age<=5, vce(cluster country) lincom _b[sft_pca] frame post panelb2 (`r(estimate)') (`r(lb)') (`r(ub)') frame change panelb2 format coef2 %3.2f format lb2 %3.2f format ub2 %3.2f save "${inter}/panelb2",replace use "${inter}/Psycorona_long_full",clear cap drop id_wave egen id_wave= tag(id wave) drop if cases_population_7day==. cap drop country encode CountryName,gen(country) cap drop coronaClose gen coronaClose=1 if w_coronaClose_1==1 & w_coronaClose_2==1 replace coronaClose=2 if w_coronaClose_1==1 & w_coronaClose_2==0 replace coronaClose=3 if w_coronaClose_2==1 & w_coronaClose_1==0 replace coronaClose=0 if mi(coronaClose) cap label drop coronaClose label define coronaClose 1 "self+family" 2"self" 3"family" 0 "no" std global x i.age i.gender i.unemployment i.education w_PFS lnCOUNTRYGDPpc COUNTRYOut_of_pocket2019 cases_population_7day stringency_index people_vaccinated_per_hundred frame create panelb3 coef3 lb3 ub3 xtset id wave xtreg w_c19perBeh01_Harmonized sft_pca $x if m2!=2&coronaClose==0&age<=5, vce(cluster country) lincom _b[sft_pca] frame post panelb3 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19perBeh02_Harmonized sft_pca $x if m2!=2&coronaClose==0&age<=5, vce(cluster country) lincom _b[sft_pca] frame post panelb3 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19perBeh03_Harmonized sft_pca $x if m2!=2&coronaClose==0&age<=5, vce(cluster country) lincom _b[sft_pca] frame post panelb3 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_Vaccine sft_pca $x if m2!=2&coronaClose==0&age<=5, vce(cluster country) lincom _b[sft_pca] frame post panelb3 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19RCA01 sft_pca $x if m2!=1&coronaClose==0&age<=5, vce(cluster country) lincom _b[sft_pca] frame post panelb3 (`r(estimate)') (`r(lb)') (`r(ub)') frame change panelb3 format coef3 %3.2f format lb3 %3.2f format ub3 %3.2f save "${inter}/panelb3",replace use "${inter}/panelb1",clear append using "${inter}/panelb2" append using "${inter}/panelb3" replace coef2=coef2[_n+5] if coef2==. replace coef3=coef3[_n+10] if coef3==. replace lb2=lb2[_n+5] if lb2==. replace lb3=lb3[_n+10] if lb3==. replace ub2=ub2[_n+5] if ub2==. replace ub3=ub3[_n+10] if ub3==. drop if coef1==. cap drop label2 gen label2=_n cap drop label1 gen label1=_n-0.2 cap drop label3 gen label3=_n+0.2 graph twoway (scatter label1 coef1 , lcolor("5 101 141") sort msize(vsmall) mfcolor("5 101 141") mlcolor("5 101 141") msymbol(diamond)) (rconnected lb1 ub1 label1 if label1<=0, msize(vsmall) mfcolor("5 101 141") mlcolor("5 101 141") msymbol(diamond)) (rcap lb1 ub1 label1,color("5 101 141") horizontal) /// (scatter label2 coef2 , sort msize(vsmall) mfcolor("130 208 221") mlcolor("130 208 221") msymbol(diamond) lpattern(dash) lcolor(gray)) (rconnected lb2 ub2 label2 if label2<=0, msize(vsmall) mfcolor("130 208 221") mlcolor("130 208 221") msymbol(diamond) lcolor("130 208 221") ) (rcap lb2 ub2 label2,color("130 208 221") horizontal) /// (scatter label3 coef3, msize(vsmall) mfcolor("223 82 54") mlcolor("223 82 54") msymbol(diamond) lpattern(dash) lcolor(gray)) (rconnected lb3 ub3 label3 if label3<=0, msize(vsmall) mfcolor("223 82 54") mlcolor("223 82 54") msymbol(diamond) lcolor("223 82 54") )(rcap lb2 ub2 label3,color("223 82 54") horizontal), /// xlab(-0.1(0.1)0.2,labsize(small) format(%3.1f)) ylab(1 "Hand-washing frequency" 2"Avoid crowds" 3 "Self-quarantine" 4 "Vaccine for self" 5 "Mandatory vaccination", angle(0) labsize(small) labcolor(black) axis(1)) xline(0, lp(dash)) xtitle("Estimated Coefficients",size(small)) subtitle("Panel B. 18-64") scheme(s1mono) legend(order(3 "All respondents" 6 `"All respondents"' `" (controlling for vaccine coverage)"' 9 `"Subset of respondents"' `"without infected family members"' `"(controlling for vaccine coverage)"') on size(small) row(4)) yscale(reverse)saving("${output}/graph2pb",replace) use "${inter}/Psycorona_long_full",clear cap drop id_wave egen id_wave= tag(id wave) drop if cases_population_7day==. cap drop country encode CountryName,gen(country) std global x i.age i.gender i.unemployment i.education w_PFS lnCOUNTRYGDPpc COUNTRYOut_of_pocket2019 cases_population_7day stringency_index frame create panelc1 coef1 lb1 ub1 xtset id wave xtreg w_c19perBeh01_Harmonized sft_pca $x if m2!=2&age<=2, vce(cluster country) lincom _b[sft_pca] frame post panelc1 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19perBeh02_Harmonized sft_pca $x if m2!=2&age<=2, vce(cluster country) lincom _b[sft_pca] frame post panelc1 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19perBeh03_Harmonized sft_pca $x if m2!=2&age<=5&age<=2, vce(cluster country) lincom _b[sft_pca] frame post panelc1 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_Vaccine sft_pca $x if m2!=2&age<=2, vce(cluster country) lincom _b[sft_pca] frame post panelc1 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19RCA01 sft_pca $x if m2!=1&age<=2, vce(cluster country) lincom _b[sft_pca] frame post panelc1 (`r(estimate)') (`r(lb)') (`r(ub)') frame change panelc1 format coef1 %3.2f format lb1 %3.2f format ub1 %3.2f save "${inter}/panelc1",replace use "${inter}/Psycorona_long_full",clear cap drop id_wave egen id_wave= tag(id wave) drop if cases_population_7day==. cap drop country encode CountryName,gen(country) std global x i.age i.gender i.unemployment i.education w_PFS lnCOUNTRYGDPpc COUNTRYOut_of_pocket2019 cases_population_7day stringency_index people_vaccinated_per_hundred frame create panelc2 coef2 lb2 ub2 xtset id wave xtreg w_c19perBeh01_Harmonized sft_pca $x if m2!=2&age<=2, vce(cluster country) lincom _b[sft_pca] frame post panelc2 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19perBeh02_Harmonized sft_pca $x if m2!=2&age<=2, vce(cluster country) lincom _b[sft_pca] frame post panelc2 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19perBeh03_Harmonized sft_pca $x if m2!=2&age<=2, vce(cluster country) lincom _b[sft_pca] frame post panelc2 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_Vaccine sft_pca $x if m2!=2&age<=2, vce(cluster country) lincom _b[sft_pca] frame post panelc2 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19RCA01 sft_pca $x if m2!=1&age<=2, vce(cluster country) lincom _b[sft_pca] frame post panelc2 (`r(estimate)') (`r(lb)') (`r(ub)') frame change panelc2 format coef2 %3.2f format lb2 %3.2f format ub2 %3.2f save "${inter}/panelc2",replace use "${inter}/Psycorona_long_full",clear cap drop id_wave egen id_wave= tag(id wave) drop if cases_population_7day==. cap drop country encode CountryName,gen(country) cap drop coronaClose gen coronaClose=1 if w_coronaClose_1==1 & w_coronaClose_2==1 replace coronaClose=2 if w_coronaClose_1==1 & w_coronaClose_2==0 replace coronaClose=3 if w_coronaClose_2==1 & w_coronaClose_1==0 replace coronaClose=0 if mi(coronaClose) cap label drop coronaClose label define coronaClose 1 "self+family" 2"self" 3"family" 0 "no" std global x i.age i.gender i.unemployment i.education w_PFS lnCOUNTRYGDPpc COUNTRYOut_of_pocket2019 cases_population_7day stringency_index people_vaccinated_per_hundred frame create panelc3 coef3 lb3 ub3 xtset id wave xtreg w_c19perBeh01_Harmonized sft_pca $x if m2!=2&coronaClose==0&age<=2, vce(cluster country) lincom _b[sft_pca] frame post panelc3 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19perBeh02_Harmonized sft_pca $x if m2!=2&coronaClose==0&age<=2, vce(cluster country) lincom _b[sft_pca] frame post panelc3 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19perBeh03_Harmonized sft_pca $x if m2!=2&coronaClose==0&age<=2, vce(cluster country) lincom _b[sft_pca] frame post panelc3 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_Vaccine sft_pca $x if m2!=2&coronaClose==0&age<=2, vce(cluster country) lincom _b[sft_pca] frame post panelc3 (`r(estimate)') (`r(lb)') (`r(ub)') xtreg w_c19RCA01 sft_pca $x if m2!=1&coronaClose==0&age<=2, vce(cluster country) lincom _b[sft_pca] frame post panelc3 (`r(estimate)') (`r(lb)') (`r(ub)') frame change panelc3 format coef3 %3.2f format lb3 %3.2f format ub3 %3.2f save "${inter}/panelc3",replace use "${inter}/panelc1",clear append using "${inter}/panelc2" append using "${inter}/panelc3" replace coef2=coef2[_n+5] if coef2==. replace coef3=coef3[_n+10] if coef3==. replace lb2=lb2[_n+5] if lb2==. replace lb3=lb3[_n+10] if lb3==. replace ub2=ub2[_n+5] if ub2==. replace ub3=ub3[_n+10] if ub3==. drop if coef1==. cap drop label2 gen label2=_n cap drop label1 gen label1=_n-0.2 cap drop label3 gen label3=_n+0.2 graph twoway (scatter label1 coef1 , lcolor("5 101 141") sort msize(vsmall) mfcolor("5 101 141") mlcolor("5 101 141") msymbol(diamond)) (rconnected lb1 ub1 label1 if label1<=0, msize(vsmall) mfcolor("5 101 141") mlcolor("5 101 141") msymbol(diamond)) (rcap lb1 ub1 label1,color("5 101 141") horizontal) /// (scatter label2 coef2 , sort msize(vsmall) mfcolor("130 208 221") mlcolor("130 208 221") msymbol(diamond) lpattern(dash) lcolor(gray)) (rconnected lb2 ub2 label2 if label2<=0, msize(vsmall) mfcolor("130 208 221") mlcolor("130 208 221") msymbol(diamond) lcolor("130 208 221") ) (rcap lb2 ub2 label2,color("130 208 221") horizontal) /// (scatter label3 coef3, msize(vsmall) mfcolor("223 82 54") mlcolor("223 82 54") msymbol(diamond) lpattern(dash) lcolor(gray)) (rconnected lb3 ub3 label3 if label3<=0, msize(vsmall) mfcolor("223 82 54") mlcolor("223 82 54") msymbol(diamond) lcolor("223 82 54") )(rcap lb2 ub2 label3,color("223 82 54") horizontal), /// xlab(-0.1(0.1)0.2,labsize(small) format(%3.1f)) ylab(1 "Hand-washing frequency" 2"Avoid crowds" 3 "Self-quarantine" 4 "Vaccine for self" 5 "Mandatory vaccination", angle(0) labsize(small) labcolor(black) axis(1)) xline(0, lp(dash)) xtitle("Estimated Coefficients",size(small)) subtitle("Panel C. 18-34") scheme(s1mono) legend(order(3 "All respondents" 6 `"All respondents"' `" (controlling for vaccine coverage)"' 9 `"Subset of respondents"' `"without infected family members"' `"(controlling for vaccine coverage)"') on size(small) row(4)) yscale(reverse)saving("${output}/graph3pc",replace) grc1leg2 "${output}/graph1pa.gph" "${output}/graph2pb.gph" "${output}/graph3pc.gph" , legendfrom("${output}/graph3pc.gph") pos(6)colfirst col(3) scheme(s1mono) ysize(28) xsize(46) scale(0.7) graph save "${output}/figure3",replace