Commit
·
021b011
1
Parent(s):
6d7650f
add 21
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- 21/paper.pdf +3 -0
- 21/replication_package/1_README.pdf +3 -0
- 21/replication_package/Data/LSS_CSComCensus.dta +3 -0
- 21/replication_package/Data/LSS_DoctorEndlineInterview.dta +3 -0
- 21/replication_package/Data/LSS_analysis_datasets_20201108.dta +3 -0
- 21/replication_package/Do_Files/Figures/3_graph_outcomeXpredpos_control.do +53 -0
- 21/replication_package/Do_Files/Figures/4_graph_tmtXpredpos.do +118 -0
- 21/replication_package/Do_Files/Figures/5_graph_voucher_tmt.do +30 -0
- 21/replication_package/Do_Files/Figures/B1_graph_misallocation.do +27 -0
- 21/replication_package/Do_Files/Figures/B2_graph_dist_pred_pos.do +13 -0
- 21/replication_package/Do_Files/Figures/B3_graph_outcomeXpredpos_control_home.do +63 -0
- 21/replication_package/Do_Files/Figures/B4_graph_vouchersXbins.do +101 -0
- 21/replication_package/Do_Files/LSS_master_data_analysis.do +531 -0
- 21/replication_package/Do_Files/Stata admin files/LSS_TablePrograms.do +1392 -0
- 21/replication_package/Do_Files/Stata admin files/LSS_config_stata.do +52 -0
- 21/replication_package/Do_Files/Stata admin files/LSS_make_bootstrap_repsets.do +51 -0
- 21/replication_package/Do_Files/Tables/1_table_control_group.do +136 -0
- 21/replication_package/Do_Files/Tables/2_table_balance.do +458 -0
- 21/replication_package/Do_Files/Tables/B1_table_clinic_census.do +175 -0
- 21/replication_package/Do_Files/Tables/B2_table_means_doctor.do +94 -0
- 21/replication_package/Do_Files/Tables/B5_table_selection.do +423 -0
- 21/replication_package/Do_Files/Tables/B6_table_diff_test_consent.do +419 -0
- 21/replication_package/Do_Files/Tables/B7_table_mal_prob_probit.do +38 -0
- 21/replication_package/Figures/1_DocPat-graphs-theory-figure-2020-08-28.pdf +3 -0
- 21/replication_package/Figures/2_DocPat-InterventionScheduleDiagram.pdf +3 -0
- 21/replication_package/Figures/3_outcomeXpredpos_control.pdf +3 -0
- 21/replication_package/Figures/4_tmtXpredpos.pdf +3 -0
- 21/replication_package/Figures/5_voucher_tmt.pdf +3 -0
- 21/replication_package/Figures/B1_misallocation.pdf +3 -0
- 21/replication_package/Figures/B2_dist_pred_pos.pdf +3 -0
- 21/replication_package/Figures/B3_outcomeXpredpos_control_home.pdf +3 -0
- 21/replication_package/Figures/B4_vouchersXbins.pdf +3 -0
- 21/replication_package/LSS_Appendix_Replication.tex +183 -0
- 21/replication_package/LSS_Main_Replication.tex +131 -0
- 21/replication_package/Survey Instruments/CSComPatientInterview_Questionnaire.pdf +3 -0
- 21/replication_package/Survey Instruments/DocPat-ClinicCensus-FR-2016-05-17.pdf +3 -0
- 21/replication_package/Survey Instruments/DoctorEndlineInterview_Questionnaire.pdf +3 -0
- 21/replication_package/Survey Instruments/HomePatientInterview_Questionnaire.pdf +3 -0
- 21/replication_package/Survey Instruments/Interventions_Notes.pdf +3 -0
- 21/replication_package/Survey Instruments/MorningCSComID_Questionnaire.pdf +3 -0
- 21/replication_package/Tables/1_control_group.tex +16 -0
- 21/replication_package/Tables/2_balance.tex +61 -0
- 21/replication_package/Tables/3_mal_tmt_overall_new_lso.tex +13 -0
- 21/replication_package/Tables/4_mal_tmt_het_new_lso.tex +23 -0
- 21/replication_package/Tables/5_expected_match_decomp_lso.tex +12 -0
- 21/replication_package/Tables/A1_theory_table.tex +55 -0
- 21/replication_package/Tables/B10_mal_tmt_overall_nl.tex +13 -0
- 21/replication_package/Tables/B11_mal_tmt_het_nl.tex +23 -0
- 21/replication_package/Tables/B12_vouchers_tmt_lso.tex +13 -0
- 21/replication_package/Tables/B13_stockpiling_lso.tex +12 -0
21/paper.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:db3ad3118d40085742d597c7dc47593fe0a62805879fa5d5af80eafe980e8e53
|
3 |
+
size 783051
|
21/replication_package/1_README.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d9ce01cd7ae7dae27cc9f23a422703665f7f7bbf95d25e7b2ecdf777a35e580b
|
3 |
+
size 216263
|
21/replication_package/Data/LSS_CSComCensus.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:114ddf0466c49a55acdec5c595afb273c61546ea7582a1ee08c15efff511b9b5
|
3 |
+
size 52028
|
21/replication_package/Data/LSS_DoctorEndlineInterview.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2d6a21f04cbbc8a4fc508bdbfbf9d12664eac4f752e57f8cbb1d22e06d4a4b50
|
3 |
+
size 321834
|
21/replication_package/Data/LSS_analysis_datasets_20201108.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b93f7ca43dd67236cb51475f3c781ccf10822b49d60738979cb15114cb7e7c14
|
3 |
+
size 55990235
|
21/replication_package/Do_Files/Figures/3_graph_outcomeXpredpos_control.do
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
preserve
|
2 |
+
|
3 |
+
// patterns in no voucher group only
|
4 |
+
keep if doctor_voucher + patient_voucher ==0
|
5 |
+
|
6 |
+
// no treatment (RX, taken)
|
7 |
+
g RXnone= 1 - RXtreat_sev_simple_mal
|
8 |
+
g none= 1 - treat_sev_simple_mal
|
9 |
+
|
10 |
+
// percentiles of predicted pos
|
11 |
+
g predicted_RDT_POS= pred_mal_pos
|
12 |
+
_pctile predicted_RDT_POS, p(2.5 97.5)
|
13 |
+
local bottom=r(r1)
|
14 |
+
local top=r(r2)
|
15 |
+
_pctile predicted_RDT_POS, p(25 50 75)
|
16 |
+
local p25= r(r1)
|
17 |
+
local p50= r(r2)
|
18 |
+
local p75= r(r3)
|
19 |
+
|
20 |
+
// make local linear graphs and trim tails
|
21 |
+
local varlist "RXnone RXtreat_simple_mal RXtreat_severe_mal none treat_simple_mal treat_severe_mal"
|
22 |
+
|
23 |
+
foreach out of local varlist{
|
24 |
+
local ytit "Local Average"
|
25 |
+
local tit: variable label `out'
|
26 |
+
|
27 |
+
* all
|
28 |
+
lpoly `out' predicted_RDT_POS , deg(1) gen(x_`out' y_`out') se(se_`out') nodraw
|
29 |
+
replace y_`out'=. if x_`out'>`top' | x_`out'<`bottom'
|
30 |
+
replace x_`out'=. if x_`out'>`top' | x_`out'<`bottom'
|
31 |
+
g ul_`out'= y_`out'+1.645*se_`out'
|
32 |
+
g ll_`out'= y_`out'-1.645*se_`out'
|
33 |
+
|
34 |
+
}
|
35 |
+
|
36 |
+
|
37 |
+
// compile final graph panel by panel
|
38 |
+
|
39 |
+
foreach lead in "" {
|
40 |
+
line `lead'y_RXnone `lead'y_none `lead'x_none, legend(label(1 "No Treat. Prescribed") label(2 "No Treat. Purchased") size(small) row(1)) xtit("Predicted Malaria Risk", size(medium)) ytit("Share Patients", size(medium)) ///
|
41 |
+
graphregion(color(white)) tit("A. No Malaria Treatment", size(medsmall)) lcol(black gs10) lwid(medthick medthick) lpat(solid longdash) name(`lead'PA, replace) ylab(0(.2).8) xline(`p25', lcol(gs7) lpat(dot)) xline(`p50', lcol(gs7) lpat(dot)) xline(`p75', lcol(gs7) lpat(dot)) nodraw
|
42 |
+
line `lead'y_RXtreat_simple_mal `lead'y_treat_simple_mal `lead'x_treat_simple_mal, legend(label(1 "Treatment Prescribed") label(2 "Treatment Purchased") size(small) row(1)) xtit("Predicted Malaria Risk", size(medium)) ytit("Share Patients", size(medium)) ///
|
43 |
+
graphregion(color(white)) tit("B. Simple Malaria Treatment", size(medsmall)) lcol(black gs10) lwid(medthick medthick) lpat(solid longdash) name(`lead'PB, replace) ylab(0(.2).8) xline(`p25', lcol(gs7) lpat(dot)) xline(`p50', lcol(gs7) lpat(dot)) xline(`p75', lcol(gs7) lpat(dot)) nodraw
|
44 |
+
line `lead'y_RXtreat_severe_mal `lead'y_treat_severe_mal `lead'x_treat_severe_mal, legend(label(1 "Treatment Prescribed") label(2 "Treatment Purchased") size(small) row(1)) xtit("Predicted Malaria Risk", size(medium)) ytit("Share Patients", size(medium)) ///
|
45 |
+
graphregion(color(white)) tit("C. Severe Malaria Treatment", size(medsmall)) lcol(black gs10) lwid(medthick medthick) lpat(solid longdash) name(`lead'PC, replace) ylab(0(.2).8) xline(`p25', lcol(gs7) lpat(dot)) xline(`p50', lcol(gs7) lpat(dot)) xline(`p75', lcol(gs7) lpat(dot)) nodraw
|
46 |
+
}
|
47 |
+
|
48 |
+
graph combine PA PB PC, row(1) graphregion(color(white)) name(final, replace) xsize(12) ysize(4)
|
49 |
+
|
50 |
+
// save output
|
51 |
+
graph export "$graphs/3_outcomeXpredpos_control.pdf", replace
|
52 |
+
|
53 |
+
restore
|
21/replication_package/Do_Files/Figures/4_graph_tmtXpredpos.do
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
local reps= 1000
|
3 |
+
|
4 |
+
keep if dropme==0
|
5 |
+
|
6 |
+
// percentiles of predicted pos
|
7 |
+
_pctile pred_mal_pos, p(2.5 97.5)
|
8 |
+
local bottom=r(r1)
|
9 |
+
local top=r(r2)
|
10 |
+
_pctile pred_mal_pos, p(25 50 75)
|
11 |
+
local p25= r(r1)
|
12 |
+
local p50= r(r2)
|
13 |
+
local p75= r(r3)
|
14 |
+
|
15 |
+
la var used_vouchers_admin "A. Used Voucher"
|
16 |
+
la var treat_sev_simple_mal "B. Purchase Any Malaria Treatment"
|
17 |
+
la var treat_severe_mal "C. Purchase Severe Malaria Treatment"
|
18 |
+
|
19 |
+
mat xgrid= J(50,1,.)
|
20 |
+
|
21 |
+
local interval= (`top' - `bottom')/50
|
22 |
+
local qq=1
|
23 |
+
forval i=`bottom'(`interval')`top' {
|
24 |
+
mat xgrid[`qq',1]= `i'
|
25 |
+
local ++qq
|
26 |
+
}
|
27 |
+
|
28 |
+
svmat xgrid
|
29 |
+
|
30 |
+
// make local linear graphs and trim tails
|
31 |
+
local varlist "used_vouchers_admin treat_sev_simple_mal treat_severe_mal"
|
32 |
+
foreach out of local varlist {
|
33 |
+
|
34 |
+
lpoly `out' pred_mal_pos if patient_voucher==1, deg(1) gen(Py_`out') at(xgrid) nodraw
|
35 |
+
mkmat Py_`out' if xgrid!=., mat(q)
|
36 |
+
mat RP`out'= q
|
37 |
+
|
38 |
+
lpoly `out' pred_mal_pos if doctor_voucher==1, deg(1) gen(Dy_`out') at(xgrid) nodraw
|
39 |
+
mkmat Dy_`out' if xgrid!=., mat(q)
|
40 |
+
mat RD`out'= q
|
41 |
+
}
|
42 |
+
|
43 |
+
* REPLICATIONS
|
44 |
+
local k=1
|
45 |
+
while `k'<=`reps' {
|
46 |
+
|
47 |
+
drop _all
|
48 |
+
use "$data_final/_bootstrap/bs_cluCSCOM_`k'"
|
49 |
+
|
50 |
+
keep if dropme==0
|
51 |
+
|
52 |
+
svmat xgrid
|
53 |
+
|
54 |
+
// make local linear graphs and trim tails
|
55 |
+
local varlist "used_vouchers_admin treat_sev_simple_mal treat_severe_mal"
|
56 |
+
foreach out of local varlist {
|
57 |
+
lpoly `out' pred_mal_pos if patient_voucher==1, deg(1) gen(Py_`out') at(xgrid) nodraw
|
58 |
+
mkmat Py_`out' if xgrid!=., mat(q)
|
59 |
+
mat RP`out'= RP`out',q
|
60 |
+
lpoly `out' pred_mal_pos if doctor_voucher==1, deg(1) gen(Dy_`out') at(xgrid) nodraw
|
61 |
+
mkmat Dy_`out' if xgrid!=., mat(q)
|
62 |
+
mat RD`out'= RD`out',q
|
63 |
+
}
|
64 |
+
di `k'
|
65 |
+
local ++k
|
66 |
+
}
|
67 |
+
|
68 |
+
* CALCULATE CONFIDENCE INTERVALS
|
69 |
+
local varlist "used_vouchers_admin treat_sev_simple_mal treat_severe_mal"
|
70 |
+
foreach out of local varlist {
|
71 |
+
foreach let in P D {
|
72 |
+
mat ul= R`let'`out'[.,2...]'
|
73 |
+
mat ll= ul
|
74 |
+
mat pe= ul
|
75 |
+
drop _all
|
76 |
+
svmat ul
|
77 |
+
svmat ll
|
78 |
+
svmat pe
|
79 |
+
collapse (p5) ll* (p95) ul* (sd) pe*
|
80 |
+
mkmat ll1-ll50, mat(ll2)
|
81 |
+
mkmat ul1-ul50, mat(ul2)
|
82 |
+
mkmat pe1-pe50, mat(pe)
|
83 |
+
mat ul2= ul2'
|
84 |
+
mat ll2= ll2'
|
85 |
+
mat pe= pe'
|
86 |
+
mat useme= R`let'`out'[1..50,1]
|
87 |
+
mat F`let'`out'= xgrid,useme,ul2,ll2,pe
|
88 |
+
}
|
89 |
+
|
90 |
+
* make the final graphs!
|
91 |
+
drop _all
|
92 |
+
if "`out'"=="used_vouchers_admin" local tit_`out' "Used Voucher"
|
93 |
+
if "`out'"=="treat_sev_simple_mal" local tit_`out' "Purchased Any Malaria Treatment"
|
94 |
+
if "`out'"=="treat_severe_mal" local tit_`out' "Purchased Severe Malaria Treatment"
|
95 |
+
foreach let in D P {
|
96 |
+
svmat F`let'`out'
|
97 |
+
g ul`let'= F`let'`out'2 + 1.645*F`let'`out'5
|
98 |
+
g ll`let'= F`let'`out'2 - 1.645*F`let'`out'5
|
99 |
+
}
|
100 |
+
|
101 |
+
* this version bootstraps the SEs
|
102 |
+
twoway line ulD llD FD`out'2 ulP llP FP`out'2 FD`out'1, lcol(black black black gs12 gs12 gs12) lpat(dot dot solid dot dot solid) ///
|
103 |
+
graphregion(color(white)) legend(order(3 6) label(3 "Doctor Voucher") label(6 "Patient Voucher") size(medium) row(1)) ///
|
104 |
+
ytit("Share Patients", size(medlarge)) ylab(0(.2).9) xtit("Predicted Malaria Risk", size(medlarge)) ///
|
105 |
+
tit("`tit_`out''", size(large)) name(`out', replace) ///
|
106 |
+
xline(`p25', lcol(gs12) lpat(dash)) xline(`p50', lcol(gs12) lpat(dash)) xline(`p75', lcol(gs12) lpat(dash))
|
107 |
+
|
108 |
+
}
|
109 |
+
|
110 |
+
|
111 |
+
* GRAPH
|
112 |
+
grc1leg used_vouchers_admin treat_sev_simple_mal treat_severe_mal, row(1) graphregion(color(white)) name(final, replace)
|
113 |
+
gr dis final, xsize(10) ysize(4)
|
114 |
+
|
115 |
+
graph export "$graphs/4_tmtXpredpos.pdf", replace
|
116 |
+
|
117 |
+
|
118 |
+
|
21/replication_package/Do_Files/Figures/5_graph_voucher_tmt.do
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
* STACKED BAR CHARTS
|
2 |
+
|
3 |
+
preserve
|
4 |
+
|
5 |
+
cap drop malgroup
|
6 |
+
|
7 |
+
local quant=4
|
8 |
+
xtile malgroup= pred_mal_pos, nq(`quant')
|
9 |
+
la define malgroup 1 "Q1" 2 "Q2" 3 "Q3" 4 "Q4"
|
10 |
+
la val malgroup malgroup
|
11 |
+
|
12 |
+
g treatgroup=1 if patient_voucher+doctor_voucher==0
|
13 |
+
replace treatgroup=2 if patient_voucher
|
14 |
+
replace treatgroup=3 if doctor_voucher
|
15 |
+
la define treatgroup 1 "Control" 2 "Patient Voucher" 3 "Doctor Voucher"
|
16 |
+
la val treatgroup treatgroup
|
17 |
+
|
18 |
+
* TREATMENT FOR SEVERE MALARIA
|
19 |
+
gr bar treat_severe_mal_NOvoucher treat_severe_mal_voucher , over(treatgroup, label(labsize(medlarge))) stack graphregion(color(white)) legend(label(1 "No Voucher Used") label(2 "Voucher Used") size(medium)) bar(1, color(gs9)) bar(2, color(gs12)) tit("B. Severe Malaria Treatment", size(medium)) ytit("Share Patients", size(medlarge)) graphregion(color(white)) name(PB, replace)
|
20 |
+
|
21 |
+
* TREATMENT FOR SIMPLE MALARIA
|
22 |
+
gr bar treat_simple_mal_NOvoucher treat_simple_mal_voucher , over(treatgroup, label(labsize(medlarge))) stack graphregion(color(white)) legend(label(1 "No Voucher Used") label(2 "Voucher Used") size(medium)) bar(1, color(gs9)) bar(2, color(gs12)) tit("A. Simple Malaria Treatment", size(medium)) ytit("Share Patients", size(medlarge)) graphregion(color(white)) name(PA, replace)
|
23 |
+
|
24 |
+
grc1leg PA PB, row(1) graphregion(color(white)) name(final, replace) ycommon
|
25 |
+
gr dis final, xsize(8) ysize(3)
|
26 |
+
|
27 |
+
// save output
|
28 |
+
graph export "$graphs/5_voucher_tmt.pdf", replace
|
29 |
+
|
30 |
+
restore
|
21/replication_package/Do_Files/Figures/B1_graph_misallocation.do
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
* Misallocation
|
2 |
+
|
3 |
+
la var RXexpected_mal_match_any "Overall Match"
|
4 |
+
la var expected_mal_match_any "Overall Match"
|
5 |
+
g RXexpected_mal_match_anyX= RXexpected_mal_match_any if RXmatch_treat_RDT!=.
|
6 |
+
g expected_mal_match_anyX= expected_mal_match_any if RXmatch_treat_RDT!=.
|
7 |
+
la var expected_mal_match_any_pos "Malaria Positive"
|
8 |
+
la var RXexpected_mal_match_any_pos "Malaria Positive"
|
9 |
+
la var expected_mal_match_any_neg "Malaria Negative"
|
10 |
+
la var RXexpected_mal_match_any_neg "Malaria Negative"
|
11 |
+
la var RXexpected_mal_match_anyX "Prescribed"
|
12 |
+
la var expected_mal_match_anyX "Purchased"
|
13 |
+
la var RXmatch_treat_RDT "Prescribed"
|
14 |
+
la var match_treat_RDT "Purchased"
|
15 |
+
|
16 |
+
g match_treat_RDT_pos= match_treat_RDT*RDTresult_POS
|
17 |
+
g match_treat_RDT_neg= match_treat_RDT*RDTresult_NEG
|
18 |
+
|
19 |
+
g testtype= reported_RDT + 2*reported_GE_FS
|
20 |
+
replace testtype=. if reported_Malaria_test==1 & testtype==0
|
21 |
+
la define testtype 0 "No Malaria Test" 1 "RDT Only" 2 "Microscope Only" 3 "RDT+Microscope"
|
22 |
+
la val testtype testtype
|
23 |
+
|
24 |
+
gr bar RDTresult_POS match_treat_RDT match_treat_RDT_pos match_treat_RDT_neg , over(testtype) ///
|
25 |
+
legend(label(1 "Positive Home Test") label(2 "Overall Match") label(3 "Match: Positive+Antimalarial") label(4 "Match: Negative+No Antimal.") size(small)) graphregion(color(white)) bar(1, color(gs0)) bar(2, color(gs5)) bar(3, color(gs10)) bar(4, color(gs14))
|
26 |
+
|
27 |
+
graph export "$graphs/B1_misallocation.pdf", replace
|
21/replication_package/Do_Files/Figures/B2_graph_dist_pred_pos.do
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
* DISTRIBUTION PREDICTED MALARIA RISK
|
2 |
+
|
3 |
+
_pctile pred_mal_pos, p(25 50 75)
|
4 |
+
local p25= r(r1)
|
5 |
+
local p50= r(r2)
|
6 |
+
local p75= r(r3)
|
7 |
+
|
8 |
+
twoway (kdensity pred_mal_pos if doctor_voucher+patient_voucher==0, lcol(black) lpat(dash)) (kdensity pred_mal_pos if doctor_voucher, lcol(gs10) lwid(medthick)) (kdensity pred_mal_pos if patient_voucher, lcol(gs5) lwid(medthick)), ///
|
9 |
+
legend(label(1 "No Voucher") label(2 "Patient Voucher") label(3 "Doctor Voucher") row(1) size(medsmall)) ytit("Density") xtit("Predicted Malaria Risk") graphregion(color(white)) ///
|
10 |
+
xline(`p25', lcol(gs13) lpat(dash)) xline(`p50', lcol(gs13) lpat(dash)) xline(`p75', lcol(gs13) lpat(dash))
|
11 |
+
|
12 |
+
graph export "$graphs/B2_dist_pred_pos.pdf", replace
|
13 |
+
|
21/replication_package/Do_Files/Figures/B3_graph_outcomeXpredpos_control_home.do
ADDED
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
preserve
|
2 |
+
|
3 |
+
// patterns in no voucher group only
|
4 |
+
keep if doctor_voucher + patient_voucher ==0
|
5 |
+
|
6 |
+
// no treatment (RX, taken)
|
7 |
+
g RXnone= 1 - RXtreat_sev_simple_mal
|
8 |
+
g none= 1 - treat_sev_simple_mal
|
9 |
+
|
10 |
+
// percentiles of predicted pos
|
11 |
+
g predicted_RDT_POS= pred_mal_pos
|
12 |
+
_pctile predicted_RDT_POS, p(2.5 97.5)
|
13 |
+
local bottom=r(r1)
|
14 |
+
local top=r(r2)
|
15 |
+
_pctile predicted_RDT_POS, p(25 50 75)
|
16 |
+
local p25= r(r1)
|
17 |
+
local p50= r(r2)
|
18 |
+
local p75= r(r3)
|
19 |
+
|
20 |
+
// make local linear graphs and trim tails
|
21 |
+
local varlist "RXnone RXtreat_simple_mal RXtreat_severe_mal none treat_simple_mal treat_severe_mal"
|
22 |
+
|
23 |
+
foreach out of local varlist{
|
24 |
+
local ytit "Local Average"
|
25 |
+
local tit: variable label `out'
|
26 |
+
|
27 |
+
* has home RDT
|
28 |
+
lpoly `out' predicted_RDT_POS if has_valid_rdt_H==1, deg(1) gen(Tx_`out' Ty_`out') se(Tse_`out') nodraw
|
29 |
+
replace Ty_`out'=. if Tx_`out'>`top' | Tx_`out'<`bottom'
|
30 |
+
replace Tx_`out'=. if Tx_`out'>`top' | Tx_`out'<`bottom'
|
31 |
+
g Tul_`out'= Ty_`out'+1.645*Tse_`out'
|
32 |
+
g Tll_`out'= Ty_`out'-1.645*Tse_`out'
|
33 |
+
|
34 |
+
* no home RDT
|
35 |
+
lpoly `out' predicted_RDT_POS if has_valid_rdt_H==0, deg(1) gen(NTx_`out' NTy_`out') se(NTse_`out') nodraw
|
36 |
+
replace NTy_`out'=. if NTx_`out'>`top' | NTx_`out'<`bottom'
|
37 |
+
replace NTx_`out'=. if NTx_`out'>`top' | NTx_`out'<`bottom'
|
38 |
+
g NTul_`out'= NTy_`out'+1.645*NTse_`out'
|
39 |
+
g NTll_`out'= NTy_`out'-1.645*NTse_`out'
|
40 |
+
|
41 |
+
}
|
42 |
+
|
43 |
+
|
44 |
+
// compile final graph panel by panel
|
45 |
+
|
46 |
+
foreach lead in "T" "NT" {
|
47 |
+
line `lead'y_RXnone `lead'y_none `lead'x_none, legend(label(1 "No Treat. Prescribed") label(2 "No Treat. Purchased") size(small) row(1)) xtit("Predicted Malaria Risk", size(medium)) ytit("Share Patients", size(medium)) ///
|
48 |
+
graphregion(color(white)) tit("A. No Malaria Treatment", size(medsmall)) lcol(black gs10) lwid(medthick medthick) lpat(solid longdash) name(`lead'PA, replace) ylab(0(.2).8) xline(`p25', lcol(gs7) lpat(dot)) xline(`p50', lcol(gs7) lpat(dot)) xline(`p75', lcol(gs7) lpat(dot)) nodraw
|
49 |
+
line `lead'y_RXtreat_simple_mal `lead'y_treat_simple_mal `lead'x_treat_simple_mal, legend(label(1 "Treatment Prescribed") label(2 "Treatment Purchased") size(small) row(1)) xtit("Predicted Malaria Risk", size(medium)) ytit("Share Patients", size(medium)) ///
|
50 |
+
graphregion(color(white)) tit("B. Simple Malaria Treatment", size(medsmall)) lcol(black gs10) lwid(medthick medthick) lpat(solid longdash) name(`lead'PB, replace) ylab(0(.2).8) xline(`p25', lcol(gs7) lpat(dot)) xline(`p50', lcol(gs7) lpat(dot)) xline(`p75', lcol(gs7) lpat(dot)) nodraw
|
51 |
+
line `lead'y_RXtreat_severe_mal `lead'y_treat_severe_mal `lead'x_treat_severe_mal, legend(label(1 "Treatment Prescribed") label(2 "Treatment Purchased") size(small) row(1)) xtit("Predicted Malaria Risk", size(medium)) ytit("Share Patients", size(medium)) ///
|
52 |
+
graphregion(color(white)) tit("C. Severe Malaria Treatment", size(medsmall)) lcol(black gs10) lwid(medthick medthick) lpat(solid longdash) name(`lead'PC, replace) ylab(0(.2).8) xline(`p25', lcol(gs7) lpat(dot)) xline(`p50', lcol(gs7) lpat(dot)) xline(`p75', lcol(gs7) lpat(dot)) nodraw
|
53 |
+
}
|
54 |
+
|
55 |
+
graph combine TPA TPB TPC, row(1) graphregion(color(white)) tit("Patients With Home RDT Test", size(medsmall)) name(test, replace) nodraw
|
56 |
+
graph combine NTPA NTPB NTPC, row(1) graphregion(color(white)) tit("Patients With No Home RDT Test", size(medsmall)) name(notest, replace) nodraw
|
57 |
+
|
58 |
+
gr combine test notest, row(3) xsize(10) ysize(5) graphregion(color(white))
|
59 |
+
|
60 |
+
// save output
|
61 |
+
graph export "$graphs/B3_outcomeXpredpos_control_home.pdf", replace
|
62 |
+
|
63 |
+
restore
|
21/replication_package/Do_Files/Figures/B4_graph_vouchersXbins.do
ADDED
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
preserve
|
2 |
+
|
3 |
+
collapse (mean) treat_scheduled, by( cscomnum date_morning_survey )
|
4 |
+
sort cscomnum date_morning_survey
|
5 |
+
by cscomnum: gen bins=_n
|
6 |
+
|
7 |
+
gen bin1=0
|
8 |
+
replace bin1=1 if bins==1 | bins==2
|
9 |
+
gen bin2=0
|
10 |
+
replace bin2=1 if bins==3 | bins==4
|
11 |
+
gen bin3=0
|
12 |
+
replace bin3=1 if bins==5 | bins==6
|
13 |
+
|
14 |
+
keep cscomnum date_morning_survey bin1 bin2 bin3 bins
|
15 |
+
sort cscomnum date_morning_survey
|
16 |
+
|
17 |
+
* Save this file for the merge
|
18 |
+
tempfile auxiliar
|
19 |
+
sa `auxiliar'
|
20 |
+
|
21 |
+
restore
|
22 |
+
|
23 |
+
sort cscomnum date_morning_survey
|
24 |
+
|
25 |
+
merge m:1 cscomnum date_morning_survey using `auxiliar'
|
26 |
+
|
27 |
+
assert _m==3
|
28 |
+
drop _m
|
29 |
+
|
30 |
+
* create variables that have the interaction dummies, say, called PV_day1, DV_day1, PV_day2, … etc.
|
31 |
+
forvalues i=1/3 {
|
32 |
+
|
33 |
+
gen PV_bin`i'=patient_voucher*bin`i'
|
34 |
+
gen DV_bin`i'=doctor_voucher*bin`i'
|
35 |
+
}
|
36 |
+
|
37 |
+
* generate a set of variables from PV: V_day1 = PV_day1, V_day2= PV_day2 etc.
|
38 |
+
forvalues i=1/3 {
|
39 |
+
|
40 |
+
rename PV_bin`i' V_bin`i'
|
41 |
+
|
42 |
+
}
|
43 |
+
|
44 |
+
foreach var in used_vouchers_admin RXtreat_sev_simple_mal RXtreat_severe_mal treat_severe_mal treat_sev_simple_mal {
|
45 |
+
|
46 |
+
pdslasso `var' DV_bin* V_bin* ($date $patient bin1 bin2), clu($cluvar) partial($date bin1 bin2 )
|
47 |
+
|
48 |
+
est sto PV`var'
|
49 |
+
}
|
50 |
+
|
51 |
+
forvalues i=1/3 {
|
52 |
+
|
53 |
+
rename V_bin`i' PV_bin`i'
|
54 |
+
|
55 |
+
}
|
56 |
+
*generate a set of variables this time from DV: V_day1 = DV_day1, V_day2= DV_day2 etc.
|
57 |
+
forvalues i=1/3 {
|
58 |
+
|
59 |
+
rename DV*bin`i' V_bin`i'
|
60 |
+
|
61 |
+
}
|
62 |
+
|
63 |
+
foreach var in used_vouchers_admin RXtreat_sev_simple_mal RXtreat_severe_mal treat_severe_mal treat_sev_simple_mal {
|
64 |
+
|
65 |
+
pdslasso `var' PV_bin* V_bin* ($date $patient bin1 bin2), clu($cluvar) partial($date bin1 bin2)
|
66 |
+
|
67 |
+
est sto DV`var'
|
68 |
+
}
|
69 |
+
drop V_bin*
|
70 |
+
|
71 |
+
coefplot (PVused_vouchers_admin, keep(V_bin* ) label(Patient Voucher) lpat(solid) lcol(black) lwid(medthick)) (DVused_vouchers_admin, keep(V_bin*) label(Doctor Voucher) lpat(longdash) lcol(gs10) lwid(medthick)) ///
|
72 |
+
, vertical legend(size(small)) graphregion(color(white)) xtit("Clinic Observation Day", size(small)) ///
|
73 |
+
title("A. Used Vouchers", size(small)) recast(line) ///
|
74 |
+
name(PE, replace) xlab(1 "1-2" 2 "3-4" 3 "5-6", labsize(small)) scheme(s2mono)
|
75 |
+
|
76 |
+
coefplot (PVRXtreat_sev_simple_mal, keep(V_bin* ) label(Patient Voucher) lpat(solid) lcol(black) lwid(medthick)) (DVRXtreat_sev_simple_mal, keep(V_bin*) label(Doctor Voucher) lpat(longdash) lcol(gs10) lwid(medthick)) ///
|
77 |
+
, vertical legend(size(small)) graphregion(color(white)) xtit("Clinic Observation Day", size(small)) ///
|
78 |
+
title("B. Prescribed Any Malaria Treatment", size(small)) recast(line) ///
|
79 |
+
name(PA, replace) xlab(1 "1-2" 2 "3-4" 3 "5-6", labsize(small)) scheme(s2mono)
|
80 |
+
|
81 |
+
coefplot (PVtreat_sev_simple_mal, keep(V_bin* ) label(Patient Voucher) lpat(solid) lcol(black) lwid(medthick)) (DVtreat_sev_simple_mal, keep(V_bin*) label(Doctor Voucher) lpat(longdash) lcol(gs10) lwid(medthick)) ///
|
82 |
+
, vertical legend(size(small)) graphregion(color(white)) xtit("Clinic Observation Day", size(small)) ///
|
83 |
+
title("C. Purchased Any Malaria Treatment", size(small)) recast(line) ///
|
84 |
+
name(PB, replace) xlab(1 "1-2" 2 "3-4" 3 "5-6", labsize(small)) scheme(s2mono)
|
85 |
+
|
86 |
+
coefplot (PVRXtreat_severe_mal, keep(V_bin* ) label(Patient Voucher) lpat(solid) lcol(black) lwid(medthick)) (DVRXtreat_severe_mal, keep(V_bin*) label(Doctor Voucher) lpat(longdash) lcol(gs10) lwid(medthick)) ///
|
87 |
+
, vertical legend(size(small)) graphregion(color(white)) xtit("Clinic Observation Day", size(small)) ///
|
88 |
+
title("D. Prescribed Severe Malaria Treatment", size(small)) recast(line) ///
|
89 |
+
name(PC, replace) xlab(1 "1-2" 2 "3-4" 3 "5-6", labsize(small)) scheme(s2mono)
|
90 |
+
|
91 |
+
coefplot (PVtreat_severe_mal, keep(V_bin* ) label(Patient Voucher) lpat(solid) lcol(black) lwid(medthick)) (DVtreat_severe_mal, keep(V_bin*) label(Doctor Voucher) lpat(longdash) lcol(gs10) lwid(medthick)) ///
|
92 |
+
, vertical legend(size(small)) graphregion(color(white)) xtit("Clinic Observation Day", size(small)) ///
|
93 |
+
title("E. Purchased Severe Malaria Treatment", size(small)) recast(line) ///
|
94 |
+
name(PD, replace) xlab(1 "1-2" 2 "3-4" 3 "5-6", labsize(small)) scheme(s2mono)
|
95 |
+
|
96 |
+
grc1leg PE PA PB PC PD , row(3) graphregion(color(white)) name(final, replace) //xsize(9) ysize(13)
|
97 |
+
gr dis final, xsize(9) ysize(13)
|
98 |
+
|
99 |
+
|
100 |
+
graph export "$graphs/B4_vouchersXbins.pdf", replace
|
101 |
+
|
21/replication_package/Do_Files/LSS_master_data_analysis.do
ADDED
@@ -0,0 +1,531 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*------------------------------------------------------------------------------
|
2 |
+
********************************************************************************
|
3 |
+
* Lopez, Sautmann, Schaner; AEJ Applied
|
4 |
+
********************************************************************************
|
5 |
+
|
6 |
+
** Analysis file creating tables and data based figures in the paper.
|
7 |
+
** This version: January, 2021
|
8 |
+
|
9 |
+
------------------------------------------------------------------------------*/
|
10 |
+
|
11 |
+
clear all
|
12 |
+
set more off
|
13 |
+
set matsize 5000
|
14 |
+
version 13.1
|
15 |
+
cap graph set window fontface Times-Roman
|
16 |
+
|
17 |
+
|
18 |
+
********************************************************************************
|
19 |
+
* Users: Change this section the first time.
|
20 |
+
*------------------------------------------
|
21 |
+
* Define paths:
|
22 |
+
*------------
|
23 |
+
|
24 |
+
* global path "../Lopez_Sautmann_Schaner_2020" // use ../ for relative path.
|
25 |
+
|
26 |
+
global data_final= "$path/Data"
|
27 |
+
global dofiles_fig = "$path/Do_Files/Figures"
|
28 |
+
global dofiles_tab = "$path/Do_Files/Tables"
|
29 |
+
global dofiles_admin = "$path/Do_Files/Stata admin files"
|
30 |
+
global tables = "$path/Tables"
|
31 |
+
global graphs = "$path/Figures"
|
32 |
+
|
33 |
+
global prehead1 "\begin{tabular}{l*{"
|
34 |
+
global prehead2 "}{c}} \hline\hline"
|
35 |
+
|
36 |
+
* data set names
|
37 |
+
*---------------
|
38 |
+
global patientdata "LSS_analysis_datasets_20201108.dta"
|
39 |
+
global censusdata "LSS_CSComCensus.dta"
|
40 |
+
global doctorendline "LSS_DoctorEndlineInterview.dta"
|
41 |
+
|
42 |
+
* SETUP PROGRAM THAT INSTALLS ALL STATA PACKAGES
|
43 |
+
include "$dofiles_admin/LSS_config_stata.do"
|
44 |
+
|
45 |
+
*************************************************************************************************
|
46 |
+
* LOAD TABLES
|
47 |
+
*************************************************************************************************
|
48 |
+
include "$dofiles_admin/LSS_TablePrograms.do"
|
49 |
+
|
50 |
+
* ADDITIONAL CONTROLS + CLUSTERING LEVEL
|
51 |
+
* date controls
|
52 |
+
global date "DD1-DD35"
|
53 |
+
global clinic "CL1-CL59"
|
54 |
+
global patient "CC*"
|
55 |
+
global cluvar "cscomnum"
|
56 |
+
global clulevel "clinic"
|
57 |
+
|
58 |
+
#delimit ;
|
59 |
+
global footnote0 "\emph{Notes}: Robust standard errors clustered at the $clulevel level in parentheses.
|
60 |
+
All regressions control for clinic visit date fixed effects. We use double selection
|
61 |
+
lasso to choose additional controls. Eligible controls include clinic dummies, symptom dummies, duration of illness
|
62 |
+
(topcoded at the 99th percentile) and its square, patient age and its square, a dummy for patients under 5, patient gender,
|
63 |
+
a dummy to identify pregnant patients, a dummy to identify whether the patient (versus a caregiver) answered the survey, the gender of the survey
|
64 |
+
respondent, an ethnicity (Bambara) dummy, a dummy for French speaking respondents, a dummy for literate
|
65 |
+
respondents, a dummy for respondents with a primary education or less, a dummy to identify patients in the home-based
|
66 |
+
follow up survey, and pairwise interactions between all previously-listed patient and respondent controls. Missing values are recoded to the sample
|
67 |
+
mean and separately dummied out. These missing dummies are also used to construct pairwise interactions.";
|
68 |
+
global footnoteb "\emph{Notes}: Robust standard errors clustered at the $clulevel level in parentheses.
|
69 |
+
All regressions control for clinic visit date fixed effects. We use double selection
|
70 |
+
lasso to choose additional controls. See notes to Table 3 for a list of potential controls.";
|
71 |
+
global footnote0_nl "\emph{Notes}: Robust standard errors clustered at the $clulevel level in parentheses. All regressions control for clinic visit date fixed effects.";
|
72 |
+
global footnote0_nl_new "\emph{Notes}: Robust standard errors clustered at the $clulevel level in parentheses.
|
73 |
+
All regressions control for clinic visit date fixed effects. Controls include number of symptoms, symptom dummies,
|
74 |
+
duration of illness (topcoded at the 99th percentile), patient age, a dummy for patients under 5, patient gender,
|
75 |
+
dummy to identify pregnant patients, a dummy to identify whether the patient (versus a caregiver) answered the survey,
|
76 |
+
the gender of the survey respondent, an ethnicity (Bambara) dummy, a dummy for French speaking respondents, a dummy for literate
|
77 |
+
respondents, a dummy for respondents with a primary education or less. Missing values are recoded to the sample mean.";
|
78 |
+
|
79 |
+
#delimit cr
|
80 |
+
global footnote0_alt "\emph{Notes}: Robust standard errors clustered at the $clulevel level in parentheses. All regressions include clinic visit date fixed effects."
|
81 |
+
|
82 |
+
global footnote1 "*, **, and *** denote statistical significance at the 10, 5, and 1 percent levels respectively."
|
83 |
+
|
84 |
+
|
85 |
+
*************************************************************************************************
|
86 |
+
/**** NOTE: the creation of the bootstrap files can take several hours. Uncomment line 87 below to start the bootstrap sampling. */
|
87 |
+
include "$dofiles_admin/LSS_make_bootstrap_repsets.do"
|
88 |
+
|
89 |
+
*************************************************************************************************
|
90 |
+
* FIGURES
|
91 |
+
*************************************************************************************************
|
92 |
+
|
93 |
+
* FIGURE 3: TREATMENT OUTCOMES BY MALARIA RISK, CONTROL GROUP
|
94 |
+
* --------------------------------------------------------------------------------
|
95 |
+
use "$data_final/$patientdata", clear
|
96 |
+
drop if dropme==1
|
97 |
+
|
98 |
+
do "$dofiles_fig/3_graph_outcomeXpredpos_control.do"
|
99 |
+
|
100 |
+
* FIGURE 4: TREATMENT OUTCOMES BY MALARIA RISK AND VOUCHER GROUP
|
101 |
+
* --------------------------------------------------------------------------------
|
102 |
+
use "$data_final/$patientdata", clear
|
103 |
+
drop if dropme==1
|
104 |
+
|
105 |
+
do "$dofiles_fig/4_graph_tmtXpredpos.do"
|
106 |
+
|
107 |
+
* FIGURE 5: VOUCHERS AND MALARIA TREATMENT
|
108 |
+
* --------------------------------------------------------------------------------
|
109 |
+
use "$data_final/$patientdata", clear
|
110 |
+
drop if dropme==1
|
111 |
+
|
112 |
+
do "$dofiles_fig/5_graph_voucher_tmt.do"
|
113 |
+
|
114 |
+
|
115 |
+
***************************************************************************************
|
116 |
+
* APPENDIX B FIGURES
|
117 |
+
***************************************************************************************
|
118 |
+
|
119 |
+
* FIGURE B1: MISALLOCATION
|
120 |
+
* --------------------------------------------------------------------------------
|
121 |
+
use "$data_final/$patientdata", clear
|
122 |
+
drop if dropme==1
|
123 |
+
|
124 |
+
do "$dofiles_fig/B1_graph_misallocation.do"
|
125 |
+
|
126 |
+
* FIGURE B2: DISTRIBUTION PREDICTED MALARIA
|
127 |
+
* --------------------------------------------------------------------------------
|
128 |
+
use "$data_final/$patientdata", clear
|
129 |
+
drop if dropme==1
|
130 |
+
|
131 |
+
do "$dofiles_fig/B2_graph_dist_pred_pos.do"
|
132 |
+
|
133 |
+
* Figure B3: TREATMENT OUTCOMES BY MALARIA RISK, CONTROL GROUP by HOME TEST STATUS
|
134 |
+
* --------------------------------------------------------------------------------
|
135 |
+
use "$data_final/$patientdata", clear
|
136 |
+
drop if dropme==1
|
137 |
+
|
138 |
+
do "$dofiles_fig/B3_graph_outcomeXpredpos_control_home.do"
|
139 |
+
|
140 |
+
* FIGURE B4: OVERALL IMPACTS ON TREATMENT OUTCOMES -- By bins
|
141 |
+
* --------------------------------------------------------------------------------
|
142 |
+
use "$data_final/$patientdata", clear
|
143 |
+
drop if dropme==1
|
144 |
+
|
145 |
+
do "$dofiles_fig/B4_graph_vouchersXbins.do"
|
146 |
+
|
147 |
+
|
148 |
+
|
149 |
+
**********************************************************************************
|
150 |
+
* MAIN TABLES
|
151 |
+
**********************************************************************************
|
152 |
+
|
153 |
+
|
154 |
+
* TABLE 1: CONTROL GROUP TABLE
|
155 |
+
* --------------------------------------------------------------------------------
|
156 |
+
use "$data_final/$patientdata", clear
|
157 |
+
drop if dropme==1
|
158 |
+
|
159 |
+
include "$dofiles_tab/1_table_control_group.do"
|
160 |
+
|
161 |
+
* TABLE 2: BALANCE TABLE
|
162 |
+
* --------------------------------------------------------------------------------
|
163 |
+
use "$data_final/$patientdata", clear
|
164 |
+
|
165 |
+
la var under5 "Under 5 Years Old"
|
166 |
+
|
167 |
+
* VARS IN TABLE
|
168 |
+
* 0. sample frame
|
169 |
+
global varlist0 "nobs"
|
170 |
+
* 1. patient chars
|
171 |
+
global varlist1 "num_symptoms symptomsscreening_1 symptomsscreening_2 symptomsscreening_3 symptomsscreening_4 symptomsscreening_5 symptomsscreening_6 symptomsscreening_7 daysillness99 agepatient under5 genderpatient pregnancy RDTresult_POS pred_mal_pos"
|
172 |
+
* 2. respondent / HH chars
|
173 |
+
global varlist2 "respondent gender ethnic_bambara speak_french readwrite_fluent_french prischoolorless total_hh_members_H HH_frac_14 HH_frac_job income_percap_H rent_value_H HH_frac_nets"
|
174 |
+
|
175 |
+
include "$dofiles_tab/2_table_balance.do"
|
176 |
+
|
177 |
+
|
178 |
+
* TABLE 3: OVERALL IMPACTS ON TREATMENT OUTCOMES
|
179 |
+
* --------------------------------------------------------------------------------
|
180 |
+
use "$data_final/$patientdata", clear
|
181 |
+
drop if dropme==1
|
182 |
+
g RXnone= 1 - RXtreat_sev_simple_mal
|
183 |
+
g none= 1 - treat_sev_simple_mal
|
184 |
+
la var RXnone "Prescribed"
|
185 |
+
la var none "Purchased"
|
186 |
+
la var RXtreat_sev_simple_mal "Prescribed"
|
187 |
+
la var treat_sev_simple_mal "Purchased"
|
188 |
+
la var used_vouchers_admin "Used Voucher"
|
189 |
+
la var RXtreat_severe_mal "Prescribed"
|
190 |
+
la var treat_severe_mal "Purchased"
|
191 |
+
|
192 |
+
docpat_theory_lso used_vouchers_admin RXtreat_sev_simple_mal treat_sev_simple_mal RXtreat_severe_mal treat_severe_mal, type(tex) ///
|
193 |
+
table("$tables/3_mal_tmt_overall_new_lso.tex") footnote($footnote0 GC, PD, and DD indicate tests of gatekeeping costs, patient-driven, and doctor-driven demand respectively. $footnote1) testof("GC PD PD DD DD") signifevidence("Yes Yes Yes No No") ///
|
194 |
+
prehead1($prehead1) title("Impacts on Malaria Treatment Outcomes") lab(mal_tmt_overall_new) ///
|
195 |
+
prehead2($prehead2) widc(0.12\linewidth) texwid(.95) cluvar($cluvar) partial($date) lcont($date $clinic $patient) ///
|
196 |
+
extrahead(\\ & & \multicolumn{2}{c}{Any Malaria Treatment} & \multicolumn{2}{c}{Severe Malaria Treatment} \\ \cmidrule(lr){3-4} \cmidrule(lr){5-6})
|
197 |
+
|
198 |
+
* TABLE 4: HET IMPACTS ON TREATMENT OUTCOMES
|
199 |
+
* --------------------------------------------------------------------------------
|
200 |
+
use "$data_final/$patientdata", clear
|
201 |
+
|
202 |
+
cap prog drop dome
|
203 |
+
prog define dome
|
204 |
+
drop if dropme==1
|
205 |
+
la var used_vouchers_admin "Used Voucher"
|
206 |
+
la var RXtreat_severe_mal "Prescribed"
|
207 |
+
la var treat_severe_mal "Purchased"
|
208 |
+
la var RXtreat_sev_simple_mal "Prescribed"
|
209 |
+
la var treat_sev_simple_mal "Purchased"
|
210 |
+
end
|
211 |
+
|
212 |
+
dome
|
213 |
+
|
214 |
+
docpat_hettable_theory_lso used_vouchers_admin RXtreat_sev_simple_mal treat_sev_simple_mal RXtreat_severe_mal treat_severe_mal, type(tex) ///
|
215 |
+
table("$tables/4_mal_tmt_het_new_lso.tex") footnote($footnoteb Standard errors are based on 1,000 bootstrap replications, with re-sampling at the clinic level. Predicted malaria risk is re-calculated on each bootstrap replication. GC, PD, and DD indicate tests of gatekeeping costs, patient-driven, and doctor-driven demand respectively. $footnote1) ///
|
216 |
+
prehead1($prehead1) title("Impacts on Malaria Treatment Outcomes - Heterogeneity by Predicted Malaria Risk") lab(mal_tmt_het_new) partial($date) ///
|
217 |
+
prehead2($prehead2) widc(0.12\linewidth) texwid(1) cluvar($cluvar) testofh("GC/DD -- -- DD DD") signifevidenceh("No -- -- No No") testofl("GC/PD PD PD -- --") signifevidencel("Yes Yes Yes -- --") ///
|
218 |
+
extrahead(\\ & & \multicolumn{2}{c}{Any Malaria Treatment} & \multicolumn{2}{c}{Severe Malaria Treatment} \\ \cmidrule(lr){3-4} \cmidrule(lr){5-6}) ///
|
219 |
+
path("$data_final/_bootstrap") setname("bs_cluCSCOM_") dodo(dome) numreps(1000) lcont($date $clinic $patient)
|
220 |
+
|
221 |
+
|
222 |
+
* TABLE 5: IMPACTS ON MATCH - TREATMENT AND ILLNESS
|
223 |
+
* --------------------------------------------------------------------------------
|
224 |
+
use "$data_final/$patientdata", clear
|
225 |
+
drop if dropme==1
|
226 |
+
|
227 |
+
la var RXexpected_mal_match_any "Overall Match"
|
228 |
+
la var expected_mal_match_any "Overall Match"
|
229 |
+
g RXexpected_mal_match_anyX= RXexpected_mal_match_any if RXmatch_treat_RDT!=.
|
230 |
+
g expected_mal_match_anyX= expected_mal_match_any if RXmatch_treat_RDT!=.
|
231 |
+
la var expected_mal_match_any_pos "Malaria Positive"
|
232 |
+
la var RXexpected_mal_match_any_pos "Malaria Positive"
|
233 |
+
la var expected_mal_match_any_neg "Malaria Negative"
|
234 |
+
la var RXexpected_mal_match_any_neg "Malaria Negative"
|
235 |
+
la var RXexpected_mal_match_anyX "Prescribed"
|
236 |
+
la var expected_mal_match_anyX "Purchased"
|
237 |
+
la var RXmatch_treat_RDT "Prescribed"
|
238 |
+
la var match_treat_RDT "Purchased"
|
239 |
+
|
240 |
+
* this table decomposes expected match into E(antimal to malaria+) and E(no antimal to malaria-)
|
241 |
+
docpat_p1_lso RXexpected_mal_match_any_pos RXexpected_mal_match_any_neg RXexpected_mal_match_any expected_mal_match_any_pos expected_mal_match_any_neg expected_mal_match_any, type(tex) ///
|
242 |
+
table("$tables/5_expected_match_decomp_lso.tex") footnote($footnoteb The expected match for malaria positive is equal to predicted malaria risk times the relevant malaria treatment/purchase dummy. The expected match for malaria negative is equal to one minus predicted malaria risk times one minus the malaria prescription/purchase dummy. The overall expected match is the sum of these two variables. $footnote1) ///
|
243 |
+
prehead1($prehead1) title("Impacts on Match Between Treatment and Illness") lab(expected_match_decomp) ///
|
244 |
+
prehead2($prehead2) widc(0.1\linewidth) texwid(1.25) cluvar($cluvar) partial($date) lcont($date $clinic $patient) ///
|
245 |
+
extrahead(\\ & \multicolumn{3}{c}{Expected Match: Prescribed} & \multicolumn{3}{c}{Expected Match: Purchased} \\ \cmidrule(lr){2-4} \cmidrule(lr){5-7})
|
246 |
+
|
247 |
+
|
248 |
+
**********************************************************************************
|
249 |
+
* APPENDIX TABLES
|
250 |
+
**********************************************************************************
|
251 |
+
|
252 |
+
* TABLE B1: Clinics' characteristics
|
253 |
+
* --------------------------------------------------------------------------------
|
254 |
+
use "$data_final/$censusdata", clear
|
255 |
+
|
256 |
+
do "$dofiles_tab/B1_table_clinic_census.do"
|
257 |
+
|
258 |
+
* TABLE B2: HEALTH WORKERS BELIEFS
|
259 |
+
* --------------------------------------------------------------------------------
|
260 |
+
use "$data_final/$doctorendline", clear
|
261 |
+
|
262 |
+
do "$dofiles_tab/B2_table_means_doctor.do"
|
263 |
+
|
264 |
+
* TABLE B3: IMPACT OF PATIENT INFORMATION TREATMENT ON MALARIA TREATMENT
|
265 |
+
* --------------------------------------------------------------------------------
|
266 |
+
use "$data_final/$patientdata", clear
|
267 |
+
drop if dropme==1
|
268 |
+
la var RXtreat_sev_simple_mal "Prescribed"
|
269 |
+
la var treat_sev_simple_mal "Purchased"
|
270 |
+
la var RXtreat_severe_mal "Prescribed"
|
271 |
+
la var treat_severe_mal "Purchased"
|
272 |
+
|
273 |
+
gen doctor_voucher_x_patient_info=doctor_voucher*patient_info
|
274 |
+
gen patient_voucher_x_patient_info=patient_voucher*patient_info
|
275 |
+
|
276 |
+
docpat_pat_lso RXtreat_sev_simple_mal treat_sev_simple_mal RXtreat_severe_mal treat_severe_mal, type(tex) ///
|
277 |
+
table("$tables/B3_mal_tmt_pat_info_lso.tex") footnote($footnoteb $footnote1) ///
|
278 |
+
prehead1($prehead1) title("Impacts of Patient Information on Malaria Treatment Outcomes") lab(mal_tmt_pat_info_lso) ///
|
279 |
+
prehead2($prehead2) widc(0.12\linewidth) texwid(0.8) cluvar($cluvar) ///
|
280 |
+
extrahead(\\ & \multicolumn{2}{c}{Any Malaria Treatment} & \multicolumn{2}{c}{Severe Malaria Treatment} \\ \cmidrule(lr){2-3} \cmidrule(lr){4-5}) ///
|
281 |
+
partial($date) lcont($date $clinic $patient)
|
282 |
+
|
283 |
+
* TABLE B4: IMPACT OF DOCTOR INFORMATION TREATMENT ON MALARIA TREATMENT
|
284 |
+
* --------------------------------------------------------------------------------
|
285 |
+
use "$data_final/$patientdata", clear
|
286 |
+
drop if dropme==1
|
287 |
+
la var RXtreat_sev_simple_mal "Prescribed"
|
288 |
+
la var treat_sev_simple_mal "Purchased"
|
289 |
+
la var RXtreat_severe_mal "Prescribed"
|
290 |
+
la var treat_severe_mal "Purchased"
|
291 |
+
|
292 |
+
docpat_doc_lso RXtreat_sev_simple_mal treat_sev_simple_mal RXtreat_severe_mal treat_severe_mal, type(tex) ///
|
293 |
+
table("$tables/B4_mal_tmt_doc_info_lso.tex") footnote($footnoteb $footnote1) ///
|
294 |
+
prehead1($prehead1) title("Impacts of Doctor Information on Malaria Treatment Outcomes") lab(mal_tmt_doc_info_lso) ///
|
295 |
+
prehead2($prehead2) widc(0.1\linewidth) texwid(.8) cluvar($cluvar) ///
|
296 |
+
extrahead(\\ & \multicolumn{2}{c}{Any Malaria Treatment} & \multicolumn{2}{c}{Severe Malaria Treatment} \\ \cmidrule(lr){2-3} \cmidrule(lr){4-5}) ///
|
297 |
+
partial($date) lcont($date $clinic $patient)
|
298 |
+
|
299 |
+
* TABLE B5: SELECTION INTO SAMPLE TABLE
|
300 |
+
* --------------------------------------------------------------------------------
|
301 |
+
use "$data_final/$patientdata", clear
|
302 |
+
la var has_valid_rdt_H "Has Valid RDT (Home Survey)"
|
303 |
+
* VARS IN TABLE
|
304 |
+
* 0. sample frame
|
305 |
+
global varlist0 "nobs in_home_survey has_valid_rdt_H"
|
306 |
+
* 1. patient chars
|
307 |
+
global varlist1 "num_symptoms symptomsscreening_1 symptomsscreening_2 symptomsscreening_3 symptomsscreening_4 symptomsscreening_5 symptomsscreening_6 symptomsscreening_7 daysillness99 agepatient under5 genderpatient pregnancy RDTresult_POS pred_mal_pos"
|
308 |
+
* 2. respondent / HH chars
|
309 |
+
global varlist2 "respondent gender ethnic_bambara speak_french readwrite_fluent_french prischoolorless total_hh_members_H HH_frac_14 HH_frac_job income_percap_H rent_value_H HH_frac_nets"
|
310 |
+
|
311 |
+
include "$dofiles_tab/B5_table_selection.do"
|
312 |
+
|
313 |
+
* TABLE B6: DIFFERENCE BETWEEN CONSENTERS AND NON-CONSENTERS FOR RDT
|
314 |
+
* --------------------------------------------------------------------------------
|
315 |
+
use "$data_final/$patientdata", clear
|
316 |
+
drop if dropme==1
|
317 |
+
|
318 |
+
do "$dofiles_tab/B6_table_diff_test_consent.do"
|
319 |
+
|
320 |
+
* TABLE B7: PREDICTED MALARIA POSITIVITY
|
321 |
+
* --------------------------------------------------------------------------------
|
322 |
+
use "$data_final/$patientdata", clear
|
323 |
+
drop if dropme==1
|
324 |
+
|
325 |
+
do "$dofiles_tab/B7_table_mal_prob_probit.do"
|
326 |
+
|
327 |
+
* TABLE B8: OVERALL IMPACTS ON TREATMENT OUTCOMES -- no controls
|
328 |
+
* --------------------------------------------------------------------------------
|
329 |
+
use "$data_final/$patientdata", clear
|
330 |
+
drop if dropme==1
|
331 |
+
|
332 |
+
la var RXtreat_sev_simple_mal "Prescribed"
|
333 |
+
la var treat_sev_simple_mal "Purchased"
|
334 |
+
la var used_vouchers_admin "Used Voucher"
|
335 |
+
la var RXtreat_severe_mal "Prescribed"
|
336 |
+
la var treat_severe_mal "Purchased"
|
337 |
+
|
338 |
+
docpat_p1_theory used_vouchers_admin RXtreat_sev_simple_mal treat_sev_simple_mal RXtreat_severe_mal treat_severe_mal, extra($date) type(tex) ///
|
339 |
+
table("$tables/B8_mal_tmt_overall_nc.tex") footnote($footnote0_nl GC, PD, and DD indicate tests of gatekeeping costs, patient-driven, and doctor-driven demand respectively. $footnote1) testof("GC PD PD DD DD") signifevidence("Yes Yes Yes No No") ///
|
340 |
+
prehead1($prehead1) title("Impacts on Malaria Treatment Outcomes, No Additional Controls") lab(mal_tmt_overall_new_nc) ///
|
341 |
+
prehead2($prehead2) widc(0.12\linewidth) texwid(.8) cluvar($cluvar) ///
|
342 |
+
extrahead(\\ & & \multicolumn{2}{c}{Any Malaria Treatment} & \multicolumn{2}{c}{Severe Malaria Treatment} \\ \cmidrule(lr){3-4} \cmidrule(lr){5-6})
|
343 |
+
|
344 |
+
* TABLE B9: HET IMPACTS ON TREATMENT OUTCOMES -- no controls
|
345 |
+
* --------------------------------------------------------------------------------
|
346 |
+
use "$data_final/$patientdata", clear
|
347 |
+
|
348 |
+
cap prog drop dome
|
349 |
+
prog define dome
|
350 |
+
drop if dropme==1
|
351 |
+
la var used_vouchers_admin "Used Voucher"
|
352 |
+
la var RXtreat_severe_mal "Prescribed"
|
353 |
+
la var treat_severe_mal "Purchased"
|
354 |
+
la var RXtreat_sev_simple_mal "Prescribed"
|
355 |
+
la var treat_sev_simple_mal "Purchased"
|
356 |
+
end
|
357 |
+
|
358 |
+
dome
|
359 |
+
|
360 |
+
docpat_hettable_theory used_vouchers_admin RXtreat_sev_simple_mal treat_sev_simple_mal RXtreat_severe_mal treat_severe_mal, extrac($date) type(tex) ///
|
361 |
+
table("$tables/B9_mal_tmt_het_nc.tex") footnote($footnote0_nl Standard errors based GC, PD, and DD indicate tests of gatekeeping costs, patient-driven, and doctor-driven demand respectively. $footnote1) ///
|
362 |
+
prehead1($prehead1) title("Impacts on Malaria Treatment Outcomes - Heterogeneity by Predicted Malaria Risk, No Additional Controls") lab(mal_tmt_het_new_nc) ///
|
363 |
+
prehead2($prehead2) widc(0.12\linewidth) texwid(.8) cluvar($cluvar) testofh("GC/DD -- -- DD DD") signifevidenceh("No -- -- No No") testofl("GC/PD PD PD -- --") signifevidencel("Yes Yes Yes -- --") ///
|
364 |
+
extrahead(\\ & & \multicolumn{2}{c}{Any Malaria Treatment} & \multicolumn{2}{c}{Severe Malaria Treatment} \\ \cmidrule(lr){3-4} \cmidrule(lr){5-6}) ///
|
365 |
+
path("$data_final/_bootstrap") setname("bs_cluCSCOM_") dodo(dome) numreps(1000)
|
366 |
+
|
367 |
+
|
368 |
+
|
369 |
+
|
370 |
+
* TABLE B10: OVERALL IMPACTS ON TREATMENT OUTCOMES -- NO LASSO
|
371 |
+
* --------------------------------------------------------------------------------
|
372 |
+
use "$data_final/$patientdata", clear
|
373 |
+
drop if dropme==1
|
374 |
+
|
375 |
+
sum pregnancy
|
376 |
+
replace pregnancy=r(mean) if pregnancy==.
|
377 |
+
sum ethnic_bambara
|
378 |
+
replace ethnic_bambara=r(mean) if ethnic_bambara==.
|
379 |
+
global mycont0 "date_1-date_35"
|
380 |
+
global covariates "num_symptoms symptomsscreening_1 symptomsscreening_2 symptomsscreening_3 symptomsscreening_4 symptomsscreening_5 symptomsscreening_6 daysillness99 agepatient under5 genderpatient pregnancy MSSpregnancy respondent gender ethnic_bambara MSSethnic_bambara speak_french readwrite_fluent_french prischoolorless"
|
381 |
+
global mycont "$mycont0 $covariates"
|
382 |
+
|
383 |
+
la var RXtreat_sev_simple_mal "Prescribed"
|
384 |
+
la var treat_sev_simple_mal "Purchased"
|
385 |
+
la var used_vouchers_admin "Used Voucher"
|
386 |
+
la var RXtreat_severe_mal "Prescribed"
|
387 |
+
la var treat_severe_mal "Purchased"
|
388 |
+
|
389 |
+
docpat_p1_theory used_vouchers_admin RXtreat_sev_simple_mal treat_sev_simple_mal RXtreat_severe_mal treat_severe_mal, extra($mycont) type(tex) ///
|
390 |
+
table("$tables/B10_mal_tmt_overall_nl.tex") footnote($footnote0_nl_new GC, PD, and DD indicate tests of gatekeeping costs, patient-driven, and doctor-driven demand respectively. $footnote1) testof("GC PD PD DD DD") signifevidence("Yes Yes Yes No No") ///
|
391 |
+
prehead1($prehead1) title("Impacts on Malaria Treatment Outcomes") lab(mal_tmt_overall_nl) ///
|
392 |
+
prehead2($prehead2) widc(0.12\linewidth) texwid(.8) cluvar($cluvar) ///
|
393 |
+
extrahead(\\ & & \multicolumn{2}{c}{Any Malaria Treatment} & \multicolumn{2}{c}{Severe Malaria Treatment} \\ \cmidrule(lr){3-4} \cmidrule(lr){5-6})
|
394 |
+
|
395 |
+
* TABLE B11: HET IMPACTS ON TREATMENT OUTCOMES -- NO LASSO
|
396 |
+
* --------------------------------------------------------------------------------
|
397 |
+
use "$data_final/$patientdata", clear
|
398 |
+
|
399 |
+
cap prog drop dome
|
400 |
+
prog define dome
|
401 |
+
drop if dropme==1
|
402 |
+
la var used_vouchers_admin "Used Voucher"
|
403 |
+
la var RXtreat_severe_mal "Prescribed"
|
404 |
+
la var treat_severe_mal "Purchased"
|
405 |
+
la var RXtreat_sev_simple_mal "Prescribed"
|
406 |
+
la var treat_sev_simple_mal "Purchased"
|
407 |
+
|
408 |
+
sum pregnancy
|
409 |
+
replace pregnancy=r(mean) if pregnancy==.
|
410 |
+
sum ethnic_bambara
|
411 |
+
replace ethnic_bambara=r(mean) if ethnic_bambara==.
|
412 |
+
end
|
413 |
+
|
414 |
+
dome
|
415 |
+
|
416 |
+
global covariates "num_symptoms symptomsscreening_1 symptomsscreening_2 symptomsscreening_3 symptomsscreening_4 symptomsscreening_5 symptomsscreening_6 daysillness99 agepatient under5 genderpatient pregnancy MSSpregnancy respondent gender ethnic_bambara MSSethnic_bambara speak_french readwrite_fluent_french prischoolorless"
|
417 |
+
global mycont "$mycont0 $covariates"
|
418 |
+
|
419 |
+
docpat_hettable_theory used_vouchers_admin RXtreat_sev_simple_mal treat_sev_simple_mal RXtreat_severe_mal treat_severe_mal, extrac($mycont) type(tex) ///
|
420 |
+
table("$tables/B11_mal_tmt_het_nl.tex") footnote($footnote0_nl_new GC, PD, and DD indicate tests of gatekeeping costs, patient-driven, and doctor-driven demand respectively. $footnote1) ///
|
421 |
+
prehead1($prehead1) title("Impacts on Malaria Treatment Outcomes - Heterogeneity by Predicted Malaria Risk") lab(mal_tmt_het_nl) ///
|
422 |
+
prehead2($prehead2) widc(0.12\linewidth) texwid(.8) cluvar($cluvar) testofh("GC/DD -- -- DD DD") signifevidenceh("No -- -- No No") testofl("GC/PD PD PD -- --") signifevidencel("Yes Yes Yes -- --") ///
|
423 |
+
extrahead(\\ & & \multicolumn{2}{c}{Any Malaria Treatment} & \multicolumn{2}{c}{Severe Malaria Treatment} \\ \cmidrule(lr){3-4} \cmidrule(lr){5-6}) ///
|
424 |
+
dodo(dome) path("$data_final/_bootstrap") setname("bs_cluCSCOM_") numreps(1000)
|
425 |
+
|
426 |
+
* TABLE B12: VOUCHERS AND MALARIA TREATMENT
|
427 |
+
* --------------------------------------------------------------------------------
|
428 |
+
use "$data_final/$patientdata", clear
|
429 |
+
drop if dropme==1
|
430 |
+
|
431 |
+
docpat_theory_lso treat_severe_mal_voucher treat_severe_mal_NOvoucher treat_simple_mal_voucher treat_simple_mal_NOvoucher , type(tex) ///
|
432 |
+
table("$tables/B12_vouchers_tmt_lso.tex") footnote($footnoteb DD and PD indicates a test of doctor and patient-driven demand respectively. $footnote1) testof("DD DD PD PD") signifevidence("No No No Yes") ///
|
433 |
+
prehead1($prehead1) title("Use of Voucher for Purchased Malaria Treatment") lab(vouchers_tmt) ///
|
434 |
+
prehead2($prehead2) widc(0.1\linewidth) texwid(.8) cluvar($cluvar) partial($date) lcont($date $clinic $patient)
|
435 |
+
|
436 |
+
* TABLE B13: Stockpiling: Taking medication at home survey - lasso
|
437 |
+
* --------------------------------------------------------------------------------
|
438 |
+
use "$data_final/$patientdata", clear
|
439 |
+
drop if dropme==1
|
440 |
+
|
441 |
+
gen taking_ACT_simple= taking_ACT_t if treat_simple_mal==1
|
442 |
+
|
443 |
+
label var taking_ACT_t "All Prescribed ACTs"
|
444 |
+
label var taking_ACT_simple "Prescribed ACT for Simple Malaria"
|
445 |
+
|
446 |
+
docpat_p1_lso taking_ACT_t taking_ACT_simple, type(tex) ///
|
447 |
+
table("$tables/B13_stockpiling_lso.tex") footnote($footnoteb The first column is limited to individuals who purchased an ACT treatment at the CSCom as part of either simple or severe malaria treatment. The second column is limited to individuals who purchased an ACT as part of simple malaria treatment. $footnote1) ///
|
448 |
+
prehead1($prehead1) title("Share of Patients Taking An ACT at Home Survey") lab(stockpiling) ///
|
449 |
+
prehead2($prehead2) widc(0.12\linewidth) texwid(1) cluvar($cluvar) partial($date) lcont($date $clinic $patient)
|
450 |
+
|
451 |
+
* TABLE B14: IMPACT OF INFORMATION TREATMENT ON TESTING
|
452 |
+
* --------------------------------------------------------------------------------
|
453 |
+
use "$data_final/$patientdata", clear
|
454 |
+
drop if dropme==1
|
455 |
+
gen no_voucher=.
|
456 |
+
replace no_voucher=1 if doctor_voucher==0 & patient_voucher==0
|
457 |
+
replace no_voucher=0 if doctor_voucher==1 | patient_voucher==1
|
458 |
+
gen pat_infoXno_voucher=patient_info*no_voucher
|
459 |
+
gen pat_infoXdoc_voucher=patient_info*doctor_voucher
|
460 |
+
gen pat_infoXpat_voucher=patient_info*patient_voucher
|
461 |
+
gen doctor_voucher_x_patient_info= doctor_voucher*patient_info
|
462 |
+
gen patient_voucher_x_patient_info = patient_voucher*patient_info
|
463 |
+
gen reported_Malaria_test_RX=reported_Malaria_test if RXtreat_sev_simple_mal==1
|
464 |
+
gen reported_RDT_RX=reported_RDT if RXtreat_sev_simple_mal==1
|
465 |
+
gen reported_GE_FS_RX=reported_GE_FS if RXtreat_sev_simple_mal==1
|
466 |
+
la var reported_Malaria_test_RX "Any Malaria Test"
|
467 |
+
la var reported_RDT_RX "RDT Test"
|
468 |
+
la var reported_GE_FS_RX "Microscopy Test"
|
469 |
+
la var RXtreat_sev_simple_mal "Prescribed Antimalarial"
|
470 |
+
la var treat_sev_simple_mal "Purchased Antimalarial"
|
471 |
+
la var reported_Malaria_test "Any Malaria Test"
|
472 |
+
la var reported_GE_FS "Microscopy Test"
|
473 |
+
la var reported_RDT "RDT Test"
|
474 |
+
|
475 |
+
docpat_pat_aux_lso reported_Malaria_test reported_RDT reported_GE_FS reported_Malaria_test_RX reported_RDT_RX reported_GE_FS_RX, type(tex) ///
|
476 |
+
table("$tables/B14_mal_testing_info_RX_lso.tex") footnote($footnoteb $footnote1) ///
|
477 |
+
prehead1($prehead1) title("Impacts of Patient Information on Malaria Testing at the Clinic") lab(mal_testing_info_RX_lso) ///
|
478 |
+
prehead2($prehead2) widc(0.1\linewidth) texwid(1.3) cluvar($cluvar) ///
|
479 |
+
extrahead(\\ & \multicolumn{3}{c}{All Patients} & \multicolumn{3}{c}{If Prescribed Antimalarial} \\ \cmidrule(lr){2-4} \cmidrule(lr){5-7}) ///
|
480 |
+
partial($date) lcont($date $clinic $patient)
|
481 |
+
|
482 |
+
|
483 |
+
* TABLE B15: IMPACTS ON COSTS TO PATIENTS AND CLINIC REVENUE -- PATIENT LEVEL
|
484 |
+
* --------------------------------------------------------------------------------
|
485 |
+
use "$data_final/$patientdata", clear
|
486 |
+
|
487 |
+
cap prog drop dome
|
488 |
+
prog define dome
|
489 |
+
drop if dropme==1
|
490 |
+
g reported_cost_mal= reported_totalcost if RXtreat_sev_simple_mal
|
491 |
+
g reported_cost_sev= reported_totalcost if RXtreat_severe_mal
|
492 |
+
la var reported_totalcost "Patient Costs"
|
493 |
+
la var reported_cost_mal "Malaria Patients"
|
494 |
+
la var reported_cost_sev "Severe Malaria Patients"
|
495 |
+
la var reported_totalcost_pre "Clinic Revenues"
|
496 |
+
end
|
497 |
+
|
498 |
+
dome
|
499 |
+
|
500 |
+
docpat_pantable_lso reported_totalcost_pre reported_totalcost, type(tex) ///
|
501 |
+
table("$tables/B15_cost_overall_lso.tex") footnote($footnoteb In Panel B, standard errors are based on 1,000 bootstrap replications, with re-sampling at the clinic level. Predicted malaria risk is re-calculated on each bootstrap replication. All variables measured in CFA top-coded at the 99th percentile. CFA610 $\approx$ USD1. Malaria cases classified based on doctor prescriptions. $footnote1) ///
|
502 |
+
prehead1($prehead1) title("Impacts on Clinic Revenues and Patient Costs (CFA)") lab(cost_overall) ///
|
503 |
+
prehead2($prehead2) widc(0.12\linewidth) texwid(.8) cluvar($cluvar) ///
|
504 |
+
path("$data_final/_bootstrap") setname("bs_cluCSCOM_") dodo(dome) numreps(1000) partial($date) lcont($date $clinic $patient)
|
505 |
+
|
506 |
+
|
507 |
+
* TABLE B16: IMPACTS ON MATCH :: TREATMENT AND ILLNESS - RDT SUB-SAMPLE
|
508 |
+
* --------------------------------------------------------------------------------
|
509 |
+
use "$data_final/$patientdata", clear
|
510 |
+
drop if dropme==1
|
511 |
+
|
512 |
+
la var RXexpected_mal_match_any "Overall Match"
|
513 |
+
la var expected_mal_match_any "Overall Match"
|
514 |
+
g RXexpected_mal_match_anyX= RXexpected_mal_match_any if RXmatch_treat_RDT!=.
|
515 |
+
g expected_mal_match_anyX= expected_mal_match_any if RXmatch_treat_RDT!=.
|
516 |
+
la var expected_mal_match_any_pos "Malaria Positive"
|
517 |
+
la var RXexpected_mal_match_any_pos "Malaria Positive"
|
518 |
+
la var expected_mal_match_any_neg "Malaria Negative"
|
519 |
+
la var RXexpected_mal_match_any_neg "Malaria Negative"
|
520 |
+
la var RXexpected_mal_match_anyX "Prescribed"
|
521 |
+
la var expected_mal_match_anyX "Purchased"
|
522 |
+
la var RXmatch_treat_RDT "Prescribed"
|
523 |
+
la var match_treat_RDT "Purchased"
|
524 |
+
|
525 |
+
docpat_p1_lso RXexpected_mal_match_anyX expected_mal_match_anyX RXmatch_treat_RDT match_treat_RDT, type(tex) ///
|
526 |
+
table("$tables/B16_expected_match_lso.tex") footnote($footnoteb In columns 3 and 4 match quality is equal to 1 if an individual is malaria positive and was prescribed/bought an antimalarial or is malaria negative and was not prescribed/did not buy an antimalarial and is zero otherwise. In columns 1-2 the value of one is replaced with either the probability an individual is positive (for antimalarial receipt) or the probability an individual is negative (for non-receipt). $footnote1) ///
|
527 |
+
prehead1($prehead1) title("Impacts on Match Between Treatment and Illness - RDT Sub-Sample") lab(expected_match_lso) ///
|
528 |
+
prehead2($prehead2) widc(0.1\linewidth) texwid(1.25) cluvar($cluvar) partial($date) lcont($date $clinic $patient) ///
|
529 |
+
extrahead(\\ & \multicolumn{2}{c}{Expected Match} & \multicolumn{2}{c}{Actual Match} \\ \cmidrule(lr){2-3} \cmidrule(lr){4-5})
|
530 |
+
|
531 |
+
|
21/replication_package/Do_Files/Stata admin files/LSS_TablePrograms.do
ADDED
@@ -0,0 +1,1392 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
* *******************************************************
|
3 |
+
* PROGRAM: DocPat_TablePrograms
|
4 |
+
* PROGRAMNER: Simone Schaner
|
5 |
+
* PURPOSE: Programs to make tables for LSS analysis
|
6 |
+
* DATE CREATED: 5/1/2019
|
7 |
+
* *******************************************************
|
8 |
+
|
9 |
+
|
10 |
+
**************************************************************************************************************
|
11 |
+
* e-class program to product bootstrapped SEs using replicant datasets and pre-specified controls
|
12 |
+
* note: we assume the "dofirst" bit has already been executed for the main spec, and just
|
13 |
+
* needs to be done on loops over the replication set
|
14 |
+
**************************************************************************************************************
|
15 |
+
cap prog drop boot_ols
|
16 |
+
prog define boot_ols, eclass
|
17 |
+
|
18 |
+
syntax anything [if] [in] , REPName(string) REPPath(string) NUMreps(integer) [DOFirst(string)] [MAindata(string)]
|
19 |
+
marksample touse
|
20 |
+
preserve
|
21 |
+
set more off
|
22 |
+
* FIRST RUN THE MAIN REGRESSION
|
23 |
+
qui `anything' `if'
|
24 |
+
tempfile starthere
|
25 |
+
save `starthere'
|
26 |
+
mat beta= e(b) /* get initial parameter vector */
|
27 |
+
local cols= colsof(beta)
|
28 |
+
local obs=e(N)
|
29 |
+
local dvar=e(depvar)
|
30 |
+
local rname: rowfullnames e(V)
|
31 |
+
local cname: colfullnames e(V)
|
32 |
+
mat reps=J(`numreps',`cols',.)
|
33 |
+
* NEXT DO A WHOLE BUNCH OF REPLICATIONS
|
34 |
+
local i=1
|
35 |
+
while `i'<=`numreps' {
|
36 |
+
qui {
|
37 |
+
drop _all
|
38 |
+
use "`reppath'/`repname'`i'"
|
39 |
+
`dofirst'
|
40 |
+
`anything' `if' [`wt']
|
41 |
+
mat reps[`i',1]=e(b)
|
42 |
+
}
|
43 |
+
di `i'
|
44 |
+
local ++i
|
45 |
+
} /* closes loop where we do command over and over */
|
46 |
+
* NEXT CALCULATE STANDARD ERRORS
|
47 |
+
drop _all
|
48 |
+
svmat reps
|
49 |
+
mat accum var= * [iw=1/`numreps'], dev nocons
|
50 |
+
mat colnames var= `cname'
|
51 |
+
mat rownames var= `rname'
|
52 |
+
* DISPLAY RESULTS
|
53 |
+
*di _n in gr "Bootstrapped Results"
|
54 |
+
drop _all
|
55 |
+
use `starthere'
|
56 |
+
qui `anything' `if'
|
57 |
+
* ereturn post beta var, esample(`touse') obs(`obs') depname(`dvar')
|
58 |
+
ereturn repost b=beta V=var
|
59 |
+
ereturn display
|
60 |
+
restore
|
61 |
+
end
|
62 |
+
|
63 |
+
|
64 |
+
|
65 |
+
**************************************************************************************************************
|
66 |
+
* main table w/o one-sided tests
|
67 |
+
**************************************************************************************************************
|
68 |
+
cap prog drop docpat_theory_lso
|
69 |
+
prog define docpat_theory_lso
|
70 |
+
est clear
|
71 |
+
syntax varlist [if], TEXWID(string) [Table(string)] [LCONT(varlist)] [TYPE(string)] [FOOTnote(string)] [PREHEAD1(string)] ///
|
72 |
+
[PREHEAD2(string)] [TITLE(string)] [LABel(string)] WIDC(string) [EXTRAC1(string)] [EXTRAC2(string)] ///
|
73 |
+
[EXTRAHEAD(string)] [EXTRAVARHead(string)] CLUVar(string) TESTOF(string) SIGNIFEVIDENCE(string) [PARTIAL(string)]
|
74 |
+
|
75 |
+
qui {
|
76 |
+
|
77 |
+
|
78 |
+
local q= 2
|
79 |
+
local colcount= wordcount("`varlist'")+1
|
80 |
+
local seclast= `q'-1
|
81 |
+
|
82 |
+
// locals to assist in making the table
|
83 |
+
local ester=1
|
84 |
+
forval i=1/`q' {
|
85 |
+
local eststr`i' ""
|
86 |
+
}
|
87 |
+
|
88 |
+
// label covariates
|
89 |
+
la var patient_voucher "$\beta_P$: Patient Voucher"
|
90 |
+
la var doctor_voucher "$\beta_D$: Doctor Voucher"
|
91 |
+
local counter=1
|
92 |
+
|
93 |
+
local varhead ""
|
94 |
+
local paren`counter' ""
|
95 |
+
local outcount=1
|
96 |
+
foreach out in `varlist' {
|
97 |
+
|
98 |
+
// GET LABELS HERE
|
99 |
+
local labelq : variable label `out'
|
100 |
+
local varhead "`varhead'& `labelq'" //this is the label for columns
|
101 |
+
|
102 |
+
pdslasso `out' patient_voucher doctor_voucher (`lcont') `if', clu(`cluvar') partial(`partial')
|
103 |
+
|
104 |
+
test patient_voucher=doctor_voucher
|
105 |
+
local n1= r(p)
|
106 |
+
local star ""
|
107 |
+
if `n1'<=.01 local star "\sym{***}"
|
108 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
109 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
110 |
+
local n2 = trim("`: display %10.3f `n1''")
|
111 |
+
local combo "`n2'`star'"
|
112 |
+
estadd local p_PVDV `combo'
|
113 |
+
|
114 |
+
local sign = sign(_b[patient_voucher]-_b[doctor_voucher])
|
115 |
+
local n1= 1-normal(`sign'*sqrt(r(chi2)))
|
116 |
+
local star ""
|
117 |
+
if `n1'<=.01 local star "\sym{***}"
|
118 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
119 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
120 |
+
local n2 = trim("`: display %10.3f `n1''")
|
121 |
+
local combo "`n2'`star'"
|
122 |
+
tokenize `oneside'
|
123 |
+
if "``outcount''"=="ge" local p_one "`combo'"
|
124 |
+
|
125 |
+
local n1= normal(`sign'*sqrt(r(chi2)))
|
126 |
+
local star ""
|
127 |
+
if `n1'<=.01 local star "\sym{***}"
|
128 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
129 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
130 |
+
local n2 = trim("`: display %10.3f `n1''")
|
131 |
+
local combo "`n2'`star'"
|
132 |
+
tokenize `oneside'
|
133 |
+
if "``outcount''"=="le" local p_one "`combo'"
|
134 |
+
|
135 |
+
estadd local p_oneside `p_one'
|
136 |
+
|
137 |
+
test patient_voucher=doctor_voucher=0
|
138 |
+
local n1= r(p)
|
139 |
+
local star ""
|
140 |
+
if `n1'<=.01 local star "\sym{***}"
|
141 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
142 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
143 |
+
local n2 = trim("`: display %10.3f `n1''")
|
144 |
+
local combo "`n2'`star'"
|
145 |
+
estadd local p_PVDV0 `combo'
|
146 |
+
|
147 |
+
qui sum `out' if e(sample) & doctor_voucher+patient_voucher==0
|
148 |
+
|
149 |
+
local DV: display %7.3f `r(mean)'
|
150 |
+
estadd local DV `DV'
|
151 |
+
|
152 |
+
tokenize `testof'
|
153 |
+
estadd local test_of "``outcount''"
|
154 |
+
|
155 |
+
tokenize `signifevidence'
|
156 |
+
estadd local signif_evidence "``outcount''"
|
157 |
+
|
158 |
+
est store E`ester'
|
159 |
+
local eststr`counter' "`eststr`counter'' E`ester'"
|
160 |
+
local paren`counter' "`paren`counter'' & (`ester')" // column numbers
|
161 |
+
local ++ester
|
162 |
+
local ++outcount
|
163 |
+
}
|
164 |
+
local ++counter
|
165 |
+
} //end qui loop
|
166 |
+
* FIRST PANEL
|
167 |
+
esttab `eststr1' using "`table'", keep(patient_voucher doctor_voucher) label noabbrev `type' replace nogaps nomtit nonum ///
|
168 |
+
stats(space p_PVDV test_of signif_evidence space DV N, fmt(0 0 0 0 0 a3 a0) labels("\emph{P-values and theory-driven tests}" "\enspace $\beta_P=\beta_D$" "\enspace Test for mechanism:" "\enspace Significant evidence of mechanism:" " " "Mean (Control)" "N")) ///
|
169 |
+
nonote star(* 0.10 ** 0.05 *** 0.01) `extrac1' ///
|
170 |
+
b(a2) se(a2) noline subs("\beta\_" "\beta_") ///
|
171 |
+
prehead("\begin{table}[ht!] \begin{adjustbox}{max width=`texwid'\textwidth} \begin{threeparttable} \caption{`title'} \label{`label'} {\begin{tabular}{l*{`colcount'}{C{`widc'}}} \toprule \toprule `paren1' `extrahead' \\ `varhead' `extravarhead' \\ \toprule ") ///
|
172 |
+
postfoot(\hline \end{tabular} } \begin{tablenotes}[flushleft] \small \item `footnote' \end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table})
|
173 |
+
end
|
174 |
+
|
175 |
+
**************************************************************************************************************
|
176 |
+
* theory driven tests in table w/ het tmt by above/below median malaria risk
|
177 |
+
* this table uses bootstrapped standard errors coupled w/ variable selection via pdslasso
|
178 |
+
**************************************************************************************************************
|
179 |
+
cap prog drop docpat_hettable_theory_lso
|
180 |
+
prog define docpat_hettable_theory_lso
|
181 |
+
est clear
|
182 |
+
syntax varlist [if], TEXWID(string) [Table(string)] [TYPE(string)] [FOOTnote(string)] [PREHEAD1(string)] PATH(string) SETNAME(string) ///
|
183 |
+
[PREHEAD2(string)] [TITLE(string)] [LABel(string)] WIDC(string) [EXTRAC1(string)] [EXTRAC2(string)] [PARTIAL(string)] ///
|
184 |
+
[EXTRAHEAD(string)] [EXTRAVARHead(string)] CLUVar(string) TESTOFH(string) SIGNIFEVIDENCEH(string) TESTOFL(string) SIGNIFEVIDENCEL(string) ///
|
185 |
+
NUMreps(integer) DODO(string) LCONT(string)
|
186 |
+
|
187 |
+
qui {
|
188 |
+
|
189 |
+
preserve
|
190 |
+
|
191 |
+
local q= 2
|
192 |
+
local colcount= wordcount("`varlist'")+1
|
193 |
+
local seclast= `q'-1
|
194 |
+
|
195 |
+
// locals to assist in making the table
|
196 |
+
local ester=1
|
197 |
+
forval i=1/`q' {
|
198 |
+
local eststr`i' ""
|
199 |
+
}
|
200 |
+
|
201 |
+
// label covariates
|
202 |
+
la var patient_voucher_high "$\delta_{PH}$: Patient Voucher $\times$ High Risk"
|
203 |
+
la var doctor_voucher_high "$\delta_{DH}$: Doctor Voucher $\times$ High Risk"
|
204 |
+
la var patient_voucher_low "$\delta_{PL}$: Patient Voucher $\times$ Low Risk"
|
205 |
+
la var doctor_voucher_low "$\delta_{DL}$: Doctor Voucher $\times$ Low Risk"
|
206 |
+
la var above_med_pos "$\theta$: High Malaria Risk"
|
207 |
+
local counter=1
|
208 |
+
local varhead ""
|
209 |
+
local paren`counter' ""
|
210 |
+
local outcount=1
|
211 |
+
tempfile theuser
|
212 |
+
save `theuser'
|
213 |
+
foreach out in `varlist' {
|
214 |
+
drop _all
|
215 |
+
use `theuser'
|
216 |
+
|
217 |
+
// GET LABELS HERE
|
218 |
+
local labelq : variable label `out'
|
219 |
+
local varhead "`varhead'& `labelq'" //this is the label for columns
|
220 |
+
|
221 |
+
|
222 |
+
// step 1 :: select covariates using PDS lasso
|
223 |
+
pdslasso `out' patient_voucher_high doctor_voucher_high patient_voucher_low doctor_voucher_low above_med_pos (`lcont') `if', clu(`cluvar') partial(`partial')
|
224 |
+
local totcont= "`e(xselected)' `e(xpartial)'"
|
225 |
+
|
226 |
+
|
227 |
+
// step 2 :: bootstrap this thing
|
228 |
+
boot_ols reg `out' patient_voucher_high doctor_voucher_high patient_voucher_low doctor_voucher_low above_med_pos `totcont' `if', reppath(`path') repname(`setname') num(`numreps') dofirst(`dodo')
|
229 |
+
* NB: since this is bootstrapping after double post lasso, recalculate p-values to be based on asymptotic inference
|
230 |
+
* this ensures that we use asymptotics for both one and two-sided tests
|
231 |
+
test patient_voucher_high = doctor_voucher_high
|
232 |
+
local n1= 2*(1-normal(sqrt(r(F))))
|
233 |
+
local star ""
|
234 |
+
if `n1'<=.01 local star "\sym{***}"
|
235 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
236 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
237 |
+
local n2 = trim("`: display %10.3f `n1''")
|
238 |
+
local combo "`n2'`star'"
|
239 |
+
estadd local p_PVDVhigh `combo'
|
240 |
+
|
241 |
+
local sign = sign(_b[patient_voucher_high]-_b[doctor_voucher_high])
|
242 |
+
local n1= 1-normal(`sign'*sqrt(r(F)))
|
243 |
+
|
244 |
+
local star ""
|
245 |
+
if `n1'<=.01 local star "\sym{***}"
|
246 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
247 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
248 |
+
local n2 = trim("`: display %10.3f `n1''")
|
249 |
+
local combo "`n2'`star'"
|
250 |
+
tokenize `oneside'
|
251 |
+
if "``outcount''"=="ge" local p_one_high "`combo'"
|
252 |
+
|
253 |
+
local n1= normal(`sign'*sqrt(r(F)))
|
254 |
+
local star ""
|
255 |
+
if `n1'<=.01 local star "\sym{***}"
|
256 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
257 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
258 |
+
local n2 = trim("`: display %10.3f `n1''")
|
259 |
+
local combo "`n2'`star'"
|
260 |
+
tokenize `oneside'
|
261 |
+
if "``outcount''"=="le" local p_one_high "`combo'"
|
262 |
+
|
263 |
+
test patient_voucher_low = doctor_voucher_low
|
264 |
+
local n1= 2*(1-normal(sqrt(r(F))))
|
265 |
+
local star ""
|
266 |
+
if `n1'<=.01 local star "\sym{***}"
|
267 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
268 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
269 |
+
local n2 = trim("`: display %10.3f `n1''")
|
270 |
+
local combo "`n2'`star'"
|
271 |
+
estadd local p_PVDVlow `combo'
|
272 |
+
|
273 |
+
local sign = sign(_b[patient_voucher_low]-_b[doctor_voucher_low])
|
274 |
+
local n1= 1-normal(`sign'*sqrt(r(F)))
|
275 |
+
local star ""
|
276 |
+
if `n1'<=.01 local star "\sym{***}"
|
277 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
278 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
279 |
+
local n2 = trim("`: display %10.3f `n1''")
|
280 |
+
local combo "`n2'`star'"
|
281 |
+
tokenize `oneside'
|
282 |
+
if "``outcount''"=="ge" local p_one_low "`combo'"
|
283 |
+
|
284 |
+
local n1= normal(`sign'*sqrt(r(F)))
|
285 |
+
local star ""
|
286 |
+
if `n1'<=.01 local star "\sym{***}"
|
287 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
288 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
289 |
+
local n2 = trim("`: display %10.3f `n1''")
|
290 |
+
local combo "`n2'`star'"
|
291 |
+
tokenize `oneside'
|
292 |
+
if "``outcount''"=="le" local p_one_low "`combo'"
|
293 |
+
|
294 |
+
|
295 |
+
qui sum `out' if e(sample) & doctor_voucher + patient_voucher ==0 & above_med_pos==0
|
296 |
+
|
297 |
+
local DV: display %7.3f `r(mean)'
|
298 |
+
estadd local DV `DV'
|
299 |
+
|
300 |
+
tokenize `testofh'
|
301 |
+
estadd local test_of_h "``outcount''"
|
302 |
+
|
303 |
+
tokenize `signifevidenceh'
|
304 |
+
estadd local signif_evidence_h "``outcount''"
|
305 |
+
|
306 |
+
tokenize `testofl'
|
307 |
+
estadd local test_of_l "``outcount''"
|
308 |
+
|
309 |
+
tokenize `signifevidencel'
|
310 |
+
estadd local signif_evidence_l "``outcount''"
|
311 |
+
|
312 |
+
est store E`ester'
|
313 |
+
local eststr`counter' "`eststr`counter'' E`ester'"
|
314 |
+
local paren`counter' "`paren`counter'' & (`ester')" // column numbers
|
315 |
+
local ++ester
|
316 |
+
local ++outcount
|
317 |
+
}
|
318 |
+
local ++counter
|
319 |
+
} //end qui loop
|
320 |
+
* FIRST PANEL
|
321 |
+
esttab `eststr1' using "`table'", keep(patient_voucher_high doctor_voucher_high patient_voucher_low doctor_voucher_low above_med_pos) label noabbrev `type' replace nogaps nomtit nonum ///
|
322 |
+
stats(space p_PVDVhigh test_of_h signif_evidence_h space p_PVDVlow test_of_l signif_evidence_l space DV N, fmt(0 0 0 0 0 0 0 0 0 a2 a0) labels("\emph{P-values and theory-driven tests}" "\enspace $\delta_{PH}=\delta_{DH}$" "\enspace Test for mechanism:" "\enspace Significant evidence of mechanism:" " " "\enspace $\delta_{PL}=\delta_{DL}$" "\enspace Test for mechanism:" "\enspace Significant evidence of mechanism:" " " "Mean (Control, Low Risk)" "N")) ///
|
323 |
+
nonote star(* 0.10 ** 0.05 *** 0.01) `extrac1' ///
|
324 |
+
b(a2) se(a2) noline subs("\beta\_" "\beta_") ///
|
325 |
+
prehead("\begin{table}[ht!] \begin{adjustbox}{max width=`texwid'\textwidth} \begin{threeparttable} \caption{`title'} \label{`label'} {\begin{tabular}{l*{`colcount'}{C{`widc'}}} \toprule \toprule `paren1' `extrahead' \\ `varhead' `extravarhead' \\ \toprule ") ///
|
326 |
+
postfoot(\hline \end{tabular} } \begin{tablenotes}[flushleft] \small \item `footnote' \end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table})
|
327 |
+
restore
|
328 |
+
end
|
329 |
+
|
330 |
+
|
331 |
+
|
332 |
+
|
333 |
+
**************************************************************************************************************
|
334 |
+
* theory driven tests in table w/ het tmt by above/below median malaria risk
|
335 |
+
* this table uses bootstrapped standard errors coupled w/ variable selection via pdslasso
|
336 |
+
**************************************************************************************************************
|
337 |
+
cap prog drop docpat_het_theory_lso_simple
|
338 |
+
prog define docpat_het_theory_lso_simple
|
339 |
+
est clear
|
340 |
+
syntax varlist [if], TEXWID(string) [Table(string)] [TYPE(string)] [FOOTnote(string)] [PREHEAD1(string)] PATH(string) SETNAME(string) ///
|
341 |
+
[PREHEAD2(string)] [TITLE(string)] [LABel(string)] WIDC(string) [EXTRAC1(string)] [EXTRAC2(string)] [PARTIAL(string)] ///
|
342 |
+
[EXTRAHEAD(string)] [EXTRAVARHead(string)] CLUVar(string) ///
|
343 |
+
NUMreps(integer) DODO(string) LCONT(string)
|
344 |
+
|
345 |
+
qui {
|
346 |
+
|
347 |
+
preserve
|
348 |
+
|
349 |
+
local q= 2
|
350 |
+
local colcount= wordcount("`varlist'")+1
|
351 |
+
local seclast= `q'-1
|
352 |
+
|
353 |
+
// locals to assist in making the table
|
354 |
+
local ester=1
|
355 |
+
forval i=1/`q' {
|
356 |
+
local eststr`i' ""
|
357 |
+
}
|
358 |
+
|
359 |
+
// label covariates
|
360 |
+
la var patient_voucher_high "$\delta_{PH}$: Patient Voucher $\times$ High Risk"
|
361 |
+
la var doctor_voucher_high "$\delta_{DH}$: Doctor Voucher $\times$ High Risk"
|
362 |
+
la var patient_voucher_low "$\delta_{PL}$: Patient Voucher $\times$ Low Risk"
|
363 |
+
la var doctor_voucher_low "$\delta_{DL}$: Doctor Voucher $\times$ Low Risk"
|
364 |
+
la var above_med_pos "$\theta$: High Malaria Risk"
|
365 |
+
local counter=1
|
366 |
+
local varhead ""
|
367 |
+
local paren`counter' ""
|
368 |
+
local outcount=1
|
369 |
+
tempfile theuser
|
370 |
+
save `theuser'
|
371 |
+
foreach out in `varlist' {
|
372 |
+
drop _all
|
373 |
+
use `theuser'
|
374 |
+
|
375 |
+
// GET LABELS HERE
|
376 |
+
local labelq : variable label `out'
|
377 |
+
local varhead "`varhead'& `labelq'" //this is the label for columns
|
378 |
+
|
379 |
+
|
380 |
+
// step 1 :: select covariates using PDS lasso
|
381 |
+
pdslasso `out' patient_voucher_high doctor_voucher_high patient_voucher_low doctor_voucher_low above_med_pos (`lcont') `if', clu(`cluvar') partial(`partial')
|
382 |
+
local totcont= "`e(xselected)' `e(xpartial)'"
|
383 |
+
|
384 |
+
|
385 |
+
// step 2 :: bootstrap this thing
|
386 |
+
boot_ols reg `out' patient_voucher_high doctor_voucher_high patient_voucher_low doctor_voucher_low above_med_pos `totcont' `if', reppath(`path') repname(`setname') num(`numreps') dofirst(`dodo')
|
387 |
+
* NB: since this is bootstrapping after double post lasso, recalculate p-values to be based on asymptotic inference
|
388 |
+
* this ensures that we use asymptotics for both one and two-sided tests
|
389 |
+
test patient_voucher_high = doctor_voucher_high
|
390 |
+
local n1= 2*(1-normal(sqrt(r(F))))
|
391 |
+
local star ""
|
392 |
+
if `n1'<=.01 local star "\sym{***}"
|
393 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
394 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
395 |
+
local n2 = trim("`: display %10.3f `n1''")
|
396 |
+
local combo "`n2'`star'"
|
397 |
+
estadd local p_PVDVhigh `combo'
|
398 |
+
|
399 |
+
local sign = sign(_b[patient_voucher_high]-_b[doctor_voucher_high])
|
400 |
+
local n1= 1-normal(`sign'*sqrt(r(F)))
|
401 |
+
|
402 |
+
local star ""
|
403 |
+
if `n1'<=.01 local star "\sym{***}"
|
404 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
405 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
406 |
+
local n2 = trim("`: display %10.3f `n1''")
|
407 |
+
local combo "`n2'`star'"
|
408 |
+
tokenize `oneside'
|
409 |
+
if "``outcount''"=="ge" local p_one_high "`combo'"
|
410 |
+
|
411 |
+
local n1= normal(`sign'*sqrt(r(F)))
|
412 |
+
local star ""
|
413 |
+
if `n1'<=.01 local star "\sym{***}"
|
414 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
415 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
416 |
+
local n2 = trim("`: display %10.3f `n1''")
|
417 |
+
local combo "`n2'`star'"
|
418 |
+
tokenize `oneside'
|
419 |
+
if "``outcount''"=="le" local p_one_high "`combo'"
|
420 |
+
|
421 |
+
test patient_voucher_low = doctor_voucher_low
|
422 |
+
local n1= 2*(1-normal(sqrt(r(F))))
|
423 |
+
local star ""
|
424 |
+
if `n1'<=.01 local star "\sym{***}"
|
425 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
426 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
427 |
+
local n2 = trim("`: display %10.3f `n1''")
|
428 |
+
local combo "`n2'`star'"
|
429 |
+
estadd local p_PVDVlow `combo'
|
430 |
+
|
431 |
+
local sign = sign(_b[patient_voucher_low]-_b[doctor_voucher_low])
|
432 |
+
local n1= 1-normal(`sign'*sqrt(r(F)))
|
433 |
+
local star ""
|
434 |
+
if `n1'<=.01 local star "\sym{***}"
|
435 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
436 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
437 |
+
local n2 = trim("`: display %10.3f `n1''")
|
438 |
+
local combo "`n2'`star'"
|
439 |
+
tokenize `oneside'
|
440 |
+
if "``outcount''"=="ge" local p_one_low "`combo'"
|
441 |
+
|
442 |
+
local n1= normal(`sign'*sqrt(r(F)))
|
443 |
+
local star ""
|
444 |
+
if `n1'<=.01 local star "\sym{***}"
|
445 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
446 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
447 |
+
local n2 = trim("`: display %10.3f `n1''")
|
448 |
+
local combo "`n2'`star'"
|
449 |
+
tokenize `oneside'
|
450 |
+
if "``outcount''"=="le" local p_one_low "`combo'"
|
451 |
+
|
452 |
+
|
453 |
+
qui sum `out' if e(sample) & doctor_voucher + patient_voucher ==0 & above_med_pos==0
|
454 |
+
|
455 |
+
local DV: display %7.3f `r(mean)'
|
456 |
+
estadd local DV `DV'
|
457 |
+
|
458 |
+
tokenize `testofh'
|
459 |
+
estadd local test_of_h "``outcount''"
|
460 |
+
|
461 |
+
tokenize `signifevidenceh'
|
462 |
+
estadd local signif_evidence_h "``outcount''"
|
463 |
+
|
464 |
+
tokenize `testofl'
|
465 |
+
estadd local test_of_l "``outcount''"
|
466 |
+
|
467 |
+
tokenize `signifevidencel'
|
468 |
+
estadd local signif_evidence_l "``outcount''"
|
469 |
+
|
470 |
+
est store E`ester'
|
471 |
+
local eststr`counter' "`eststr`counter'' E`ester'"
|
472 |
+
local paren`counter' "`paren`counter'' & (`ester')" // column numbers
|
473 |
+
local ++ester
|
474 |
+
local ++outcount
|
475 |
+
}
|
476 |
+
local ++counter
|
477 |
+
} //end qui loop
|
478 |
+
* FIRST PANEL
|
479 |
+
esttab `eststr1' using "`table'", keep(patient_voucher_high doctor_voucher_high patient_voucher_low doctor_voucher_low above_med_pos) label noabbrev `type' replace nogaps nomtit nonum ///
|
480 |
+
stats(space p_PVDVhigh p_PVDVlow space DV N, fmt(0 0 0 0 a2 a0) labels("\emph{P-values}" "\enspace $\delta_{PH}=\delta_{DH}$" "\enspace $\delta_{PL}=\delta_{DL}$" " " "Mean (Control, Low Risk)" "N")) ///
|
481 |
+
nonote star(* 0.10 ** 0.05 *** 0.01) `extrac1' ///
|
482 |
+
b(a2) se(a2) noline subs("\beta\_" "\beta_") ///
|
483 |
+
prehead("\begin{table}[ht!] \begin{adjustbox}{max width=`texwid'\textwidth} \begin{threeparttable} \caption{`title'} \label{`label'} {\begin{tabular}{l*{`colcount'}{C{`widc'}}} \toprule \toprule `paren1' `extrahead' \\ `varhead' `extravarhead' \\ \toprule ") ///
|
484 |
+
postfoot(\hline \end{tabular} } \begin{tablenotes}[flushleft] \small \item `footnote' \end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table})
|
485 |
+
restore
|
486 |
+
end
|
487 |
+
|
488 |
+
|
489 |
+
|
490 |
+
**************************************************************************************************************
|
491 |
+
* table w/ panels that uses lasso throughout and bootstrapping for the het effects
|
492 |
+
* NOTE: no theory-driven tests for this one
|
493 |
+
**************************************************************************************************************
|
494 |
+
cap prog drop docpat_pantable_lso
|
495 |
+
prog define docpat_pantable_lso
|
496 |
+
est clear
|
497 |
+
syntax varlist [if], TEXWID(string) [Table(string)] [TYPE(string)] [FOOTnote(string)] [PREHEAD1(string)] ///
|
498 |
+
[PREHEAD2(string)] [TITLE(string)] [LABel(string)] WIDC(string) [EXTRAC1(string)] [EXTRAC2(string)] ///
|
499 |
+
[EXTRAHEAD(string)] [EXTRAVARHead(string)] CLUVar(string) [PARTIAL(string)] NUMreps(integer) DODO(string) ///
|
500 |
+
SETname(string) PATH(string) LCONT(string)
|
501 |
+
|
502 |
+
qui {
|
503 |
+
|
504 |
+
local q= 2
|
505 |
+
local colcount= wordcount("`varlist'")+1
|
506 |
+
local seclast= `q'-1
|
507 |
+
|
508 |
+
// locals to assist in making the table
|
509 |
+
local ester=1
|
510 |
+
forval i=1/`q' {
|
511 |
+
local eststr`i' ""
|
512 |
+
}
|
513 |
+
|
514 |
+
// label covariates
|
515 |
+
la var patient_voucher "\enspace $\beta_P$: Patient Voucher"
|
516 |
+
la var doctor_voucher "\enspace $\beta_D$: Doctor Voucher"
|
517 |
+
la var patient_voucher_high "\enspace $\delta_{PH}$: Patient Voucher $\times$ High Risk"
|
518 |
+
la var doctor_voucher_high "\enspace $\delta_{DH}$: Doctor Voucher $\times$ High Risk"
|
519 |
+
la var patient_voucher_low "\enspace $\delta_{PL}$: Patient Voucher $\times$ Low Risk"
|
520 |
+
la var doctor_voucher_low "\enspace $\delta_{DL}$: Doctor Voucher $\times$ Low Risk"
|
521 |
+
la var above_med_pos "\enspace $\theta$: High Malaria Risk"
|
522 |
+
|
523 |
+
local counter=1
|
524 |
+
|
525 |
+
local varhead ""
|
526 |
+
local paren`counter' ""
|
527 |
+
tempfile startfile
|
528 |
+
save `startfile'
|
529 |
+
|
530 |
+
foreach out in `varlist' {
|
531 |
+
|
532 |
+
// GET LABELS HERE
|
533 |
+
local headz`counter' "\emph{Panel A. No Interactions}" // this is the label for panels
|
534 |
+
local labelq : variable label `out'
|
535 |
+
local varhead "`varhead'& `labelq'" //this is the label for columns
|
536 |
+
|
537 |
+
pdslasso `out' patient_voucher doctor_voucher (`lcont') `if', clu(`cluvar') partial(`partial')
|
538 |
+
|
539 |
+
test patient_voucher=doctor_voucher
|
540 |
+
local n1= r(p)
|
541 |
+
local star ""
|
542 |
+
if `n1'<=.01 local star "\sym{***}"
|
543 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
544 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
545 |
+
local n2 = trim("`: display %10.3f `n1''")
|
546 |
+
local combo "`n2'`star'"
|
547 |
+
estadd local p_PVDV `combo'
|
548 |
+
|
549 |
+
test patient_voucher=doctor_voucher=0
|
550 |
+
local n1= r(p)
|
551 |
+
local star ""
|
552 |
+
if `n1'<=.01 local star "\sym{***}"
|
553 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
554 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
555 |
+
local n2 = trim("`: display %10.3f `n1''")
|
556 |
+
local combo "`n2'`star'"
|
557 |
+
estadd local p_PVDV0 `combo'
|
558 |
+
|
559 |
+
qui sum `out' if e(sample) & infotreat==0 & treat_scheduled==1
|
560 |
+
estadd scalar DV=r(mean)
|
561 |
+
|
562 |
+
est store E`ester'
|
563 |
+
local eststr`counter' "`eststr`counter'' E`ester'"
|
564 |
+
local paren`counter' "`paren`counter'' & (`ester')" // column numbers
|
565 |
+
local ++ester
|
566 |
+
}
|
567 |
+
local ++counter
|
568 |
+
|
569 |
+
// NOW DO INTERACTIONS
|
570 |
+
local varhead ""
|
571 |
+
local paren`counter' ""
|
572 |
+
foreach out in `varlist' {
|
573 |
+
drop _all
|
574 |
+
use `startfile'
|
575 |
+
|
576 |
+
// get labels here
|
577 |
+
local headz`counter' "\emph{Panel B. Interactions with Predicted Malaria Probability}" // this is the label for panels
|
578 |
+
local labelq : variable label `out'
|
579 |
+
local varhead "`varhead'& `labelq'" //this is the label for columns
|
580 |
+
|
581 |
+
// step 1 :: select covariates using PDS lasso
|
582 |
+
pdslasso `out' patient_voucher_high doctor_voucher_high patient_voucher_low doctor_voucher_low above_med_pos (`lcont') `if', clu(`cluvar') partial(`partial')
|
583 |
+
local totcont= "`e(xselected)' `e(xpartial)'"
|
584 |
+
|
585 |
+
// step 2 :: bootstrap this thing
|
586 |
+
boot_ols reg `out' patient_voucher_high doctor_voucher_high patient_voucher_low doctor_voucher_low above_med_pos `totcont' `if', reppath(`path') repname(`setname') num(`numreps') dofirst(`dodo')
|
587 |
+
|
588 |
+
test patient_voucher_high = doctor_voucher_high
|
589 |
+
local n1= 2*(1-normal(sqrt(r(F))))
|
590 |
+
local star ""
|
591 |
+
if `n1'<=.01 local star "\sym{***}"
|
592 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
593 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
594 |
+
local n2 = trim("`: display %10.3f `n1''")
|
595 |
+
local combo "`n2'`star'"
|
596 |
+
estadd local p_PVDVhigh `combo'
|
597 |
+
|
598 |
+
|
599 |
+
test patient_voucher_low = doctor_voucher_low
|
600 |
+
local n1= 2*(1-normal(sqrt(r(F))))
|
601 |
+
local star ""
|
602 |
+
if `n1'<=.01 local star "\sym{***}"
|
603 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
604 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
605 |
+
local n2 = trim("`: display %10.3f `n1''")
|
606 |
+
local combo "`n2'`star'"
|
607 |
+
estadd local p_PVDVlow `combo'
|
608 |
+
|
609 |
+
qui sum `out' if e(sample) & doctor_voucher + patient_voucher ==0
|
610 |
+
|
611 |
+
local DV: display %7.3f `r(mean)'
|
612 |
+
estadd local DV `DV'
|
613 |
+
|
614 |
+
estadd local space=""
|
615 |
+
est store E`ester'
|
616 |
+
local eststr`counter' "`eststr`counter'' E`ester'"
|
617 |
+
local paren`counter' "`paren`counter'' & (`ester')" // column numbers
|
618 |
+
local ++ester
|
619 |
+
}
|
620 |
+
local ++counter
|
621 |
+
|
622 |
+
} //end qui loop
|
623 |
+
* FIRST PANEL
|
624 |
+
esttab `eststr1' using "`table'", keep(patient_voucher doctor_voucher) label noabbrev `type' replace nogaps nomtit nonum ///
|
625 |
+
stats(space p_PVDV p_PVDV0 , fmt( 0 0 0) labels("\emph{P-Values: Two-Sided Tests} \textcolor{white}{XXXXXXXXXXXXXXXXXX}" "\enspace $\beta_P=\beta_D$" "\enspace $\beta_P=\beta_D=0$")) ///
|
626 |
+
nonote star(* 0.10 ** 0.05 *** 0.01) `extrac1' ///
|
627 |
+
b(a2) se(a2) noline subs("\beta\_" "\beta_") ///
|
628 |
+
prehead("\begin{table}[ht!] \begin{adjustbox}{max width=`texwid'\textwidth} \begin{threeparttable} \caption{`title'} \label{`label'} {\begin{tabular}{l*{`colcount'}{C{`widc'}}} \toprule \toprule `paren1' `extrahead' \\ `varhead' `extravarhead' \\ \toprule \multicolumn{`colcount'}{l}{`headz1'} \\")
|
629 |
+
* SECOND PANEL
|
630 |
+
esttab `eststr2' using "`table'", append keep(patient_voucher_high doctor_voucher_high patient_voucher_low doctor_voucher_low above_med_pos) ///
|
631 |
+
label noabbrev `type' nogaps nomtit nonum ///
|
632 |
+
stats(space p_PVDVhigh p_PVDVlow space DV N, fmt(0 0 0 0 a2 a0) ///
|
633 |
+
labels("\emph{P-values: Two-Sided Tests} \textcolor{white}{XXXXXXXXXXXXXXXXXX}" "\enspace $\delta_{PH}=\delta_{DH}$" "\enspace $\delta_{PL}=\delta_{DL}$" " " "Mean (Control)" "N")) ///
|
634 |
+
nonote eqlabels(none) star(* 0.10 ** 0.05 *** 0.01) `extrac2' ///
|
635 |
+
b(a2) se(a2) noline subs("\beta\_" "\beta_") ///
|
636 |
+
prehead("{ \begin{tabular}{l*{8}{C{`widc'}}} \\ \multicolumn{`colcount'}{l}{`headz`q''} \\") ///
|
637 |
+
postfoot(\hline \end{tabular} } \begin{tablenotes}[flushleft] \small \item `footnote' \end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table})
|
638 |
+
end
|
639 |
+
|
640 |
+
|
641 |
+
|
642 |
+
**************************************************************************************************************
|
643 |
+
* table to show one-panel / main effects using lasso, no theory driven tests
|
644 |
+
**************************************************************************************************************
|
645 |
+
cap prog drop docpat_p1_lso
|
646 |
+
prog define docpat_p1_lso
|
647 |
+
est clear
|
648 |
+
syntax varlist [if], TEXWID(string) [Table(string)] [TYPE(string)] [FOOTnote(string)] [PREHEAD1(string)] ///
|
649 |
+
[PREHEAD2(string)] [TITLE(string)] [LABel(string)] WIDC(string) [EXTRAC1(string)] [EXTRAC2(string)] ///
|
650 |
+
[EXTRAHEAD(string)] [EXTRAVARHead(string)] CLUVar(string) [PARTIAL(string)] LCONT(string)
|
651 |
+
|
652 |
+
qui {
|
653 |
+
|
654 |
+
|
655 |
+
local q= 2
|
656 |
+
local colcount= wordcount("`varlist'")+1
|
657 |
+
local seclast= `q'-1
|
658 |
+
|
659 |
+
// locals to assist in making the table
|
660 |
+
local ester=1
|
661 |
+
forval i=1/`q' {
|
662 |
+
local eststr`i' ""
|
663 |
+
}
|
664 |
+
|
665 |
+
// label covariates
|
666 |
+
la var patient_voucher "$\beta_P$: Patient Voucher"
|
667 |
+
la var doctor_voucher "$\beta_D$: Doctor Voucher"
|
668 |
+
local counter=1
|
669 |
+
|
670 |
+
local varhead ""
|
671 |
+
local paren`counter' ""
|
672 |
+
foreach out in `varlist' {
|
673 |
+
|
674 |
+
// GET LABELS HERE
|
675 |
+
local labelq : variable label `out'
|
676 |
+
local varhead "`varhead'& `labelq'" //this is the label for columns
|
677 |
+
|
678 |
+
pdslasso `out' patient_voucher doctor_voucher (`lcont') `if', clu(`cluvar') partial(`partial')
|
679 |
+
|
680 |
+
test patient_voucher=doctor_voucher
|
681 |
+
local n1= r(p)
|
682 |
+
local star ""
|
683 |
+
if `n1'<=.01 local star "\sym{***}"
|
684 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
685 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
686 |
+
local n2 = trim("`: display %10.3f `n1''")
|
687 |
+
local combo "`n2'`star'"
|
688 |
+
estadd local p_PVDV `combo'
|
689 |
+
|
690 |
+
test patient_voucher=doctor_voucher=0
|
691 |
+
local n1= r(p)
|
692 |
+
local star ""
|
693 |
+
if `n1'<=.01 local star "\sym{***}"
|
694 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
695 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
696 |
+
local n2 = trim("`: display %10.3f `n1''")
|
697 |
+
local combo "`n2'`star'"
|
698 |
+
estadd local p_PVDV0 `combo'
|
699 |
+
|
700 |
+
qui sum `out' if e(sample) & doctor_voucher+patient_voucher==0
|
701 |
+
|
702 |
+
local DV: display %7.3f `r(mean)'
|
703 |
+
estadd local DV `DV'
|
704 |
+
|
705 |
+
est store E`ester'
|
706 |
+
local eststr`counter' "`eststr`counter'' E`ester'"
|
707 |
+
local paren`counter' "`paren`counter'' & (`ester')" // column numbers
|
708 |
+
local ++ester
|
709 |
+
}
|
710 |
+
local ++counter
|
711 |
+
|
712 |
+
} //end qui loop
|
713 |
+
* FIRST PANEL
|
714 |
+
esttab `eststr1' using "`table'", keep(patient_voucher doctor_voucher) label noabbrev `type' replace nogaps nomtit nonum ///
|
715 |
+
stats(space p_PVDV p_PVDV0 space DV N, fmt(0 0 0 0 a2 a0) labels("\emph{P-values}" "\enspace $\beta_P=\beta_D$" "\enspace $\beta_P=\beta_D=0$" " " "Mean (Control)" "N")) ///
|
716 |
+
nonote star(* 0.10 ** 0.05 *** 0.01) `extrac1' ///
|
717 |
+
b(a2) se(a2) noline subs("\beta\_" "\beta_") ///
|
718 |
+
prehead("\begin{table}[ht!] \begin{adjustbox}{max width=`texwid'\textwidth} \begin{threeparttable} \caption{`title'} \label{`label'} {\begin{tabular}{l*{`colcount'}{C{`widc'}}} \toprule \toprule `paren1' `extrahead' \\ `varhead' `extravarhead' \\ \toprule ") ///
|
719 |
+
postfoot(\hline \end{tabular} } \begin{tablenotes}[flushleft] \small \item `footnote' \end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table})
|
720 |
+
end
|
721 |
+
|
722 |
+
|
723 |
+
**************************************************************************************************************
|
724 |
+
* table that looks at impact of patient information
|
725 |
+
**************************************************************************************************************
|
726 |
+
cap prog drop docpat_pat_aux_lso
|
727 |
+
prog define docpat_pat_aux_lso
|
728 |
+
est clear
|
729 |
+
syntax varlist [if], TEXWID(string) [Table(string)] [TYPE(string)] [FOOTnote(string)] [PREHEAD1(string)] ///
|
730 |
+
[PREHEAD2(string)] [TITLE(string)] [LABel(string)] WIDC(string) [EXTRAC1(string)] [EXTRAC2(string)] ///
|
731 |
+
[EXTRAHEAD(string)] [EXTRAVARHead(string)] CLUVar(string) [PARTIAL(string)] LCONT(string)
|
732 |
+
|
733 |
+
qui {
|
734 |
+
|
735 |
+
local q= 2
|
736 |
+
local colcount= wordcount("`varlist'")+1
|
737 |
+
local seclast= `q'-1
|
738 |
+
|
739 |
+
// locals to assist in making the table
|
740 |
+
local ester=1
|
741 |
+
forval i=1/`q' {
|
742 |
+
local eststr`i' ""
|
743 |
+
}
|
744 |
+
|
745 |
+
// label covariates
|
746 |
+
la var patient_voucher "\enspace Patient Voucher"
|
747 |
+
la var doctor_voucher "\enspace Doctor Voucher"
|
748 |
+
la var patient_info "\enspace Patient Information"
|
749 |
+
la var pat_infoXno_voucher "\enspace Patient Information $\times$ No Voucher"
|
750 |
+
la var pat_infoXdoc_voucher "\enspace Doctor Voucher $\times$ Patient Information"
|
751 |
+
la var pat_infoXpat_voucher "\enspace Patient Voucher $\times$ Patient Information"
|
752 |
+
|
753 |
+
local counter=1
|
754 |
+
|
755 |
+
local varhead ""
|
756 |
+
local paren`counter' ""
|
757 |
+
foreach out in `varlist' {
|
758 |
+
|
759 |
+
// GET LABELS HERE
|
760 |
+
local headz`counter' "\emph{Panel A. Overall Effects}" // this is the label for panels
|
761 |
+
local labelq : variable label `out'
|
762 |
+
local varhead "`varhead'& `labelq'" //this is the label for columns
|
763 |
+
|
764 |
+
pdslasso `out' patient_info (`lcont') `if', clu(`cluvar') partial(`partial')
|
765 |
+
|
766 |
+
qui sum `out' if e(sample) & patient_info==0
|
767 |
+
local control_PI: display %10.3f `r(mean)'
|
768 |
+
estadd local control_PI `control_PI'
|
769 |
+
|
770 |
+
est store E`ester'
|
771 |
+
local eststr`counter' "`eststr`counter'' E`ester'"
|
772 |
+
local paren`counter' "`paren`counter'' & (`ester')" // column numbers
|
773 |
+
local ++ester
|
774 |
+
}
|
775 |
+
local ++counter
|
776 |
+
|
777 |
+
local varhead ""
|
778 |
+
local paren`counter' ""
|
779 |
+
foreach out in `varlist' {
|
780 |
+
|
781 |
+
// GET LABELS HERE
|
782 |
+
local headz`counter' "\emph{Panel B. By Voucher Treatment Group}" // this is the label for panels
|
783 |
+
local labelq : variable label `out'
|
784 |
+
local varhead "`varhead'& `labelq'" //this is the label for columns
|
785 |
+
|
786 |
+
pdslasso `out' patient_info patient_voucher doctor_voucher pat_infoXpat_voucher pat_infoXdoc_voucher ($date $patient) `if', clu(`cluvar') partial(`partial')
|
787 |
+
|
788 |
+
test patient_voucher = doctor_voucher
|
789 |
+
local n1= r(p)
|
790 |
+
local star ""
|
791 |
+
if `n1'<=.01 local star "\sym{***}"
|
792 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
793 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
794 |
+
local n2 = trim("`: display %10.3f `n1''")
|
795 |
+
local combo "`n2'`star'"
|
796 |
+
estadd local p_NoVPVDV `combo'
|
797 |
+
|
798 |
+
qui sum `out' if e(sample) & patient_info +doctor_voucher + patient_voucher ==0
|
799 |
+
estadd scalar noPInoVoucher=r(mean)
|
800 |
+
|
801 |
+
estadd local space=""
|
802 |
+
est store E`ester'
|
803 |
+
local eststr`counter' "`eststr`counter'' E`ester'"
|
804 |
+
local paren`counter' "`paren`counter'' & (`ester')" // column numbers
|
805 |
+
local ++ester
|
806 |
+
}
|
807 |
+
local ++counter
|
808 |
+
|
809 |
+
} //end qui loop
|
810 |
+
* FIRST PANEL
|
811 |
+
esttab `eststr1' using "`table'", keep(patient_info) label noabbrev `type' replace nogaps nomtit nonum ///
|
812 |
+
stats(space control_PI, fmt( 0 0) labels(" " "\enspace Mean (No PI)\textcolor{white}{XXXXXXXXXXXXXXX}")) ///
|
813 |
+
nonote star(* 0.10 ** 0.05 *** 0.01) `extrac1' ///
|
814 |
+
b(a2) se(a2) noline subs("\beta\_" "\beta_") ///
|
815 |
+
prehead("\begin{table}[ht!] \begin{adjustbox}{max width=`texwid'\textwidth} \begin{threeparttable} \caption{`title'} \label{`label'} {\begin{tabular}{l*{`colcount'}{C{`widc'}}} \toprule \toprule `paren1' `extrahead' \\ `varhead' `extravarhead' \\ \toprule \multicolumn{`colcount'}{l}{`headz1'} \\")
|
816 |
+
* SECOND PANEL
|
817 |
+
esttab `eststr2' using "`table'", append keep(patient_info patient_voucher doctor_voucher pat_infoXpat_voucher pat_infoXdoc_voucher) ///
|
818 |
+
label noabbrev `type' nogaps nomtit nonum ///
|
819 |
+
stats(space p_NoVPVDV space noPInoVoucher N, fmt(0 0 0 a3 a0) ///
|
820 |
+
labels("\enspace \emph{P-Values}" "\enspace \enspace Patient Voucher=Doctor Voucher" " " "\enspace Mean (No PI, No Voucher)" "\enspace N")) ///
|
821 |
+
nonote eqlabels(none) star(* 0.10 ** 0.05 *** 0.01) `extrac2' ///
|
822 |
+
b(a2) se(a2) noline subs("\beta\_" "\beta_") ///
|
823 |
+
prehead("{ \begin{tabular}{l*{8}{C{`widc'}}} \\ \multicolumn{`colcount'}{l}{`headz`q''} \\") ///
|
824 |
+
postfoot(\hline \end{tabular} } \begin{tablenotes}[flushleft] \small \item `footnote' \end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table})
|
825 |
+
end
|
826 |
+
|
827 |
+
|
828 |
+
|
829 |
+
**************************************************************************************************************
|
830 |
+
* table that looks at impact of patient information
|
831 |
+
**************************************************************************************************************
|
832 |
+
cap prog drop docpat_pat_lso
|
833 |
+
prog define docpat_pat_lso
|
834 |
+
est clear
|
835 |
+
syntax varlist [if], TEXWID(string) [Table(string)] [TYPE(string)] [FOOTnote(string)] [PREHEAD1(string)] ///
|
836 |
+
[PREHEAD2(string)] [TITLE(string)] [LABel(string)] WIDC(string) [EXTRAC1(string)] [EXTRAC2(string)] ///
|
837 |
+
[EXTRAHEAD(string)] [EXTRAVARHead(string)] CLUVar(string) [PARTIAL(string)] LCONT(string)
|
838 |
+
|
839 |
+
qui {
|
840 |
+
|
841 |
+
local q= 2
|
842 |
+
local colcount= wordcount("`varlist'")+1
|
843 |
+
local seclast= `q'-1
|
844 |
+
|
845 |
+
// locals to assist in making the table
|
846 |
+
local ester=1
|
847 |
+
forval i=1/`q' {
|
848 |
+
local eststr`i' ""
|
849 |
+
}
|
850 |
+
|
851 |
+
// label covariates
|
852 |
+
la var patient_voucher "\enspace Patient Voucher"
|
853 |
+
la var doctor_voucher "\enspace Doctor Voucher"
|
854 |
+
la var patient_info "\enspace Patient Information"
|
855 |
+
la var doctor_voucher_x_patient_info "\enspace Doctor Voucher $\times$ Patient Information"
|
856 |
+
la var patient_voucher_x_patient_info "\enspace Patient Voucher $\times$ Patient Information"
|
857 |
+
|
858 |
+
local counter=1
|
859 |
+
|
860 |
+
local varhead ""
|
861 |
+
local paren`counter' ""
|
862 |
+
foreach out in `varlist' {
|
863 |
+
|
864 |
+
// GET LABELS HERE
|
865 |
+
local headz`counter' "\emph{Panel B. By Voucher Treatment Group}" // this is the label for panels
|
866 |
+
local labelq : variable label `out'
|
867 |
+
local varhead "`varhead'& `labelq'" //this is the label for columns
|
868 |
+
|
869 |
+
pdslasso `out' patient_info patient_voucher doctor_voucher patient_voucher_x_patient_info doctor_voucher_x_patient_info ($date $patient) `if', clu(`cluvar') partial(`partial')
|
870 |
+
|
871 |
+
test patient_voucher = doctor_voucher
|
872 |
+
local n1= r(p)
|
873 |
+
local star ""
|
874 |
+
if `n1'<=.01 local star "\sym{***}"
|
875 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
876 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
877 |
+
local n2 = trim("`: display %10.3f `n1''")
|
878 |
+
local combo "`n2'`star'"
|
879 |
+
estadd local p_NoVPVDV `combo'
|
880 |
+
|
881 |
+
qui sum `out' if e(sample) & patient_info +doctor_voucher + patient_voucher ==0
|
882 |
+
estadd scalar noPInoVoucher=r(mean)
|
883 |
+
|
884 |
+
estadd local space=""
|
885 |
+
est store E`ester'
|
886 |
+
local eststr`counter' "`eststr`counter'' E`ester'"
|
887 |
+
local paren`counter' "`paren`counter'' & (`ester')" // column numbers
|
888 |
+
local ++ester
|
889 |
+
}
|
890 |
+
local ++counter
|
891 |
+
|
892 |
+
} //end qui loop
|
893 |
+
* FIRST PANEL
|
894 |
+
esttab `eststr1' using "`table'", replace keep(patient_info patient_voucher doctor_voucher patient_voucher_x_patient_info doctor_voucher_x_patient_info ) ///
|
895 |
+
label noabbrev `type' nogaps nomtit nonum ///
|
896 |
+
stats(space noPInoVoucher N, fmt(0 a3 a0) ///
|
897 |
+
labels(" " "\enspace Mean (No PI, No Voucher)" "\enspace N")) ///
|
898 |
+
nonote eqlabels(none) star(* 0.10 ** 0.05 *** 0.01) `extrac1' ///
|
899 |
+
b(a2) se(a2) noline subs("\beta\_" "\beta_") ///
|
900 |
+
prehead("\begin{table}[h!] \begin{adjustbox}{max width=`texwid'\textwidth} \begin{threeparttable} \caption{`title'} \label{`label'} {\begin{tabular}{l*{`colcount'}{C{`widc'}}} \toprule \toprule `paren1' `extrahead' \\ `varhead' `extravarhead' \\ \toprule ") ///
|
901 |
+
postfoot(\hline \end{tabular} } \begin{tablenotes}[flushleft] \small \item `footnote' \end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table})
|
902 |
+
end
|
903 |
+
|
904 |
+
|
905 |
+
**************************************************************************************************************
|
906 |
+
* table that looks at impact of doctor information
|
907 |
+
**************************************************************************************************************
|
908 |
+
cap prog drop docpat_doc_lso
|
909 |
+
prog define docpat_doc_lso
|
910 |
+
est clear
|
911 |
+
syntax varlist [if], TEXWID(string) [Table(string)] [TYPE(string)] [FOOTnote(string)] [PREHEAD1(string)] ///
|
912 |
+
[PREHEAD2(string)] [TITLE(string)] [LABel(string)] WIDC(string) [EXTRAC1(string)] [EXTRAC2(string)] ///
|
913 |
+
[EXTRAHEAD(string)] [EXTRAVARHead(string)] CLUVar(string) [PARTIAL(string)] LCONT(string)
|
914 |
+
|
915 |
+
qui {
|
916 |
+
|
917 |
+
local q= 2
|
918 |
+
local colcount= wordcount("`varlist'")+1
|
919 |
+
local seclast= `q'-1
|
920 |
+
|
921 |
+
// locals to assist in making the table
|
922 |
+
local ester=1
|
923 |
+
forval i=1/`q' {
|
924 |
+
local eststr`i' ""
|
925 |
+
}
|
926 |
+
|
927 |
+
// label covariates
|
928 |
+
la var patient_voucher "\enspace Patient Voucher"
|
929 |
+
la var doctor_voucher "\enspace Doctor Voucher"
|
930 |
+
la var infotreat "\enspace Doctor Information"
|
931 |
+
la var doctor_voucher_x_doctor_info "\enspace Doctor Voucher $\times$ Doctor Information"
|
932 |
+
la var patient_voucher_x_doctor_info "\enspace Patient Voucher $\times$ Doctor Information"
|
933 |
+
|
934 |
+
local counter=1
|
935 |
+
|
936 |
+
local varhead ""
|
937 |
+
local paren`counter' ""
|
938 |
+
foreach out in `varlist' {
|
939 |
+
|
940 |
+
// GET LABELS HERE
|
941 |
+
local labelq : variable label `out'
|
942 |
+
local varhead "`varhead'& `labelq'" //this is the label for columns
|
943 |
+
|
944 |
+
pdslasso `out' infotreat patient_voucher doctor_voucher patient_voucher_x_doctor_info doctor_voucher_x_doctor_info ($date $patient) `if', clu(`cluvar') partial(`partial')
|
945 |
+
|
946 |
+
test patient_voucher = doctor_voucher
|
947 |
+
local n1= r(p)
|
948 |
+
local star ""
|
949 |
+
if `n1'<=.01 local star "\sym{***}"
|
950 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
951 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
952 |
+
local n2 = trim("`: display %10.3f `n1''")
|
953 |
+
local combo "`n2'`star'"
|
954 |
+
estadd local p_NoVPVDV `combo'
|
955 |
+
|
956 |
+
qui sum `out' if e(sample) & infotreat +doctor_voucher + patient_voucher ==0
|
957 |
+
local noDInoVoucher: display %7.3f `r(mean)'
|
958 |
+
estadd local noDInoVoucher `noDInoVoucher'
|
959 |
+
|
960 |
+
est store E`ester'
|
961 |
+
local eststr`counter' "`eststr`counter'' E`ester'"
|
962 |
+
local paren`counter' "`paren`counter'' & (`ester')" // column numbers
|
963 |
+
local ++ester
|
964 |
+
}
|
965 |
+
local ++counter
|
966 |
+
|
967 |
+
} //end qui loop
|
968 |
+
* FIRST PANEL
|
969 |
+
esttab `eststr1' using "`table'", replace keep(infotreat patient_voucher doctor_voucher patient_voucher_x_doctor_info doctor_voucher_x_doctor_info) ///
|
970 |
+
label noabbrev `type' nogaps nomtit nonum ///
|
971 |
+
stats(space noDInoVoucher N, fmt(0 a3 a0) ///
|
972 |
+
labels(" " "\enspace Mean (No DI, No Voucher)" "\enspace N")) ///
|
973 |
+
nonote eqlabels(none) star(* 0.10 ** 0.05 *** 0.01) `extrac1' ///
|
974 |
+
b(a2) se(a2) noline subs("\beta\_" "\beta_") ///
|
975 |
+
prehead("\begin{table}[h!] \begin{adjustbox}{max width=`texwid'\textwidth} \begin{threeparttable} \caption{`title'} \label{`label'} {\begin{tabular}{l*{`colcount'}{C{`widc'}}} \toprule \toprule `paren1' `extrahead' \\ `varhead' `extravarhead' \\ \toprule ") ///
|
976 |
+
postfoot(\hline \end{tabular} } \begin{tablenotes}[flushleft] \small \item `footnote' \end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table})
|
977 |
+
end
|
978 |
+
|
979 |
+
|
980 |
+
|
981 |
+
**************************************************************************************************************
|
982 |
+
* ROBUSTNESS: main table w/ theory-driven tests (no lasso)
|
983 |
+
**************************************************************************************************************
|
984 |
+
cap prog drop docpat_p1_theory
|
985 |
+
prog define docpat_p1_theory
|
986 |
+
est clear
|
987 |
+
syntax varlist [if], TEXWID(string) [Table(string)] [EXtra(varlist)] [TYPE(string)] [FOOTnote(string)] [PREHEAD1(string)] ///
|
988 |
+
[PREHEAD2(string)] [TITLE(string)] [LABel(string)] WIDC(string) [EXTRAC1(string)] [EXTRAC2(string)] ///
|
989 |
+
[EXTRAHEAD(string)] [EXTRAVARHead(string)] CLUVar(string) TESTOF(string) SIGNIFEVIDENCE(string)
|
990 |
+
|
991 |
+
qui {
|
992 |
+
|
993 |
+
|
994 |
+
local q= 2
|
995 |
+
local colcount= wordcount("`varlist'")+1
|
996 |
+
local seclast= `q'-1
|
997 |
+
|
998 |
+
// locals to assist in making the table
|
999 |
+
local ester=1
|
1000 |
+
forval i=1/`q' {
|
1001 |
+
local eststr`i' ""
|
1002 |
+
}
|
1003 |
+
|
1004 |
+
// label covariates
|
1005 |
+
la var patient_voucher "$\beta_P$: Patient Voucher"
|
1006 |
+
la var doctor_voucher "$\beta_D$: Doctor Voucher"
|
1007 |
+
local counter=1
|
1008 |
+
|
1009 |
+
local varhead ""
|
1010 |
+
local paren`counter' ""
|
1011 |
+
local outcount=1
|
1012 |
+
foreach out in `varlist' {
|
1013 |
+
|
1014 |
+
// GET LABELS HERE
|
1015 |
+
local labelq : variable label `out'
|
1016 |
+
local varhead "`varhead'& `labelq'" //this is the label for columns
|
1017 |
+
|
1018 |
+
reg `out' patient_voucher doctor_voucher `extra' `if', clu(`cluvar')
|
1019 |
+
|
1020 |
+
test patient_voucher=doctor_voucher
|
1021 |
+
local n1= r(p)
|
1022 |
+
local star ""
|
1023 |
+
if `n1'<=.01 local star "\sym{***}"
|
1024 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
1025 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
1026 |
+
local n2 = trim("`: display %10.3f `n1''")
|
1027 |
+
local combo "`n2'`star'"
|
1028 |
+
estadd local p_PVDV `combo'
|
1029 |
+
|
1030 |
+
local sign = sign(_b[patient_voucher]-_b[doctor_voucher])
|
1031 |
+
local n1= ttail(r(df_r),`sign'*sqrt(r(F)))
|
1032 |
+
local star ""
|
1033 |
+
if `n1'<=.01 local star "\sym{***}"
|
1034 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
1035 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
1036 |
+
local n2 = trim("`: display %10.3f `n1''")
|
1037 |
+
local combo "`n2'`star'"
|
1038 |
+
tokenize `oneside'
|
1039 |
+
if "``outcount''"=="ge" local p_one "`combo'"
|
1040 |
+
|
1041 |
+
local n1= 1-ttail(r(df_r),`sign'*sqrt(r(F)))
|
1042 |
+
local star ""
|
1043 |
+
if `n1'<=.01 local star "\sym{***}"
|
1044 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
1045 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
1046 |
+
local n2 = trim("`: display %10.3f `n1''")
|
1047 |
+
local combo "`n2'`star'"
|
1048 |
+
tokenize `oneside'
|
1049 |
+
if "``outcount''"=="le" local p_one "`combo'"
|
1050 |
+
|
1051 |
+
estadd local p_oneside `p_one'
|
1052 |
+
|
1053 |
+
test patient_voucher=doctor_voucher=0
|
1054 |
+
local n1= r(p)
|
1055 |
+
local star ""
|
1056 |
+
if `n1'<=.01 local star "\sym{***}"
|
1057 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
1058 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
1059 |
+
local n2 = trim("`: display %10.3f `n1''")
|
1060 |
+
local combo "`n2'`star'"
|
1061 |
+
estadd local p_PVDV0 `combo'
|
1062 |
+
|
1063 |
+
qui sum `out' if e(sample) & doctor_voucher+patient_voucher==0
|
1064 |
+
|
1065 |
+
|
1066 |
+
local DV: display %7.3f `r(mean)'
|
1067 |
+
estadd local DV `DV'
|
1068 |
+
|
1069 |
+
tokenize `testof'
|
1070 |
+
estadd local test_of "``outcount''"
|
1071 |
+
|
1072 |
+
tokenize `signifevidence'
|
1073 |
+
estadd local signif_evidence "``outcount''"
|
1074 |
+
|
1075 |
+
est store E`ester'
|
1076 |
+
local eststr`counter' "`eststr`counter'' E`ester'"
|
1077 |
+
local paren`counter' "`paren`counter'' & (`ester')" // column numbers
|
1078 |
+
local ++ester
|
1079 |
+
local ++outcount
|
1080 |
+
}
|
1081 |
+
local ++counter
|
1082 |
+
} //end qui loop
|
1083 |
+
* FIRST PANEL
|
1084 |
+
esttab `eststr1' using "`table'", keep(patient_voucher doctor_voucher) label noabbrev `type' replace nogaps nomtit nonum ///
|
1085 |
+
stats(space p_PVDV test_of signif_evidence space DV N, fmt(0 0 0 0 0 a3 a0) labels("\emph{P-values and theory-driven tests}" "\enspace $\beta_P=\beta_D$" "\enspace Test for mechanism:" "\enspace Significant evidence of mechanism:" " " "Mean (Control)" "N")) ///
|
1086 |
+
nonote star(* 0.10 ** 0.05 *** 0.01) `extrac1' ///
|
1087 |
+
b(a2) se(a2) noline subs("\beta\_" "\beta_") ///
|
1088 |
+
prehead("\begin{table}[ht!] \begin{adjustbox}{max width=`texwid'\textwidth} \begin{threeparttable} \caption{`title'} \label{`label'} {\begin{tabular}{l*{`colcount'}{C{`widc'}}} \toprule \toprule `paren1' `extrahead' \\ `varhead' `extravarhead' \\ \toprule ") ///
|
1089 |
+
postfoot(\hline \end{tabular} } \begin{tablenotes}[flushleft] \small \item `footnote' \end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table})
|
1090 |
+
end
|
1091 |
+
|
1092 |
+
|
1093 |
+
|
1094 |
+
|
1095 |
+
**************************************************************************************************************
|
1096 |
+
* ROBUSTNESS: het effects table w/ theory-driven tests (no lasso)
|
1097 |
+
**************************************************************************************************************
|
1098 |
+
cap prog drop docpat_hettable_theory
|
1099 |
+
prog define docpat_hettable_theory
|
1100 |
+
est clear
|
1101 |
+
syntax varlist [if], TEXWID(string) [Table(string)] [EXtra(varlist)] [TYPE(string)] [FOOTnote(string)] [PREHEAD1(string)] ///
|
1102 |
+
[PREHEAD2(string)] [TITLE(string)] [LABel(string)] WIDC(string) [EXTRAC(string)] [PARTIAL(string)] ///
|
1103 |
+
[EXTRAHEAD(string)] [EXTRAVARHead(string)] CLUVar(string) TESTOFH(string) SIGNIFEVIDENCEH(string) TESTOFL(string) SIGNIFEVIDENCEL(string) ///
|
1104 |
+
DODO(string) PATH(string) SETNAME(string) NUMReps(string)
|
1105 |
+
|
1106 |
+
qui {
|
1107 |
+
|
1108 |
+
preserve
|
1109 |
+
|
1110 |
+
local q= 2
|
1111 |
+
local colcount= wordcount("`varlist'")+1
|
1112 |
+
local seclast= `q'-1
|
1113 |
+
|
1114 |
+
// locals to assist in making the table
|
1115 |
+
local ester=1
|
1116 |
+
forval i=1/`q' {
|
1117 |
+
local eststr`i' ""
|
1118 |
+
}
|
1119 |
+
|
1120 |
+
// label covariates
|
1121 |
+
la var patient_voucher_high "$\delta_{PH}$: Patient Voucher $\times$ High Risk"
|
1122 |
+
la var doctor_voucher_high "$\delta_{DH}$: Doctor Voucher $\times$ High Risk"
|
1123 |
+
la var patient_voucher_low "$\delta_{PL}$: Patient Voucher $\times$ Low Risk"
|
1124 |
+
la var doctor_voucher_low "$\delta_{DL}$: Doctor Voucher $\times$ Low Risk"
|
1125 |
+
la var above_med_pos "$\theta$: High Malaria Risk"
|
1126 |
+
local counter=1
|
1127 |
+
local varhead ""
|
1128 |
+
local paren`counter' ""
|
1129 |
+
local outcount=1
|
1130 |
+
tempfile theuser
|
1131 |
+
save `theuser'
|
1132 |
+
foreach out in `varlist' {
|
1133 |
+
drop _all
|
1134 |
+
use `theuser'
|
1135 |
+
|
1136 |
+
// GET LABELS HERE
|
1137 |
+
local labelq : variable label `out'
|
1138 |
+
local varhead "`varhead'& `labelq'" //this is the label for columns
|
1139 |
+
|
1140 |
+
// bootstrap this thing
|
1141 |
+
boot_ols reg `out' patient_voucher_high doctor_voucher_high patient_voucher_low doctor_voucher_low above_med_pos `extrac' `if', reppath(`path') repname(`setname') num(`numreps') dofirst(`dodo')
|
1142 |
+
|
1143 |
+
* NB: recalculate p-values to be based on asymptotic inference
|
1144 |
+
* code written so we use asymptotics for both one and two-sided tests
|
1145 |
+
test patient_voucher_high = doctor_voucher_high
|
1146 |
+
local n1= 2*(1-normal(sqrt(r(F))))
|
1147 |
+
local star ""
|
1148 |
+
if `n1'<=.01 local star "\sym{***}"
|
1149 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
1150 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
1151 |
+
local n2 = trim("`: display %10.3f `n1''")
|
1152 |
+
local combo "`n2'`star'"
|
1153 |
+
estadd local p_PVDVhigh `combo'
|
1154 |
+
|
1155 |
+
local sign = sign(_b[patient_voucher_high]-_b[doctor_voucher_high])
|
1156 |
+
local n1= 1-normal(`sign'*sqrt(r(F)))
|
1157 |
+
|
1158 |
+
local star ""
|
1159 |
+
if `n1'<=.01 local star "\sym{***}"
|
1160 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
1161 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
1162 |
+
local n2 = trim("`: display %10.3f `n1''")
|
1163 |
+
local combo "`n2'`star'"
|
1164 |
+
tokenize `oneside'
|
1165 |
+
if "``outcount''"=="ge" local p_one_high "`combo'"
|
1166 |
+
|
1167 |
+
local n1= normal(`sign'*sqrt(r(F)))
|
1168 |
+
local star ""
|
1169 |
+
if `n1'<=.01 local star "\sym{***}"
|
1170 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
1171 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
1172 |
+
local n2 = trim("`: display %10.3f `n1''")
|
1173 |
+
local combo "`n2'`star'"
|
1174 |
+
tokenize `oneside'
|
1175 |
+
if "``outcount''"=="le" local p_one_high "`combo'"
|
1176 |
+
|
1177 |
+
test patient_voucher_low = doctor_voucher_low
|
1178 |
+
local n1= 2*(1-normal(sqrt(r(F))))
|
1179 |
+
local star ""
|
1180 |
+
if `n1'<=.01 local star "\sym{***}"
|
1181 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
1182 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
1183 |
+
local n2 = trim("`: display %10.3f `n1''")
|
1184 |
+
local combo "`n2'`star'"
|
1185 |
+
estadd local p_PVDVlow `combo'
|
1186 |
+
|
1187 |
+
local sign = sign(_b[patient_voucher_low]-_b[doctor_voucher_low])
|
1188 |
+
local n1= 1-normal(`sign'*sqrt(r(F)))
|
1189 |
+
local star ""
|
1190 |
+
if `n1'<=.01 local star "\sym{***}"
|
1191 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
1192 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
1193 |
+
local n2 = trim("`: display %10.3f `n1''")
|
1194 |
+
local combo "`n2'`star'"
|
1195 |
+
tokenize `oneside'
|
1196 |
+
if "``outcount''"=="ge" local p_one_low "`combo'"
|
1197 |
+
|
1198 |
+
local n1= normal(`sign'*sqrt(r(F)))
|
1199 |
+
local star ""
|
1200 |
+
if `n1'<=.01 local star "\sym{***}"
|
1201 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
1202 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
1203 |
+
local n2 = trim("`: display %10.3f `n1''")
|
1204 |
+
local combo "`n2'`star'"
|
1205 |
+
tokenize `oneside'
|
1206 |
+
if "``outcount''"=="le" local p_one_low "`combo'"
|
1207 |
+
|
1208 |
+
* CHECK THIS
|
1209 |
+
qui sum `out' if doctor_voucher + patient_voucher ==0 & above_med_pos==0
|
1210 |
+
|
1211 |
+
local DV: display %7.3f `r(mean)'
|
1212 |
+
estadd local DV `DV'
|
1213 |
+
|
1214 |
+
tokenize `testofh'
|
1215 |
+
estadd local test_of_h "``outcount''"
|
1216 |
+
tokenize `signifevidenceh'
|
1217 |
+
estadd local signif_evidence_h "``outcount''"
|
1218 |
+
|
1219 |
+
tokenize `testofl'
|
1220 |
+
estadd local test_of_l "``outcount''"
|
1221 |
+
tokenize `signifevidencel'
|
1222 |
+
estadd local signif_evidence_l "``outcount''"
|
1223 |
+
|
1224 |
+
|
1225 |
+
est store E`ester'
|
1226 |
+
local eststr`counter' "`eststr`counter'' E`ester'"
|
1227 |
+
local paren`counter' "`paren`counter'' & (`ester')" // column numbers
|
1228 |
+
local ++ester
|
1229 |
+
local ++outcount
|
1230 |
+
}
|
1231 |
+
local ++counter
|
1232 |
+
} //end qui loop
|
1233 |
+
* FIRST PANEL
|
1234 |
+
esttab `eststr1' using "`table'", keep(patient_voucher_high doctor_voucher_high patient_voucher_low doctor_voucher_low above_med_pos) label noabbrev `type' replace nogaps nomtit nonum ///
|
1235 |
+
stats(space p_PVDVhigh test_of_h signif_evidence_h space p_PVDVlow test_of_l signif_evidence_l space DV N, fmt(0 0 0 0 0 0 0 0 0 a2 a0) labels("\emph{P-values and theory-driven tests}" "\enspace $\delta_{PH}=\delta_{DH}$" "\enspace Test for mechanism:" "\enspace Significant evidence of mechanism:" " " "\enspace $\delta_{PL}=\delta_{DL}$" "\enspace Test for mechanism:" "\enspace Significant evidence of mechanism:" " " "Mean (Control, Low Risk)" "N")) ///
|
1236 |
+
nonote star(* 0.10 ** 0.05 *** 0.01) `extrac1' ///
|
1237 |
+
b(a2) se(a2) noline subs("\beta\_" "\beta_") ///
|
1238 |
+
prehead("\begin{table}[ht!] \begin{adjustbox}{max width=`texwid'\textwidth} \begin{threeparttable} \caption{`title'} \label{`label'} {\begin{tabular}{l*{`colcount'}{C{`widc'}}} \toprule \toprule `paren1' `extrahead' \\ `varhead' `extravarhead' \\ \toprule ") ///
|
1239 |
+
postfoot(\hline \end{tabular} } \begin{tablenotes}[flushleft] \small \item `footnote' \end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table})
|
1240 |
+
|
1241 |
+
restore
|
1242 |
+
end
|
1243 |
+
|
1244 |
+
**************************************************************************************************************
|
1245 |
+
* TABLE FOR ANTIBIOTICS
|
1246 |
+
**************************************************************************************************************
|
1247 |
+
cap prog drop docpat_hettable_lso
|
1248 |
+
prog define docpat_hettable_lso
|
1249 |
+
est clear
|
1250 |
+
syntax varlist [if], TEXWID(string) [Table(string)] [TYPE(string)] [FOOTnote(string)] [PREHEAD1(string)] PATH(string) SETNAME(string) ///
|
1251 |
+
[PREHEAD2(string)] [TITLE(string)] [LABel(string)] WIDC(string) [EXTRAC1(string)] [EXTRAC2(string)] [PARTIAL(string)] ///
|
1252 |
+
[EXTRAHEAD(string)] [EXTRAVARHead(string)] CLUVar(string) ///
|
1253 |
+
NUMreps(integer) DODO(string) LCONT(string)
|
1254 |
+
|
1255 |
+
|
1256 |
+
qui {
|
1257 |
+
|
1258 |
+
preserve
|
1259 |
+
|
1260 |
+
local q= 2
|
1261 |
+
local colcount= wordcount("`varlist'")+1
|
1262 |
+
local seclast= `q'-1
|
1263 |
+
|
1264 |
+
// locals to assist in making the table
|
1265 |
+
local ester=1
|
1266 |
+
forval i=1/`q' {
|
1267 |
+
local eststr`i' ""
|
1268 |
+
}
|
1269 |
+
|
1270 |
+
// label covariates
|
1271 |
+
la var patient_voucher_high "$\delta_{PH}$: Patient Voucher $\times$ High Risk"
|
1272 |
+
la var doctor_voucher_high "$\delta_{DH}$: Doctor Voucher $\times$ High Risk"
|
1273 |
+
la var patient_voucher_low "$\delta_{PL}$: Patient Voucher $\times$ Low Risk"
|
1274 |
+
la var doctor_voucher_low "$\delta_{DL}$: Doctor Voucher $\times$ Low Risk"
|
1275 |
+
la var above_med_pos "$\theta$: High Malaria Risk"
|
1276 |
+
local counter=1
|
1277 |
+
|
1278 |
+
local varhead ""
|
1279 |
+
local paren`counter' ""
|
1280 |
+
local outcount=1
|
1281 |
+
tempfile theuser
|
1282 |
+
save `theuser'
|
1283 |
+
foreach out in `varlist' {
|
1284 |
+
drop _all
|
1285 |
+
use `theuser'
|
1286 |
+
|
1287 |
+
// GET LABELS HERE
|
1288 |
+
local labelq : variable label `out'
|
1289 |
+
local varhead "`varhead'& `labelq'" //this is the label for columns
|
1290 |
+
|
1291 |
+
// step 1 :: select covariates using PDS lasso
|
1292 |
+
pdslasso `out' patient_voucher_high doctor_voucher_high patient_voucher_low doctor_voucher_low above_med_pos (`lcont') `if', clu(`cluvar') partial(`partial')
|
1293 |
+
local totcont= "`e(xselected)' `e(xpartial)'"
|
1294 |
+
|
1295 |
+
|
1296 |
+
// step 2 :: bootstrap this thing
|
1297 |
+
boot_ols reg `out' patient_voucher_high doctor_voucher_high patient_voucher_low doctor_voucher_low above_med_pos `totcont' `if', reppath(`path') repname(`setname') num(`numreps') dofirst(`dodo')
|
1298 |
+
* NB: since this is bootstrapping after double post lasso, recalculate p-values to be based on asymptotic inference
|
1299 |
+
* this ensures that we use asymptotics for both one and two-sided tests
|
1300 |
+
test patient_voucher_high = doctor_voucher_high
|
1301 |
+
local n1= 2*(1-normal(sqrt(r(F))))
|
1302 |
+
local star ""
|
1303 |
+
if `n1'<=.01 local star "\sym{***}"
|
1304 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
1305 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
1306 |
+
local n2 = trim("`: display %10.3f `n1''")
|
1307 |
+
local combo "`n2'`star'"
|
1308 |
+
estadd local p_PVDVhigh `combo'
|
1309 |
+
|
1310 |
+
local sign = sign(_b[patient_voucher_high]-_b[doctor_voucher_high])
|
1311 |
+
local n1= 1-normal(`sign'*sqrt(r(F)))
|
1312 |
+
|
1313 |
+
local star ""
|
1314 |
+
if `n1'<=.01 local star "\sym{***}"
|
1315 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
1316 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
1317 |
+
local n2 = trim("`: display %10.3f `n1''")
|
1318 |
+
local combo "`n2'`star'"
|
1319 |
+
tokenize `oneside'
|
1320 |
+
if "``outcount''"=="ge" local p_one_high "`combo'"
|
1321 |
+
|
1322 |
+
local n1= normal(`sign'*sqrt(r(F)))
|
1323 |
+
local star ""
|
1324 |
+
if `n1'<=.01 local star "\sym{***}"
|
1325 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
1326 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
1327 |
+
local n2 = trim("`: display %10.3f `n1''")
|
1328 |
+
local combo "`n2'`star'"
|
1329 |
+
tokenize `oneside'
|
1330 |
+
if "``outcount''"=="le" local p_one_high "`combo'"
|
1331 |
+
|
1332 |
+
test patient_voucher_low = doctor_voucher_low
|
1333 |
+
local n1= 2*(1-normal(sqrt(r(F))))
|
1334 |
+
local star ""
|
1335 |
+
if `n1'<=.01 local star "\sym{***}"
|
1336 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
1337 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
1338 |
+
local n2 = trim("`: display %10.3f `n1''")
|
1339 |
+
local combo "`n2'`star'"
|
1340 |
+
estadd local p_PVDVlow `combo'
|
1341 |
+
|
1342 |
+
local sign = sign(_b[patient_voucher_low]-_b[doctor_voucher_low])
|
1343 |
+
local n1= 1-normal(`sign'*sqrt(r(F)))
|
1344 |
+
local star ""
|
1345 |
+
if `n1'<=.01 local star "\sym{***}"
|
1346 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
1347 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
1348 |
+
local n2 = trim("`: display %10.3f `n1''")
|
1349 |
+
local combo "`n2'`star'"
|
1350 |
+
tokenize `oneside'
|
1351 |
+
if "``outcount''"=="ge" local p_one_low "`combo'"
|
1352 |
+
|
1353 |
+
local n1= normal(`sign'*sqrt(r(F)))
|
1354 |
+
local star ""
|
1355 |
+
if `n1'<=.01 local star "\sym{***}"
|
1356 |
+
if `n1'>.01 & `n1'<=.05 local star "\sym{**}"
|
1357 |
+
if `n1'>.05 & `n1'<=.1 local star "\sym{*}"
|
1358 |
+
local n2 = trim("`: display %10.3f `n1''")
|
1359 |
+
local combo "`n2'`star'"
|
1360 |
+
tokenize `oneside'
|
1361 |
+
if "``outcount''"=="le" local p_one_low "`combo'"
|
1362 |
+
|
1363 |
+
|
1364 |
+
qui sum `out' if e(sample) & doctor_voucher + patient_voucher ==0 & above_med_pos==0
|
1365 |
+
|
1366 |
+
local DV: display %7.3f `r(mean)'
|
1367 |
+
estadd local DV `DV'
|
1368 |
+
|
1369 |
+
tokenize `testofhigh'
|
1370 |
+
estadd local test_of_high "``outcount''"
|
1371 |
+
tokenize `testoflow'
|
1372 |
+
estadd local test_of_low "``outcount''"
|
1373 |
+
estadd local p_one_high `p_one_high'
|
1374 |
+
estadd local p_one_low `p_one_low'
|
1375 |
+
|
1376 |
+
est store E`ester'
|
1377 |
+
local eststr`counter' "`eststr`counter'' E`ester'"
|
1378 |
+
local paren`counter' "`paren`counter'' & (`ester')" // column numbers
|
1379 |
+
local ++ester
|
1380 |
+
local ++outcount
|
1381 |
+
}
|
1382 |
+
local ++counter
|
1383 |
+
} //end qui loop
|
1384 |
+
* FIRST PANEL
|
1385 |
+
esttab `eststr1' using "`table'", keep(patient_voucher_high doctor_voucher_high patient_voucher_low doctor_voucher_low above_med_pos) label noabbrev `type' replace nogaps nomtit nonum ///
|
1386 |
+
stats(space p_PVDVhigh p_PVDVlow space DV N, fmt(0 0 0 0 a2 a0) labels("\emph{P-values}" "\enspace $\delta_{PH}=\delta_{DH}$" "\enspace $\delta_{PL}=\delta_{DL}$" " " "Mean (Control, Low Risk)" "N")) ///
|
1387 |
+
nonote star(* 0.10 ** 0.05 *** 0.01) `extrac1' ///
|
1388 |
+
b(a2) se(a2) noline subs("\beta\_" "\beta_") ///
|
1389 |
+
prehead("\begin{table}[ht!] \begin{adjustbox}{max width=`texwid'\textwidth} \begin{threeparttable} \caption{`title'} \label{`label'} {\begin{tabular}{l*{`colcount'}{C{`widc'}}} \toprule \toprule `paren1' `extrahead' \\ `varhead' `extravarhead' \\ \toprule ") ///
|
1390 |
+
postfoot(\hline \end{tabular} } \begin{tablenotes}[flushleft] \small \item `footnote' \end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table})
|
1391 |
+
restore
|
1392 |
+
end
|
21/replication_package/Do_Files/Stata admin files/LSS_config_stata.do
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*------------------------------------------------------------------------------
|
2 |
+
********************************************************************************
|
3 |
+
* Lopez, Sautmann, Schaner; AEJ Applied
|
4 |
+
********************************************************************************
|
5 |
+
|
6 |
+
** Install all Stata packages needed for replication.
|
7 |
+
** Based on: https://github.com/gslab-econ/template/blob/master/config/config_stata.do
|
8 |
+
|
9 |
+
------------------------------------------------------------------------------*/
|
10 |
+
|
11 |
+
|
12 |
+
clear all
|
13 |
+
set more off
|
14 |
+
|
15 |
+
program main
|
16 |
+
* *** Add required packages from SSC to this list ***
|
17 |
+
local ssc_packages "coefplot pdslasso estadd"
|
18 |
+
* *** Add required packages from SSC to this list ***
|
19 |
+
|
20 |
+
if !missing("`ssc_packages'") {
|
21 |
+
foreach pkg in `ssc_packages' {
|
22 |
+
* install using ssc, but avoid re-installing if already present
|
23 |
+
capture which `pkg'
|
24 |
+
if _rc == 111 {
|
25 |
+
dis "Installing `pkg'"
|
26 |
+
quietly ssc install `pkg', replace
|
27 |
+
}
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
* Install packages using net, but avoid re-installing if already present
|
32 |
+
capture which grc1leg
|
33 |
+
if _rc == 111 {
|
34 |
+
quietly cap ado uninstall grc1leg
|
35 |
+
quietly cap net install grc1leg, from("http://www.stata.com/users/vwiggins")
|
36 |
+
}
|
37 |
+
|
38 |
+
capture which st0085_2
|
39 |
+
if _rc == 111 {
|
40 |
+
quietly cap ado uninstall st0085_2
|
41 |
+
quietly cap net install st0085_2, from("http://www.stata-journal.com/software/sj14-2")
|
42 |
+
}
|
43 |
+
|
44 |
+
capture which st0594
|
45 |
+
if _rc == 111 {
|
46 |
+
quietly cap ado uninstall st0594
|
47 |
+
quietly cap net install st0594, from("http://www.stata-journal.com/software/sj20-1")
|
48 |
+
}
|
49 |
+
|
50 |
+
end
|
51 |
+
|
52 |
+
main
|
21/replication_package/Do_Files/Stata admin files/LSS_make_bootstrap_repsets.do
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
* *****************************************************
|
3 |
+
* PROGRAM: make_bootstrap_repsets
|
4 |
+
* PROGRAMMER: Simone Schaner
|
5 |
+
* DATE CREATED: 29 March 2019
|
6 |
+
* THIS FILE MAKES 1000 BOOTSTRAP REPLICATION DATASETS
|
7 |
+
* TO SPEED UP BOOTSTRAP CALCS IN MAIN PAPER
|
8 |
+
* PROCESS ::
|
9 |
+
* (1) sample 60 clinics w/ replacement
|
10 |
+
* (2) apply sample exclusion criteria
|
11 |
+
* (3) calculated predicted malaria positivity and
|
12 |
+
* associated variables
|
13 |
+
* (4) save replicant dataset
|
14 |
+
* *****************************************************
|
15 |
+
|
16 |
+
set seed 34645
|
17 |
+
local reps= 1000
|
18 |
+
local i=1
|
19 |
+
local k=1
|
20 |
+
use "$data_final/LSS_analysis_datasets_20201108.dta", clear
|
21 |
+
drop *pred_mal_pos*
|
22 |
+
drop above_med_pos above_med_pos_new below_med_pos below_med_pos_new
|
23 |
+
global predcont "symptomsscreening_1 symptomsscreening_2 symptomsscreening_3 symptomsscreening_4 symptomsscreening_5 symptomsscreening_6 symptomsscreening_7 daysillness99 agepatient under5 u5_age genderpatient pregnancy ethnic_bambara speak_french readwrite_fluent_french prischoolorless respondent"
|
24 |
+
global useme ""
|
25 |
+
foreach var in $predcont {
|
26 |
+
replace `var'=0 if MSS`var'==1
|
27 |
+
global useme "$useme `var' MSS`var'"
|
28 |
+
}
|
29 |
+
|
30 |
+
while `i'<=`reps' {
|
31 |
+
preserve
|
32 |
+
bsample 60, cluster(cscomnum)
|
33 |
+
keep if dropme==0
|
34 |
+
probit RDTresult_POS $useme , asis iter(1000)
|
35 |
+
if e(converged)==1 {
|
36 |
+
predict pred_mal_pos, p
|
37 |
+
qui sum pred_mal_pos, detail
|
38 |
+
g above_med_pos= pred_mal_pos>=r(p50) if pred_mal_pos!=.
|
39 |
+
g below_med_pos= above_med_pos==0 if above_med_pos!=.
|
40 |
+
la var above_med_pos "High Malaria Prob."
|
41 |
+
la var below_med_pos "Low Malaria Prob."
|
42 |
+
save "$data_final/_bootstrap/bs_cluCSCOM_`i'", replace
|
43 |
+
local ++i
|
44 |
+
}
|
45 |
+
di `k'
|
46 |
+
di `i'-1
|
47 |
+
local ++k
|
48 |
+
restore
|
49 |
+
}
|
50 |
+
|
51 |
+
|
21/replication_package/Do_Files/Tables/1_table_control_group.do
ADDED
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
preserve
|
3 |
+
|
4 |
+
keep if treatment=="C" | treatment=="PI"
|
5 |
+
|
6 |
+
* Varlists
|
7 |
+
gen cost_treat_simple=reported_totalcost if treat_simple_mal==1
|
8 |
+
gen cost_treat_severe=reported_totalcost if treat_severe_mal==1
|
9 |
+
gen cost_no_mal_treat=reported_totalcost if treat_sev_simple_mal==0
|
10 |
+
label var cost_treat_simple "Total Cost Simple Malaria (CFA)"
|
11 |
+
label var cost_treat_severe "Total Cost Severe Malaria (CFA)"
|
12 |
+
label var cost_no_mal_treat "Total Cost No Malaria Treatment (CFA)"
|
13 |
+
label var RXtreat_simple_mal "Simple Malaria Treatment: Prescribed"
|
14 |
+
label var treat_simple_mal "Simple Malaria Treatment: Purchased"
|
15 |
+
label var RXtreat_severe_mal "Severe Malaria Treatment: Prescribed"
|
16 |
+
label var treat_severe_mal "Severe Malaria Treatment: Purchased"
|
17 |
+
label var referral_observation "Patient Referred to Hospital or Placed Under Observation"
|
18 |
+
label var taking_treat_simple_mal "Taking Simple Malaria Treat"
|
19 |
+
label var antibiot "Purchased Antibiotics"
|
20 |
+
label var injection_IV "Received Injection or IV"
|
21 |
+
label var taking_treat_simple_mal "Taking Simple Malaria Treatment"
|
22 |
+
label var thinks_malaria "Respondent Suspects Illness is Malaria (Pre-Consultation)"
|
23 |
+
local varlist1_intro "thinks_malaria RXtreat_simple_mal treat_simple_mal RXtreat_severe_mal treat_severe_mal antibiot injection_IV referral_observation cost_no_mal_treat cost_treat_simple cost_treat_severe "
|
24 |
+
|
25 |
+
|
26 |
+
* Varlists
|
27 |
+
local v0= wordcount("`varlist1_intro'")
|
28 |
+
local totrow= `v0'
|
29 |
+
|
30 |
+
matrix table_control_group=J(`totrow',8,.)
|
31 |
+
|
32 |
+
loc f = 1
|
33 |
+
foreach var of local varlist1_intro{
|
34 |
+
|
35 |
+
local lbz: variable label `var'
|
36 |
+
local part`f' "\enspace `lbz' &"
|
37 |
+
|
38 |
+
* ALL SAMPLE
|
39 |
+
sum `var'
|
40 |
+
local mean: display %10.3f r(mean)
|
41 |
+
local N: display %9.0f r(N)
|
42 |
+
matrix table_control_group[`f',1] =`mean'
|
43 |
+
matrix table_control_group[`f',2] =`N'
|
44 |
+
|
45 |
+
* ALL PATIENTS WITH VALID TEST
|
46 |
+
sum `var' if RDTresult_NEG!=.
|
47 |
+
local mean: display %10.3f r(mean)
|
48 |
+
local N: display %9.0f r(N)
|
49 |
+
matrix table_control_group[`f',3] =`mean'
|
50 |
+
matrix table_control_group[`f',4] =`N'
|
51 |
+
|
52 |
+
* ALL PATIENTS WITH POSITIVE TEST
|
53 |
+
sum `var' if RDTresult_NEG==0
|
54 |
+
local mean: display %10.3f r(mean)
|
55 |
+
local N: display %9.0f r(N)
|
56 |
+
matrix table_control_group[`f',5] =`mean'
|
57 |
+
matrix table_control_group[`f',6] =`N'
|
58 |
+
|
59 |
+
* ALL PATIENTS WITH NEGATIVE TEST
|
60 |
+
sum `var' if RDTresult_NEG==1
|
61 |
+
local mean: display %10.3f r(mean)
|
62 |
+
local N: display %9.0f r(N)
|
63 |
+
matrix table_control_group[`f',7] =`mean'
|
64 |
+
matrix table_control_group[`f',8] =`N'
|
65 |
+
|
66 |
+
local f=`f'+1
|
67 |
+
|
68 |
+
}
|
69 |
+
|
70 |
+
drop _all
|
71 |
+
svmat table_control_group
|
72 |
+
|
73 |
+
g t0=""
|
74 |
+
forval i=1/`totrow' {
|
75 |
+
di "`part`i''"
|
76 |
+
replace t0= "`part`i''" if _n==`i'
|
77 |
+
}
|
78 |
+
|
79 |
+
foreach i of numlist 1 3 4 5 6 7{
|
80 |
+
tostring table_control_group`i', format("%9.3f") replace force
|
81 |
+
replace table_control_group`i'="" if table_control_group`i'=="."
|
82 |
+
replace table_control_group`i'="0"+table_control_group`i' if substr(table_control_group`i',1,1)=="."
|
83 |
+
replace table_control_group`i'= table_control_group`i'+"&"
|
84 |
+
}
|
85 |
+
|
86 |
+
tostring table_control_group2, format("%9.0f") replace force
|
87 |
+
replace table_control_group2="" if table_control_group2=="."
|
88 |
+
replace table_control_group2="0"+table_control_group2 if substr(table_control_group2,1,1)=="."
|
89 |
+
replace table_control_group2= table_control_group2+"&"
|
90 |
+
|
91 |
+
tostring table_control_group8, format("%9.3f") replace force
|
92 |
+
replace table_control_group8="" if table_control_group8=="."
|
93 |
+
replace table_control_group8="0"+table_control_group8 if substr(table_control_group8,1,1)=="."
|
94 |
+
replace table_control_group8= table_control_group8+"&" if table_control_group8==""
|
95 |
+
|
96 |
+
set obs `=_N+5'
|
97 |
+
g index= _n
|
98 |
+
replace index=0 if _n==_N-1
|
99 |
+
replace index=.5 if _n==_N-2
|
100 |
+
replace index= 5.5 if _n==_N-3
|
101 |
+
replace index= 8.5 if _n==_N-4
|
102 |
+
replace t0= "\emph{Panel A. Malaria Beliefs and Treatment Outcomes} &" if index==.5
|
103 |
+
replace t0= "\emph{Panel B. Other Treatment Outcomes} &" if index==5.5
|
104 |
+
replace t0= "\emph{Panel C. Patient Costs} &" if index==8.5
|
105 |
+
sort index
|
106 |
+
|
107 |
+
forval i=3/8 {
|
108 |
+
replace table_control_group`i'="-- &" if index>8.5 & index<12
|
109 |
+
}
|
110 |
+
replace table_control_group7= table_control_group7+"\\" if index>0 & index<_N
|
111 |
+
|
112 |
+
order t0 table_control_group2 table_control_group1 table_control_group3-table_control_group8
|
113 |
+
drop table_control_group8 table_control_group6 table_control_group4
|
114 |
+
keep t0-table_control_group7
|
115 |
+
list, clean
|
116 |
+
|
117 |
+
#delimit ;
|
118 |
+
|
119 |
+
local fn "\emph{Notes}: Column 1 reports the number of non-missing observations of variables among all individuals in the Control group. Column 2 reports means for this sample. Columns 3-6 limit the sample to Control group individuals who were administered a valid RDT test at home, with column 3 reporting means for all patients with a valid test, column 4 reporting means for patients with a positive test, and column 5 reporting means for patients with a negative test. Sample sizes for columns 3, 4, and 5 are 346, 86, and 260 respectively. Variables measured in CFA top-coded at the 99th percentile. CFA610 $\approx$ USD1.";
|
120 |
+
local text0 "\begin{table}[h!] \begin{adjustbox}{max width=1.2\textwidth} \begin{threeparttable} \caption{Descriptive Statistics from Control Group} \label{control_group} {
|
121 |
+
\begin{tabular}{l*{6}{c}} \hline\hline & \multicolumn{1}{c}{(1)} & \multicolumn{1}{c}{(2)} & \multicolumn{1}{c}{(3)} & \multicolumn{1}{c}{(4)} & \multicolumn{1}{c}{(5)} \\
|
122 |
+
& \multicolumn{2}{c}{Full Sample} & \multicolumn{3}{c}{Has Valid RDT (Home Survey)} & \\
|
123 |
+
\cmidrule(lr){2-3} \cmidrule(lr){4-6} &
|
124 |
+
\multicolumn{1}{c}{\shortstack{N}} & \multicolumn{1}{c}{\shortstack{Mean}} & \multicolumn{1}{c}{\shortstack{All\\Patients}} & \multicolumn{1}{c}{\shortstack{RDT\\Positive}} &
|
125 |
+
\multicolumn{1}{c}{\shortstack{RDT\\Negative}} \\ \hline";
|
126 |
+
local textlast "\hline \end{tabular} } \begin{tablenotes}[flushleft] \small
|
127 |
+
\item `fn'
|
128 |
+
\end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table}";
|
129 |
+
#delimit cr
|
130 |
+
replace t0="`text0'" if _n==1
|
131 |
+
replace t0="`textlast'" if _n==_N
|
132 |
+
* replace t0=" & " if t1!="" & _n>=2 & _n<_N & t0==""
|
133 |
+
|
134 |
+
outfile t0-table_control_group7 using "$tables/1_control_group.tex", noquote replace wide
|
135 |
+
|
136 |
+
restore
|
21/replication_package/Do_Files/Tables/2_table_balance.do
ADDED
@@ -0,0 +1,458 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
/*-------------------------------------------------------------------------------------------------------------------------------------
|
3 |
+
|
4 |
+
Table: Demographic variables. Randomization table. Strata and date FE. ALL PATIENTS THAT SATISFY: Present + Acutely ill + Symptoms>=1
|
5 |
+
|
6 |
+
-------------------------------------------------------------------------------------------------------------------------------------*/
|
7 |
+
|
8 |
+
preserve
|
9 |
+
|
10 |
+
local namestr `" "\it{A. Sample Frame}" "'
|
11 |
+
di `"`namestr'"'
|
12 |
+
la var digestiveproblemsintake "Digestive Problems"
|
13 |
+
la var poorappetiteintake "Poor Appetite"
|
14 |
+
la var genderpatient "Male (Patient)"
|
15 |
+
la var breathingintake "Difficulty Breathing"
|
16 |
+
la var readwrite_fluent_french "Literate (in French)"
|
17 |
+
la var gender "Male"
|
18 |
+
la var islamicschool "Islamic School"
|
19 |
+
la var ltmiddleschool "Primary School"
|
20 |
+
la var middleschool "Middle School"
|
21 |
+
la var ethnic_bambara "Bambara"
|
22 |
+
la var took_meds_before "Meds Before Visit"
|
23 |
+
la var thinks_malaria "Suspects Malaria"
|
24 |
+
la var roomshousehold "Rooms in Home"
|
25 |
+
la var members14oryounger_H "HH Members Under 15"
|
26 |
+
la var members15orolder_H "HH Members 15 or Older"
|
27 |
+
la var membersjob_H "HH Members Working"
|
28 |
+
la var totalincome_H "Total HH Income"
|
29 |
+
la var mosquitonets_H "Number Mosquito Nets"
|
30 |
+
la var rent_value_H "Rental Value of Home"
|
31 |
+
la var symptomsscreening_4 "Poor Appetite"
|
32 |
+
la var symptomsscreening_7 "Weakness/Fatigue"
|
33 |
+
la var agepatient "Age"
|
34 |
+
la var age "Age"
|
35 |
+
la var total_hh_members_H "Household Size"
|
36 |
+
la var pred_mal_pos "Predicted Malaria Risk"
|
37 |
+
la var in_home_survey "In Home Survey"
|
38 |
+
la var has_valid_rdt_H "Took Home-Based RDT"
|
39 |
+
la var genderpatient "Male"
|
40 |
+
la var speak_french "Speaks French"
|
41 |
+
la var prischoolorless "Primary School or Less"
|
42 |
+
|
43 |
+
|
44 |
+
* LABELS
|
45 |
+
foreach var in total_hh_members_H HH_frac_14 HH_frac_job income_percap_H rent_value_H HH_frac_nets {
|
46 |
+
local lbz: variable label `var'
|
47 |
+
local lbz "`lbz'$^+$"
|
48 |
+
la var `var' "`lbz'"
|
49 |
+
}
|
50 |
+
|
51 |
+
foreach var in $varlist0 $varlist1 $varlist2 {
|
52 |
+
local repx ""
|
53 |
+
if "`var'"!="nobs" & "`var'"!="bobs" local repx "replace `var'=. if dropme==1"
|
54 |
+
`repx'
|
55 |
+
}
|
56 |
+
|
57 |
+
* Varlists
|
58 |
+
local v0= wordcount("$varlist0")
|
59 |
+
local v1= wordcount("$varlist1")
|
60 |
+
local v2= wordcount("$varlist2")
|
61 |
+
|
62 |
+
|
63 |
+
local totrow= 2*(`v0'+`v1'+`v2')+3
|
64 |
+
matrix table_randomization=J(`totrow',8,.)
|
65 |
+
matrix se= J(`totrow',1,.)
|
66 |
+
|
67 |
+
local part1 "\multicolumn{7}{l}{\it{A. Sample Frame (Clinic $\times$ Day-Level Observations)}}"
|
68 |
+
|
69 |
+
loc f = 2
|
70 |
+
|
71 |
+
foreach var in $varlist0 {
|
72 |
+
|
73 |
+
local lbz: variable label `var'
|
74 |
+
local namestr " `namestr' "`lbz'" "\thinspace" "
|
75 |
+
|
76 |
+
local q= `f'+1
|
77 |
+
local part`f' "\enspace `lbz' &"
|
78 |
+
local part`q' "\thinspace &"
|
79 |
+
|
80 |
+
*Regressions
|
81 |
+
reg `var' patient_voucher doctor_voucher $date, clu($cluvar)
|
82 |
+
local coeff_patient_voucher: display %19.3f _b[patient_voucher]
|
83 |
+
local coeff_doctor_voucher: display %19.3f _b[doctor_voucher]
|
84 |
+
local se_patient_voucher: display %19.3f _se[patient_voucher]
|
85 |
+
local se_doctor_voucher: display %19.3f _se[doctor_voucher]
|
86 |
+
|
87 |
+
matrix table_randomization[`f',2] =`coeff_patient_voucher'
|
88 |
+
matrix table_randomization[`f',3] =`coeff_doctor_voucher'
|
89 |
+
|
90 |
+
matrix table_randomization[`f'+1,2] =`se_patient_voucher'
|
91 |
+
matrix table_randomization[`f'+1,3] =`se_doctor_voucher'
|
92 |
+
|
93 |
+
matrix se[`f'+1,1]=1
|
94 |
+
|
95 |
+
*P-value
|
96 |
+
test patient_voucher==doctor_voucher
|
97 |
+
local p_value1: display %7.3f `r(p)'
|
98 |
+
matrix table_randomization[`f',4] =`p_value1'
|
99 |
+
|
100 |
+
*P-value
|
101 |
+
test patient_voucher==doctor_voucher==0
|
102 |
+
local p_value2: display %7.3f `r(p)'
|
103 |
+
matrix table_randomization[`f',5] =`p_value2'
|
104 |
+
|
105 |
+
*Number of observations
|
106 |
+
matrix table_randomization[`f',6] =e(N)
|
107 |
+
|
108 |
+
*Average for treatment group
|
109 |
+
sum `var' if doctor_voucher+patient_voucher==0 & e(sample)
|
110 |
+
local control_mean: display %19.3f r(mean)
|
111 |
+
local control_sd: display %19.3f r(sd)
|
112 |
+
|
113 |
+
matrix table_randomization[`f',1] =`control_mean'
|
114 |
+
matrix table_randomization[`f'+1,1] =`control_sd'
|
115 |
+
|
116 |
+
*Increase the counter of the row
|
117 |
+
loc f = `f' + 2
|
118 |
+
|
119 |
+
}
|
120 |
+
|
121 |
+
local sustring ""
|
122 |
+
local sutest1 ""
|
123 |
+
local sutest2 ""
|
124 |
+
|
125 |
+
local part`f' "\multicolumn{7}{l}{\it{B. Patient Characteristics (Individual-Level Observations)}}"
|
126 |
+
|
127 |
+
local f = `f'+1
|
128 |
+
|
129 |
+
local namestr " `namestr' "\it{B. Patient Characteristics}" "
|
130 |
+
|
131 |
+
foreach var in $varlist1 {
|
132 |
+
|
133 |
+
|
134 |
+
local lbz: variable label `var'
|
135 |
+
local namestr " `namestr' "`lbz'" "\thinspace" "
|
136 |
+
|
137 |
+
local q= `f'+1
|
138 |
+
local part`f' "\enspace `lbz' &"
|
139 |
+
local part`q' "\thinspace &"
|
140 |
+
|
141 |
+
*Regressions
|
142 |
+
reg `var' patient_voucher doctor_voucher $date
|
143 |
+
est store E`var'
|
144 |
+
local sustring "`sustring' E`var'"
|
145 |
+
local sutest2 "`sutest2' [E`var'_mean]patient_voucher=[E`var'_mean]doctor_voucher="
|
146 |
+
local sutest1 "`sutest1' [E`var'_mean]patient_voucher=[E`var'_mean]doctor_voucher="
|
147 |
+
reg `var' patient_voucher doctor_voucher $date, clu($cluvar)
|
148 |
+
local coeff_patient_voucher: display %19.3f _b[patient_voucher]
|
149 |
+
local coeff_doctor_voucher: display %19.3f _b[doctor_voucher]
|
150 |
+
local se_patient_voucher: display %19.3f _se[patient_voucher]
|
151 |
+
local se_doctor_voucher: display %19.3f _se[doctor_voucher]
|
152 |
+
|
153 |
+
matrix table_randomization[`f',2] =`coeff_patient_voucher'
|
154 |
+
matrix table_randomization[`f',3] =`coeff_doctor_voucher'
|
155 |
+
|
156 |
+
matrix table_randomization[`f'+1,2] =`se_patient_voucher'
|
157 |
+
matrix table_randomization[`f'+1,3] =`se_doctor_voucher'
|
158 |
+
|
159 |
+
matrix se[`f'+1,1]=1
|
160 |
+
|
161 |
+
*P-value
|
162 |
+
test patient_voucher==doctor_voucher
|
163 |
+
local p_value1: display %7.3f `r(p)'
|
164 |
+
matrix table_randomization[`f',4] =`p_value1'
|
165 |
+
|
166 |
+
*P-value
|
167 |
+
test patient_voucher==doctor_voucher==0
|
168 |
+
local p_value2: display %7.3f `r(p)'
|
169 |
+
matrix table_randomization[`f',5] =`p_value2'
|
170 |
+
|
171 |
+
*Number of observations
|
172 |
+
matrix table_randomization[`f',6] =e(N)
|
173 |
+
|
174 |
+
*Average for treatment group
|
175 |
+
sum `var' if doctor_voucher+patient_voucher==0 & e(sample)
|
176 |
+
local control_mean: display %19.3f r(mean)
|
177 |
+
local control_sd: display %19.3f r(sd)
|
178 |
+
|
179 |
+
matrix table_randomization[`f',1] =`control_mean'
|
180 |
+
matrix table_randomization[`f'+1,1] =`control_sd'
|
181 |
+
|
182 |
+
*Increase the counter of the row
|
183 |
+
loc f = `f' + 2
|
184 |
+
|
185 |
+
}
|
186 |
+
|
187 |
+
mat li table_randomization
|
188 |
+
|
189 |
+
|
190 |
+
****************************
|
191 |
+
|
192 |
+
|
193 |
+
local part`f' "\multicolumn{7}{l}{\it{C. Respondent and Household Characteristics (Individual-Level Observations)}}"
|
194 |
+
|
195 |
+
local f = `f'+1
|
196 |
+
|
197 |
+
local namestr " `namestr' "\it{C. Respondent Characteristics}" "
|
198 |
+
|
199 |
+
foreach var in $varlist2 {
|
200 |
+
|
201 |
+
|
202 |
+
local lbz: variable label `var'
|
203 |
+
local namestr " `namestr' "`lbz'" "\thinspace" "
|
204 |
+
|
205 |
+
local q= `f'+1
|
206 |
+
local part`f' "\enspace `lbz' &"
|
207 |
+
local part`q' "\thinspace &"
|
208 |
+
|
209 |
+
* REGRESSIONS
|
210 |
+
reg `var' patient_voucher doctor_voucher $date
|
211 |
+
est store E`var'
|
212 |
+
local sustring "`sustring' E`var'"
|
213 |
+
local sutest2 "`sutest2' [E`var'_mean]patient_voucher=[E`var'_mean]doctor_voucher="
|
214 |
+
local sutest1 "`sutest1' [E`var'_mean]patient_voucher=[E`var'_mean]doctor_voucher="
|
215 |
+
reg `var' patient_voucher doctor_voucher $date, clu($cluvar)
|
216 |
+
local coeff_patient_voucher: display %19.3f _b[patient_voucher]
|
217 |
+
local coeff_doctor_voucher: display %19.3f _b[doctor_voucher]
|
218 |
+
local se_patient_voucher: display %19.3f _se[patient_voucher]
|
219 |
+
local se_doctor_voucher: display %19.3f _se[doctor_voucher]
|
220 |
+
|
221 |
+
matrix table_randomization[`f',2] =`coeff_patient_voucher'
|
222 |
+
matrix table_randomization[`f',3] =`coeff_doctor_voucher'
|
223 |
+
|
224 |
+
matrix table_randomization[`f'+1,2] =`se_patient_voucher'
|
225 |
+
matrix table_randomization[`f'+1,3] =`se_doctor_voucher'
|
226 |
+
|
227 |
+
matrix se[`f'+1,1]=1
|
228 |
+
|
229 |
+
*P-value
|
230 |
+
test patient_voucher==doctor_voucher
|
231 |
+
local p_value1: display %7.3f `r(p)'
|
232 |
+
matrix table_randomization[`f',4] =`p_value1'
|
233 |
+
|
234 |
+
*P-value
|
235 |
+
test patient_voucher==doctor_voucher==0
|
236 |
+
local p_value2: display %7.3f `r(p)'
|
237 |
+
matrix table_randomization[`f',5] =`p_value2'
|
238 |
+
|
239 |
+
*Number of observations
|
240 |
+
matrix table_randomization[`f',6] =e(N)
|
241 |
+
|
242 |
+
*Average for treatment group
|
243 |
+
sum `var' if doctor_voucher+patient_voucher==0 & e(sample)
|
244 |
+
local control_mean: display %19.3f r(mean)
|
245 |
+
local control_sd: display %19.3f r(sd)
|
246 |
+
|
247 |
+
matrix table_randomization[`f',1] =`control_mean'
|
248 |
+
matrix table_randomization[`f'+1,1] =`control_sd'
|
249 |
+
|
250 |
+
*Increase the counter of the row
|
251 |
+
loc f = `f' + 2
|
252 |
+
|
253 |
+
}
|
254 |
+
|
255 |
+
local sutest1 "`sutest1' [Egender_mean]patient_voucher"
|
256 |
+
local sutest2 "`sutest2' 0"
|
257 |
+
|
258 |
+
local df= e(df_r)
|
259 |
+
|
260 |
+
mat li table_randomization
|
261 |
+
matrix rownames table_randomization= `namestr'
|
262 |
+
|
263 |
+
local bc = rowsof(table_randomization)
|
264 |
+
|
265 |
+
matrix stars = J(`bc',6,0)
|
266 |
+
|
267 |
+
local end0= `v0'*2
|
268 |
+
local start1= `end0'+3
|
269 |
+
local end1= `start1' + `v1'*2
|
270 |
+
local start2= `end1'+3
|
271 |
+
local end2= `totrow'-1
|
272 |
+
|
273 |
+
forvalues i=4(1)5{
|
274 |
+
|
275 |
+
forvalues k = 2(2)`end0' {
|
276 |
+
|
277 |
+
if table_randomization[`k',`i']<=.01{
|
278 |
+
local star "1"
|
279 |
+
}
|
280 |
+
if table_randomization[`k',`i']>.01 & table_randomization[`k',`i']<=.05{
|
281 |
+
local star "2"
|
282 |
+
}
|
283 |
+
if table_randomization[`k',`i']>.05 & table_randomization[`k',`i']<=.10{
|
284 |
+
local star "3"
|
285 |
+
}
|
286 |
+
if table_randomization[`k',`i']>.10{
|
287 |
+
local star "0"
|
288 |
+
}
|
289 |
+
di
|
290 |
+
matrix stars[`k',`i'] = `star'
|
291 |
+
}
|
292 |
+
|
293 |
+
forvalues k = `start1'(2)`end1' {
|
294 |
+
|
295 |
+
if table_randomization[`k',`i']<=.01{
|
296 |
+
local star "1"
|
297 |
+
}
|
298 |
+
if table_randomization[`k',`i']>.01 & table_randomization[`k',`i']<=.05{
|
299 |
+
local star "2"
|
300 |
+
}
|
301 |
+
if table_randomization[`k',`i']>.05 & table_randomization[`k',`i']<=.10{
|
302 |
+
local star "3"
|
303 |
+
}
|
304 |
+
if table_randomization[`k',`i']>.10 {
|
305 |
+
local star "0"
|
306 |
+
}
|
307 |
+
di
|
308 |
+
matrix stars[`k',`i'] = `star'
|
309 |
+
}
|
310 |
+
|
311 |
+
forvalues k = `start2'(2)`end2' {
|
312 |
+
|
313 |
+
if table_randomization[`k',`i']<=.01{
|
314 |
+
local star "1"
|
315 |
+
}
|
316 |
+
if table_randomization[`k',`i']>.01 & table_randomization[`k',`i']<=.05{
|
317 |
+
local star "2"
|
318 |
+
}
|
319 |
+
if table_randomization[`k',`i']>.05 & table_randomization[`k',`i']<=.10{
|
320 |
+
local star "3"
|
321 |
+
}
|
322 |
+
if table_randomization[`k',`i']>.10 {
|
323 |
+
local star "0"
|
324 |
+
}
|
325 |
+
di
|
326 |
+
matrix stars[`k',`i'] = `star'
|
327 |
+
}
|
328 |
+
}
|
329 |
+
|
330 |
+
// use critical values from t-distribution, just as is done in regressions
|
331 |
+
local cv10= abs(invt(`df',.05))
|
332 |
+
local cv5= abs(invt(`df',.025))
|
333 |
+
local cv1= abs(invt(`df',.005))
|
334 |
+
|
335 |
+
forvalues i=2(1)3{
|
336 |
+
|
337 |
+
forvalues k = 2(2)`end0' {
|
338 |
+
|
339 |
+
local ttest=abs(table_randomization[`k',`i']/table_randomization[`k'+1,`i'])
|
340 |
+
if `ttest'<`cv10' {
|
341 |
+
local star "0"
|
342 |
+
}
|
343 |
+
if `ttest'>=`cv10' & `ttest'<`cv5' {
|
344 |
+
local star "3"
|
345 |
+
}
|
346 |
+
if `ttest'>=`cv5' & `ttest'<`cv1' {
|
347 |
+
local star "2"
|
348 |
+
}
|
349 |
+
if `ttest'>=`cv1' & `ttest'!=. {
|
350 |
+
local star "1"
|
351 |
+
}
|
352 |
+
di
|
353 |
+
matrix stars[`k',`i'] = `star'
|
354 |
+
}
|
355 |
+
|
356 |
+
forvalues k = `start1'(2)`end1' {
|
357 |
+
|
358 |
+
local ttest=abs(table_randomization[`k',`i']/table_randomization[`k'+1,`i'])
|
359 |
+
if `ttest'<`cv10' {
|
360 |
+
local star "0"
|
361 |
+
}
|
362 |
+
if `ttest'>=`cv10' & `ttest'<`cv5' {
|
363 |
+
local star "3"
|
364 |
+
}
|
365 |
+
if `ttest'>=`cv5' & `ttest'<`cv1' {
|
366 |
+
local star "2"
|
367 |
+
}
|
368 |
+
if `ttest'>=`cv1' & `ttest'!=. {
|
369 |
+
local star "1"
|
370 |
+
}
|
371 |
+
di
|
372 |
+
matrix stars[`k',`i'] = `star'
|
373 |
+
|
374 |
+
}
|
375 |
+
forvalues k = `start2'(2)`end2' {
|
376 |
+
|
377 |
+
local ttest=abs(table_randomization[`k',`i']/table_randomization[`k'+1,`i'])
|
378 |
+
if `ttest'<`cv10' {
|
379 |
+
local star "0"
|
380 |
+
}
|
381 |
+
if `ttest'>=`cv10' & `ttest'<`cv5' {
|
382 |
+
local star "3"
|
383 |
+
}
|
384 |
+
if `ttest'>=`cv5' & `ttest'<`cv1' {
|
385 |
+
local star "2"
|
386 |
+
}
|
387 |
+
if `ttest'>=`cv1' {
|
388 |
+
local star "1"
|
389 |
+
}
|
390 |
+
di
|
391 |
+
matrix stars[`k',`i'] = `star'
|
392 |
+
|
393 |
+
}
|
394 |
+
|
395 |
+
}
|
396 |
+
|
397 |
+
drop _all
|
398 |
+
svmat table_randomization
|
399 |
+
svmat stars
|
400 |
+
svmat se
|
401 |
+
g t0=""
|
402 |
+
forval i=1/`totrow' {
|
403 |
+
di "`part`i''"
|
404 |
+
replace t0= "`part`i''" if _n==`i'
|
405 |
+
}
|
406 |
+
|
407 |
+
forval var=1/5 {
|
408 |
+
tostring table_randomization`var', format("%9.3f") replace force
|
409 |
+
replace table_randomization`var'="" if table_randomization`var'=="."
|
410 |
+
replace table_randomization`var'="0"+table_randomization`var' if substr(table_randomization`var',1,1)=="."
|
411 |
+
|
412 |
+
replace table_randomization`var'= table_randomization`var'+"\sym{*}" if stars`var'==3
|
413 |
+
replace table_randomization`var'= table_randomization`var'+"\sym{**}" if stars`var'==2
|
414 |
+
replace table_randomization`var'= table_randomization`var'+"\sym{***}" if stars`var'==1
|
415 |
+
|
416 |
+
}
|
417 |
+
tostring table_randomization6, format("%9.0f") replace force
|
418 |
+
|
419 |
+
replace table_randomization1= "["+table_randomization1+"]" if se1==1
|
420 |
+
|
421 |
+
forval i=2/3 {
|
422 |
+
replace table_randomization`i'="("+table_randomization`i'+")" if se1==1
|
423 |
+
}
|
424 |
+
|
425 |
+
forval i=1/5 {
|
426 |
+
replace table_randomization`i'= table_randomization`i'+"&" if substr(t0,1,7)!="\multic"
|
427 |
+
}
|
428 |
+
replace table_randomization6= "" if table_randomization6=="." & se1==1
|
429 |
+
replace table_randomization6= table_randomization6+"\\" if table_randomization6!="" | substr(t0,1,7)=="\multic"
|
430 |
+
replace table_randomization6= table_randomization6+"& \\" if table_randomization6==""
|
431 |
+
|
432 |
+
set obs `=_N+2'
|
433 |
+
g index= _n
|
434 |
+
replace index=0 if _n==_N-1
|
435 |
+
sort index
|
436 |
+
order t0 table_randomization1-table_randomization8
|
437 |
+
keep t0-table_randomization8
|
438 |
+
list, clean
|
439 |
+
|
440 |
+
#delimit ;
|
441 |
+
local fn "$footnote0_alt $^+$ indicates that variable was recorded in the home survey only. Variables measured in CFA and duration of illness top-coded at the 99th percentile. CFA610 $\approx$ USD1. $footnote1";
|
442 |
+
local text0 "\begin{table}[h!] \begin{adjustbox}{max width=.8\textwidth} \begin{threeparttable} \caption{Demographic Characteristics and Randomization Verification} \label{balance} {
|
443 |
+
\begin{tabular}{l*{7}{c}} \hline\hline & \multicolumn{1}{c}{(1)} & \multicolumn{1}{c}{(2)} & \multicolumn{1}{c}{(3)} & \multicolumn{1}{c}{(4)} & \multicolumn{1}{c}{(5)} & \multicolumn{1}{c}{(6)} \\
|
444 |
+
& & \multicolumn{2}{c}{Regression Coefficients} & \multicolumn{2}{c}{P-Values} & \\
|
445 |
+
\cmidrule(lr){3-4} \cmidrule(lr){5-6} &
|
446 |
+
\multicolumn{1}{c}{\shortstack{Control\\Mean}} & \multicolumn{1}{c}{\shortstack{Patient\\Voucher}} & \multicolumn{1}{c}{\shortstack{Doctor\\ Voucher}} &
|
447 |
+
\multicolumn{1}{c}{\shortstack{Joint Test\\ PV=DV}} & \multicolumn{1}{c}{\shortstack{Joint Test \\ PV=DV=0}} & \multicolumn{1}{c}{N} \\ \hline";
|
448 |
+
local textlast "\hline \end{tabular} } \begin{tablenotes}[flushleft] \small
|
449 |
+
\item `fn'
|
450 |
+
\end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table}";
|
451 |
+
#delimit cr
|
452 |
+
replace t0="`text0'" if _n==1
|
453 |
+
replace t0="`textlast'" if _n==_N
|
454 |
+
* replace t0=" & " if t1!="" & _n>=2 & _n<_N & t0==""
|
455 |
+
|
456 |
+
outfile t0-table_randomization6 using "$tables/2_balance.tex", noquote replace wide
|
457 |
+
list
|
458 |
+
restore
|
21/replication_package/Do_Files/Tables/B1_table_clinic_census.do
ADDED
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
* General analysis of the census
|
3 |
+
|
4 |
+
drop if cscom==7 // missing info
|
5 |
+
|
6 |
+
foreach var in q4_num_saldoc q4_num_intern q4_othRX {
|
7 |
+
replace `var'=0 if `var'==. | `var'<0
|
8 |
+
}
|
9 |
+
|
10 |
+
foreach var in q5a q5b q5c q5d {
|
11 |
+
replace `var'=0 if `var'<0 | `var'==.
|
12 |
+
}
|
13 |
+
|
14 |
+
foreach var in q6a q6b q6c q6d {
|
15 |
+
replace `var'=0 if `var'<0 | `var'==.
|
16 |
+
}
|
17 |
+
label var q4_num_saldoc "\enspace Doctors"
|
18 |
+
label var q4_num_intern "\enspace Medical trainees"
|
19 |
+
label var q4_othRX "\enspace Other staff"
|
20 |
+
label var q5a "\enspace Doctors"
|
21 |
+
label var q5b "\enspace Medical trainees"
|
22 |
+
label var q5c "\enspace Lab technician"
|
23 |
+
label var q5d "\enspace Other staff"
|
24 |
+
label var q6a "\enspace Doctors"
|
25 |
+
label var q6b "\enspace Medical trainees"
|
26 |
+
label var q6c "\enspace Lab technician"
|
27 |
+
label var q6d "\enspace Other staff"
|
28 |
+
|
29 |
+
replace q1_open="7:00" if q1_open=="07H00" | q1_open=="07h00"
|
30 |
+
replace q1_open="7:30" if q1_open=="07h30" | q1_open=="7h30"
|
31 |
+
replace q1_open="8:00" if q1_open=="08h00"
|
32 |
+
gen double doctor_start = clock(q1_open,"hm")
|
33 |
+
replace q1_close="14:00" if q1_close=="14h00"
|
34 |
+
replace q1_close="14:30" if q1_close=="14h30"
|
35 |
+
replace q1_close="15:00" if q1_close=="15h00" | q1_close=="15hh00"
|
36 |
+
replace q1_close="16:00" if q1_close=="16h00"
|
37 |
+
replace q1_close="16:30" if q1_close=="16h30"
|
38 |
+
replace q1_close="17:30" if q1_close=="17h00"
|
39 |
+
gen double doctor_end = clock(q1_close,"hm")
|
40 |
+
format doctor_end %tcHH:MM
|
41 |
+
format doctor_start %tcHH:MM
|
42 |
+
replace q2_pharm_open_MF="08h00" if cscomnum ==43 & q2_pharm_open_MF=="14h00"
|
43 |
+
replace q2_pharm_close_MF="14h00" if cscomnum ==43 & q2_pharm_close_MF=="08h00"
|
44 |
+
replace q2_pharm_open_MF="7:00" if q2_pharm_open_MF=="07h00"
|
45 |
+
replace q2_pharm_open_MF="6:00" if q2_pharm_open_MF=="06h00"
|
46 |
+
replace q2_pharm_open_MF="7:30" if q2_pharm_open_MF=="07h30"
|
47 |
+
replace q2_pharm_open_MF="8:00" if q2_pharm_open_MF=="08h00"
|
48 |
+
replace q2_pharm_close_MF="7:00" if q2_pharm_close_MF=="07h00" | q2_pharm_close_MF=="7h00"
|
49 |
+
replace q2_pharm_close_MF="7:30" if q2_pharm_close_MF=="07h30"
|
50 |
+
replace q2_pharm_close_MF="8:00" if q2_pharm_close_MF=="08h00"
|
51 |
+
replace q2_pharm_close_MF="14:00" if q2_pharm_close_MF=="14h00"
|
52 |
+
replace q2_pharm_close_MF="14:30" if q2_pharm_close_MF=="14h30"
|
53 |
+
replace q2_pharm_close_MF="15:00" if q2_pharm_close_MF=="15h00"
|
54 |
+
replace q2_pharm_close_MF="16:00" if q2_pharm_close_MF=="16h00"
|
55 |
+
replace q2_pharm_close_MF="16:30" if q2_pharm_close_MF=="16h30"
|
56 |
+
replace q2_pharm_close_MF="17:00" if q2_pharm_close_MF=="17h00"
|
57 |
+
replace q2_pharm_close_MF="22:00" if q2_pharm_close_MF=="22h00"
|
58 |
+
replace q2_pharm_close_MF="23:00" if q2_pharm_close_MF=="23h00"
|
59 |
+
gen double pharma_start = clock( q2_pharm_open_MF ,"hm")
|
60 |
+
gen double pharma_end = clock( q2_pharm_close_MF ,"hm")
|
61 |
+
format pharma_start %tcHH:MM
|
62 |
+
format pharma_end %tcHH:MM
|
63 |
+
replace pharma_end=. if pharma_end<=pharma_start
|
64 |
+
|
65 |
+
gen doc_pharma=1 if (pharma_start>=doctor_start) & (pharma_end<=doctor_end)
|
66 |
+
|
67 |
+
gen difference_start=abs(pharma_start-doctor_start)
|
68 |
+
gen minutes_start = minutes(difference_start)
|
69 |
+
|
70 |
+
gen difference_end=abs(pharma_end-doctor_end)
|
71 |
+
gen minutes_end = minutes(difference_end)
|
72 |
+
|
73 |
+
replace doc_pharma=1 if minutes_start+minutes_end<=120 & doc_pharma==.
|
74 |
+
|
75 |
+
replace doc_pharma=0 if (minutes_start+minutes_end>120 & minutes_start+minutes_end<.) & doc_pharma==.
|
76 |
+
|
77 |
+
label var doc_pharma "\enspace Doctor in staff during pharmacy hours"
|
78 |
+
|
79 |
+
local varlist "q4_num_saldoc q4_num_intern q4_othRX q5a q5b q5c q5d q6a q6b q6c q6d doc_pharma"
|
80 |
+
local v0= wordcount("`varlist'")
|
81 |
+
|
82 |
+
local totrow= `v0'
|
83 |
+
matrix table_mean=J(`totrow',5,.)
|
84 |
+
|
85 |
+
local f=1
|
86 |
+
foreach var of local varlist{
|
87 |
+
|
88 |
+
local lbz: variable label `var'
|
89 |
+
local namestr " `namestr' "`lbz'" "\thinspace" "
|
90 |
+
|
91 |
+
local q= `f'+1
|
92 |
+
local part`f' "\enspace `lbz' &"
|
93 |
+
local part`q' "\thinspace &"
|
94 |
+
|
95 |
+
*Average for treatment group
|
96 |
+
sum `var'
|
97 |
+
local control_mean: display %19.3f r(mean)
|
98 |
+
local control_sd: display %19.3f r(sd)
|
99 |
+
|
100 |
+
matrix table_mean[`f',1] =`control_mean'
|
101 |
+
matrix table_mean[`f',2] =`control_sd'
|
102 |
+
matrix table_mean[`f',3] =r(min)
|
103 |
+
matrix table_mean[`f',4] =r(max)
|
104 |
+
matrix table_mean[`f',5] =r(N)
|
105 |
+
|
106 |
+
*Increase the counter of the row
|
107 |
+
loc f = `f' + 1
|
108 |
+
|
109 |
+
}
|
110 |
+
|
111 |
+
drop _all
|
112 |
+
svmat table_mean
|
113 |
+
g t0=""
|
114 |
+
forval i=1/`totrow' {
|
115 |
+
di "`part`i''"
|
116 |
+
replace t0= "`part`i''" if _n==`i'
|
117 |
+
}
|
118 |
+
|
119 |
+
forval var=1/2 {
|
120 |
+
tostring table_mean`var', format("%9.3f") replace force
|
121 |
+
replace table_mean`var'="" if table_mean`var'=="."
|
122 |
+
replace table_mean`var'="0"+table_mean`var' if substr(table_mean`var',1,1)=="."
|
123 |
+
|
124 |
+
}
|
125 |
+
|
126 |
+
|
127 |
+
forval i=3/5 {
|
128 |
+
tostring table_mean`i', format("%9.0f") replace force
|
129 |
+
replace table_mean`i'="" if table_mean`i'=="."
|
130 |
+
replace table_mean`i'="0"+table_mean`i' if substr(table_mean`i',1,1)=="."
|
131 |
+
}
|
132 |
+
|
133 |
+
forval i=1/4 {
|
134 |
+
replace table_mean`i'= table_mean`i'+"&"
|
135 |
+
}
|
136 |
+
|
137 |
+
|
138 |
+
set obs `=_N+6'
|
139 |
+
g index= _n
|
140 |
+
replace index=0 if _n==_N-1
|
141 |
+
replace index=.5 if _n==_N-2
|
142 |
+
replace index= 3.5 if _n==_N-3
|
143 |
+
replace index= 7.5 if _n==_N-4
|
144 |
+
replace index= 11.5 if _n==_N-5
|
145 |
+
|
146 |
+
replace t0= "\multicolumn{5}{l}{\emph{Panel A. Number Staff Who Can Write Malaria Prescriptions}} &" if index==.5
|
147 |
+
replace t0= "\multicolumn{5}{l}{\emph{Panel B. Number Staff Who Can Perform an RDT Test}} &" if index==3.5
|
148 |
+
replace t0= "\multicolumn{5}{l}{\emph{Panel C. Number Staff Who Can Perform a Microscopy Test}} &" if index==7.5
|
149 |
+
replace t0= "\multicolumn{5}{l}{\emph{Panel D. Pharmacy}} &" if index==11.5
|
150 |
+
|
151 |
+
sort index
|
152 |
+
|
153 |
+
replace table_mean5= table_mean5+"\\" if index>0 & index<_N
|
154 |
+
|
155 |
+
order t0 table_mean1-table_mean5
|
156 |
+
keep t0-table_mean5
|
157 |
+
list, clean
|
158 |
+
|
159 |
+
#delimit ;
|
160 |
+
local fn "\emph{Notes}: Data from clinics census. Rapid Diagnostic Test (RDT) is a cassette-like device that measures a patient's true malaria
|
161 |
+
status by using a small amount of blood, are easy to interpret; the microscopy test requires a microscope
|
162 |
+
managed by well-trained personnel. Medical trainees include interns doing medical training, out of hours providers or non-salaried doctors.
|
163 |
+
Panel D indicates a dummy variable that takes value 1 if a doctor in staff is present during pharmacy hours on weekdays (including a difference of at most 2 hs.)";
|
164 |
+
local text0 "\begin{table}[h!] \begin{adjustbox}{max width=.85\textwidth} \begin{threeparttable} \caption{Overview of Clinic Staffing} \label{clinic_census} {
|
165 |
+
\begin{tabular}{l*{6}{c}} \hline\hline & \multicolumn{1}{c}{(1)} & \multicolumn{1}{c}{(2)} & \multicolumn{1}{c}{(3)} & \multicolumn{1}{c}{(4)} & \multicolumn{1}{c}{(5)} \\
|
166 |
+
& \multicolumn{1}{c}{\shortstack{Mean}} & \multicolumn{1}{c}{SD} & \multicolumn{1}{c}{Min} & \multicolumn{1}{c}{Max} & \multicolumn{1}{c}{N} \\ \hline";
|
167 |
+
local textlast "\hline \end{tabular} } \begin{tablenotes}[flushleft] \small
|
168 |
+
\item `fn'
|
169 |
+
\end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table}";
|
170 |
+
#delimit cr
|
171 |
+
replace t0="`text0'" if _n==1
|
172 |
+
replace t0="`textlast'" if _n==_N
|
173 |
+
|
174 |
+
outfile t0-table_mean5 using "$tables/B1_clinic_census.tex", noquote replace wide
|
175 |
+
|
21/replication_package/Do_Files/Tables/B2_table_means_doctor.do
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
* Health workers beliefs
|
3 |
+
|
4 |
+
* Same decision in the regression analysis
|
5 |
+
drop if inlist(position,6,8,9) // drop midwives, la techs, medical biologists
|
6 |
+
drop if other_position=="Chargé de la santé de la reproduction" | other_position=="Pharmacien" | other_position=="Directeur Administratif"
|
7 |
+
|
8 |
+
g mal_cscom= (malariaabove5 + malariaunder5)/100
|
9 |
+
la var mal_cscom "Malaria Prevalence: CSCom Patients"
|
10 |
+
la var prevalencemalaria "Malaria Prevalence: General Population"
|
11 |
+
la var whichmedicines_antimalarial "\enspace Feels Pressure: Antimalarials"
|
12 |
+
la var whichmedicines_painkiller "\enspace Feels Pressure: Pain Killers"
|
13 |
+
la var whichmedicines_antibiotic "\enspace Feels Pressure: Antibiotics"
|
14 |
+
la var whichmedicines_other "\enspace Feels Pressure: Other Medicines"
|
15 |
+
la var pressuremedicines "Feels Pressure from Patients to Prescribe Unnecessary Medication"
|
16 |
+
|
17 |
+
local varlist "prevalencemalaria mal_cscom pressuremedicines whichmedicines_antimalarial whichmedicines_painkiller whichmedicines_antibiotic whichmedicines_other"
|
18 |
+
local v0= wordcount("`varlist'")
|
19 |
+
|
20 |
+
local totrow= `v0'
|
21 |
+
matrix table_mean=J(`totrow',3,.)
|
22 |
+
|
23 |
+
local f=1
|
24 |
+
foreach var of local varlist{
|
25 |
+
|
26 |
+
local lbz: variable label `var'
|
27 |
+
local namestr " `namestr' "`lbz'" "\thinspace" "
|
28 |
+
|
29 |
+
local q= `f'+1
|
30 |
+
local part`f' "\enspace `lbz' &"
|
31 |
+
local part`q' "\thinspace &"
|
32 |
+
|
33 |
+
*Average for treatment group
|
34 |
+
sum `var'
|
35 |
+
local control_mean: display %19.3f r(mean)
|
36 |
+
local control_sd: display %19.3f r(sd)
|
37 |
+
|
38 |
+
matrix table_mean[`f',1] =`control_mean'
|
39 |
+
matrix table_mean[`f',2] =`control_sd'
|
40 |
+
matrix table_mean[`f',3] =r(N)
|
41 |
+
|
42 |
+
*Increase the counter of the row
|
43 |
+
loc f = `f' + 1
|
44 |
+
|
45 |
+
}
|
46 |
+
|
47 |
+
drop _all
|
48 |
+
svmat table_mean
|
49 |
+
g t0=""
|
50 |
+
forval i=1/`totrow' {
|
51 |
+
di "`part`i''"
|
52 |
+
replace t0= "`part`i''" if _n==`i'
|
53 |
+
}
|
54 |
+
|
55 |
+
forval var=1/2 {
|
56 |
+
tostring table_mean`var', format("%9.3f") replace force
|
57 |
+
replace table_mean`var'="" if table_mean`var'=="."
|
58 |
+
replace table_mean`var'="0"+table_mean`var' if substr(table_mean`var',1,1)=="."
|
59 |
+
|
60 |
+
}
|
61 |
+
forval i=1/2 {
|
62 |
+
replace table_mean`i'= table_mean`i'+"&"
|
63 |
+
}
|
64 |
+
tostring table_mean3, format("%9.0f") replace force
|
65 |
+
replace table_mean3="" if table_mean3=="."
|
66 |
+
replace table_mean3="0"+table_mean3 if substr(table_mean3,1,1)=="."
|
67 |
+
|
68 |
+
replace table_mean3= table_mean3+"\\" if table_mean3!=""
|
69 |
+
replace table_mean3= table_mean3+"& \\" if table_mean3==""
|
70 |
+
|
71 |
+
set obs `=_N+2'
|
72 |
+
g index= _n
|
73 |
+
replace index=0 if _n==_N-1
|
74 |
+
sort index
|
75 |
+
order t0 table_mean1-table_mean3
|
76 |
+
keep t0-table_mean3
|
77 |
+
list, clean
|
78 |
+
|
79 |
+
#delimit ;
|
80 |
+
local fn "\emph{Notes}: Results from post-intervention health worker survey. Sample includes doctors, nurses, and health technicians. A health worker is coded as feeling pressure to prescribe if s/he answers yes to the question: Do you ever feel pressure from patients to prescribe certain medicines when you think they are not necessary? Doctors answering yes were then asked to specify which medications. Antimalarial also includes quinine; pain killer includes analgesic, anti inflammatory, and sedatative; antibiotic includes unspecified antibiotics and ciprofloxacin.";
|
81 |
+
local text0 "\begin{table}[h!] \begin{adjustbox}{max width=.85\textwidth} \begin{threeparttable} \caption{Health Worker Beliefs from Post-Intervention Survey} \label{means_doctor} {
|
82 |
+
\begin{tabular}{l*{4}{c}} \hline\hline & \multicolumn{1}{c}{(1)} & \multicolumn{1}{c}{(2)} & \multicolumn{1}{c}{(3)} \\
|
83 |
+
& \multicolumn{1}{c}{\shortstack{Mean}} & \multicolumn{1}{c}{SD} & \multicolumn{1}{c}{N} \\ \hline";
|
84 |
+
local textlast "\hline \end{tabular} } \begin{tablenotes}[flushleft] \small
|
85 |
+
\item `fn'
|
86 |
+
\end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table}";
|
87 |
+
#delimit cr
|
88 |
+
replace t0="`text0'" if _n==1
|
89 |
+
replace t0="`textlast'" if _n==_N
|
90 |
+
* replace t0=" & " if t1!="" & _n>=2 & _n<_N & t0==""
|
91 |
+
|
92 |
+
outfile t0-table_mean3 using "$tables/B2_means_doctor.tex", noquote replace wide
|
93 |
+
|
94 |
+
|
21/replication_package/Do_Files/Tables/B5_table_selection.do
ADDED
@@ -0,0 +1,423 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
* Selection
|
3 |
+
|
4 |
+
preserve
|
5 |
+
|
6 |
+
local namestr `" "\it{A. Whole Sample}" "'
|
7 |
+
di `"`namestr'"'
|
8 |
+
|
9 |
+
global varlist0_selection "in_home_survey has_valid_rdt_H"
|
10 |
+
global varlist1_selection "has_valid_rdt_H"
|
11 |
+
|
12 |
+
la var in_home_survey "Took Home Survey"
|
13 |
+
la var has_valid_rdt_H "Took Home-Based RDT"
|
14 |
+
|
15 |
+
|
16 |
+
foreach var in $varlist0_selection $varlist1_selection {
|
17 |
+
local repx ""
|
18 |
+
if "`var'"!="nobs" & "`var'"!="bobs" local repx "replace `var'=. if dropme==1"
|
19 |
+
`repx'
|
20 |
+
}
|
21 |
+
|
22 |
+
* Varlists
|
23 |
+
local v0= wordcount("$varlist0_selection")
|
24 |
+
local v1= wordcount("$varlist1_selection")
|
25 |
+
|
26 |
+
|
27 |
+
local totrow= 2*(`v0'+`v0'+`v1')+3
|
28 |
+
matrix table_randomization=J(`totrow',8,.)
|
29 |
+
matrix se= J(`totrow',1,.)
|
30 |
+
|
31 |
+
local part1 "\it{A. Whole Sample} &"
|
32 |
+
|
33 |
+
loc f = 2
|
34 |
+
|
35 |
+
foreach var in $varlist0_selection {
|
36 |
+
|
37 |
+
local lbz: variable label `var'
|
38 |
+
local namestr " `namestr' "`lbz'" "\thinspace" "
|
39 |
+
|
40 |
+
local q= `f'+1
|
41 |
+
local part`f' "\enspace `lbz' &"
|
42 |
+
local part`q' "\thinspace &"
|
43 |
+
|
44 |
+
*Regressions
|
45 |
+
reg `var' patient_voucher doctor_voucher $date, clu($cluvar)
|
46 |
+
local coeff_patient_voucher: display %19.3f _b[patient_voucher]
|
47 |
+
local coeff_doctor_voucher: display %19.3f _b[doctor_voucher]
|
48 |
+
local se_patient_voucher: display %19.3f _se[patient_voucher]
|
49 |
+
local se_doctor_voucher: display %19.3f _se[doctor_voucher]
|
50 |
+
|
51 |
+
matrix table_randomization[`f',2] =`coeff_patient_voucher'
|
52 |
+
matrix table_randomization[`f',3] =`coeff_doctor_voucher'
|
53 |
+
|
54 |
+
matrix table_randomization[`f'+1,2] =`se_patient_voucher'
|
55 |
+
matrix table_randomization[`f'+1,3] =`se_doctor_voucher'
|
56 |
+
|
57 |
+
matrix se[`f'+1,1]=1
|
58 |
+
|
59 |
+
*P-value
|
60 |
+
test patient_voucher==doctor_voucher
|
61 |
+
local p_value1: display %7.3f `r(p)'
|
62 |
+
matrix table_randomization[`f',4] =`p_value1'
|
63 |
+
|
64 |
+
*P-value
|
65 |
+
test patient_voucher==doctor_voucher==0
|
66 |
+
local p_value2: display %7.3f `r(p)'
|
67 |
+
matrix table_randomization[`f',5] =`p_value2'
|
68 |
+
|
69 |
+
*Number of observations
|
70 |
+
matrix table_randomization[`f',6] =e(N)
|
71 |
+
|
72 |
+
*Average for treatment group
|
73 |
+
sum `var' if doctor_voucher+patient_voucher==0 & e(sample)
|
74 |
+
local control_mean: display %19.3f r(mean)
|
75 |
+
local control_sd: display %19.3f r(sd)
|
76 |
+
|
77 |
+
matrix table_randomization[`f',1] =`control_mean'
|
78 |
+
matrix table_randomization[`f'+1,1] =`control_sd'
|
79 |
+
|
80 |
+
*Increase the counter of the row
|
81 |
+
loc f = `f' + 2
|
82 |
+
|
83 |
+
}
|
84 |
+
|
85 |
+
local sustring ""
|
86 |
+
local sutest1 ""
|
87 |
+
local sutest2 ""
|
88 |
+
|
89 |
+
local part`f' "\it{B. Selected for Home Survey} &"
|
90 |
+
|
91 |
+
local f = `f'+1
|
92 |
+
|
93 |
+
local namestr " `namestr' "\it{B. Selected for Home Survey}" "
|
94 |
+
|
95 |
+
foreach var in $varlist0_selection {
|
96 |
+
|
97 |
+
|
98 |
+
local lbz: variable label `var'
|
99 |
+
local namestr " `namestr' "`lbz'" "\thinspace" "
|
100 |
+
|
101 |
+
local q= `f'+1
|
102 |
+
local part`f' "\enspace `lbz' &"
|
103 |
+
local part`q' "\thinspace &"
|
104 |
+
|
105 |
+
*Regressions
|
106 |
+
reg `var' patient_voucher doctor_voucher $date if selected_home_survey==1
|
107 |
+
est store E`var'
|
108 |
+
local sustring "`sustring' E`var'"
|
109 |
+
local sutest2 "`sutest2' [E`var'_mean]patient_voucher=[E`var'_mean]doctor_voucher="
|
110 |
+
local sutest1 "`sutest1' [E`var'_mean]patient_voucher=[E`var'_mean]doctor_voucher="
|
111 |
+
reg `var' patient_voucher doctor_voucher $date if selected_home_survey==1, clu($cluvar)
|
112 |
+
local coeff_patient_voucher: display %19.3f _b[patient_voucher]
|
113 |
+
local coeff_doctor_voucher: display %19.3f _b[doctor_voucher]
|
114 |
+
local se_patient_voucher: display %19.3f _se[patient_voucher]
|
115 |
+
local se_doctor_voucher: display %19.3f _se[doctor_voucher]
|
116 |
+
|
117 |
+
matrix table_randomization[`f',2] =`coeff_patient_voucher'
|
118 |
+
matrix table_randomization[`f',3] =`coeff_doctor_voucher'
|
119 |
+
|
120 |
+
matrix table_randomization[`f'+1,2] =`se_patient_voucher'
|
121 |
+
matrix table_randomization[`f'+1,3] =`se_doctor_voucher'
|
122 |
+
|
123 |
+
matrix se[`f'+1,1]=1
|
124 |
+
|
125 |
+
*P-value
|
126 |
+
test patient_voucher==doctor_voucher
|
127 |
+
local p_value1: display %7.3f `r(p)'
|
128 |
+
matrix table_randomization[`f',4] =`p_value1'
|
129 |
+
|
130 |
+
*P-value
|
131 |
+
test patient_voucher==doctor_voucher==0
|
132 |
+
local p_value2: display %7.3f `r(p)'
|
133 |
+
matrix table_randomization[`f',5] =`p_value2'
|
134 |
+
|
135 |
+
*Number of observations
|
136 |
+
matrix table_randomization[`f',6] =e(N)
|
137 |
+
|
138 |
+
*Average for treatment group
|
139 |
+
sum `var' if doctor_voucher+patient_voucher==0 & e(sample)
|
140 |
+
local control_mean: display %19.3f r(mean)
|
141 |
+
local control_sd: display %19.3f r(sd)
|
142 |
+
|
143 |
+
matrix table_randomization[`f',1] =`control_mean'
|
144 |
+
matrix table_randomization[`f'+1,1] =`control_sd'
|
145 |
+
|
146 |
+
*Increase the counter of the row
|
147 |
+
loc f = `f' + 2
|
148 |
+
|
149 |
+
}
|
150 |
+
|
151 |
+
mat li table_randomization
|
152 |
+
|
153 |
+
|
154 |
+
****************************
|
155 |
+
|
156 |
+
|
157 |
+
local part`f' "\it{C. Took Home Survey} &"
|
158 |
+
|
159 |
+
local f = `f'+1
|
160 |
+
|
161 |
+
local namestr " `namestr' "\it{C. Took Home Survey}" "
|
162 |
+
|
163 |
+
foreach var in $varlist1_selection {
|
164 |
+
|
165 |
+
|
166 |
+
local lbz: variable label `var'
|
167 |
+
local namestr " `namestr' "`lbz'" "\thinspace" "
|
168 |
+
|
169 |
+
local q= `f'+1
|
170 |
+
local part`f' "\enspace `lbz' &"
|
171 |
+
local part`q' "\thinspace &"
|
172 |
+
|
173 |
+
* REGRESSIONS
|
174 |
+
reg `var' patient_voucher doctor_voucher $date if in_home_survey==1
|
175 |
+
est store E`var'
|
176 |
+
local sustring "`sustring' E`var'"
|
177 |
+
local sutest2 "`sutest2' [E`var'_mean]patient_voucher=[E`var'_mean]doctor_voucher="
|
178 |
+
local sutest1 "`sutest1' [E`var'_mean]patient_voucher=[E`var'_mean]doctor_voucher="
|
179 |
+
reg `var' patient_voucher doctor_voucher $date if in_home_survey==1, clu($cluvar)
|
180 |
+
local coeff_patient_voucher: display %19.3f _b[patient_voucher]
|
181 |
+
local coeff_doctor_voucher: display %19.3f _b[doctor_voucher]
|
182 |
+
local se_patient_voucher: display %19.3f _se[patient_voucher]
|
183 |
+
local se_doctor_voucher: display %19.3f _se[doctor_voucher]
|
184 |
+
|
185 |
+
matrix table_randomization[`f',2] =`coeff_patient_voucher'
|
186 |
+
matrix table_randomization[`f',3] =`coeff_doctor_voucher'
|
187 |
+
|
188 |
+
matrix table_randomization[`f'+1,2] =`se_patient_voucher'
|
189 |
+
matrix table_randomization[`f'+1,3] =`se_doctor_voucher'
|
190 |
+
|
191 |
+
matrix se[`f'+1,1]=1
|
192 |
+
|
193 |
+
*P-value
|
194 |
+
test patient_voucher==doctor_voucher
|
195 |
+
local p_value1: display %7.3f `r(p)'
|
196 |
+
matrix table_randomization[`f',4] =`p_value1'
|
197 |
+
|
198 |
+
*P-value
|
199 |
+
test patient_voucher==doctor_voucher==0
|
200 |
+
local p_value2: display %7.3f `r(p)'
|
201 |
+
matrix table_randomization[`f',5] =`p_value2'
|
202 |
+
|
203 |
+
*Number of observations
|
204 |
+
matrix table_randomization[`f',6] =e(N)
|
205 |
+
|
206 |
+
*Average for treatment group
|
207 |
+
sum `var' if doctor_voucher+patient_voucher==0 & e(sample)
|
208 |
+
local control_mean: display %19.3f r(mean)
|
209 |
+
local control_sd: display %19.3f r(sd)
|
210 |
+
|
211 |
+
matrix table_randomization[`f',1] =`control_mean'
|
212 |
+
matrix table_randomization[`f'+1,1] =`control_sd'
|
213 |
+
|
214 |
+
*Increase the counter of the row
|
215 |
+
loc f = `f' + 2
|
216 |
+
|
217 |
+
}
|
218 |
+
|
219 |
+
local sutest1 "`sutest1' [Egender_mean]patient_voucher"
|
220 |
+
local sutest2 "`sutest2' 0"
|
221 |
+
|
222 |
+
local df= e(df_r)
|
223 |
+
|
224 |
+
mat li table_randomization
|
225 |
+
matrix rownames table_randomization= `namestr'
|
226 |
+
|
227 |
+
local bc = rowsof(table_randomization)
|
228 |
+
|
229 |
+
matrix stars = J(`bc',6,0)
|
230 |
+
|
231 |
+
local end0= `v0'*2
|
232 |
+
local start1= `end0'+3
|
233 |
+
local end1= `start1' + `v1'*2
|
234 |
+
local start2= `end1'+3
|
235 |
+
local end2= `totrow'-1
|
236 |
+
|
237 |
+
forvalues i=4(1)5{
|
238 |
+
|
239 |
+
forvalues k = 2(2)`end0' {
|
240 |
+
|
241 |
+
if table_randomization[`k',`i']<=.01{
|
242 |
+
local star "1"
|
243 |
+
}
|
244 |
+
if table_randomization[`k',`i']>.01 & table_randomization[`k',`i']<=.05{
|
245 |
+
local star "2"
|
246 |
+
}
|
247 |
+
if table_randomization[`k',`i']>.05 & table_randomization[`k',`i']<=.10{
|
248 |
+
local star "3"
|
249 |
+
}
|
250 |
+
if table_randomization[`k',`i']>.10{
|
251 |
+
local star "0"
|
252 |
+
}
|
253 |
+
di
|
254 |
+
matrix stars[`k',`i'] = `star'
|
255 |
+
}
|
256 |
+
|
257 |
+
forvalues k = `start1'(2)`end1' {
|
258 |
+
|
259 |
+
if table_randomization[`k',`i']<=.01{
|
260 |
+
local star "1"
|
261 |
+
}
|
262 |
+
if table_randomization[`k',`i']>.01 & table_randomization[`k',`i']<=.05{
|
263 |
+
local star "2"
|
264 |
+
}
|
265 |
+
if table_randomization[`k',`i']>.05 & table_randomization[`k',`i']<=.10{
|
266 |
+
local star "3"
|
267 |
+
}
|
268 |
+
if table_randomization[`k',`i']>.10 {
|
269 |
+
local star "0"
|
270 |
+
}
|
271 |
+
di
|
272 |
+
matrix stars[`k',`i'] = `star'
|
273 |
+
}
|
274 |
+
|
275 |
+
forvalues k = `start2'(2)`end2' {
|
276 |
+
|
277 |
+
if table_randomization[`k',`i']<=.01{
|
278 |
+
local star "1"
|
279 |
+
}
|
280 |
+
if table_randomization[`k',`i']>.01 & table_randomization[`k',`i']<=.05{
|
281 |
+
local star "2"
|
282 |
+
}
|
283 |
+
if table_randomization[`k',`i']>.05 & table_randomization[`k',`i']<=.10{
|
284 |
+
local star "3"
|
285 |
+
}
|
286 |
+
if table_randomization[`k',`i']>.10 {
|
287 |
+
local star "0"
|
288 |
+
}
|
289 |
+
di
|
290 |
+
matrix stars[`k',`i'] = `star'
|
291 |
+
}
|
292 |
+
}
|
293 |
+
|
294 |
+
// use critical values from t-distribution, just as is done in regressions
|
295 |
+
local cv10= abs(invt(`df',.05))
|
296 |
+
local cv5= abs(invt(`df',.025))
|
297 |
+
local cv1= abs(invt(`df',.005))
|
298 |
+
|
299 |
+
forvalues i=2(1)3{
|
300 |
+
|
301 |
+
forvalues k = 2(2)`end0' {
|
302 |
+
|
303 |
+
local ttest=abs(table_randomization[`k',`i']/table_randomization[`k'+1,`i'])
|
304 |
+
if `ttest'<`cv10' {
|
305 |
+
local star "0"
|
306 |
+
}
|
307 |
+
if `ttest'>=`cv10' & `ttest'<`cv5' {
|
308 |
+
local star "3"
|
309 |
+
}
|
310 |
+
if `ttest'>=`cv5' & `ttest'<`cv1' {
|
311 |
+
local star "2"
|
312 |
+
}
|
313 |
+
if `ttest'>=`cv1' & `ttest'!=. {
|
314 |
+
local star "1"
|
315 |
+
}
|
316 |
+
di
|
317 |
+
matrix stars[`k',`i'] = `star'
|
318 |
+
}
|
319 |
+
|
320 |
+
forvalues k = `start1'(2)`end1' {
|
321 |
+
|
322 |
+
local ttest=abs(table_randomization[`k',`i']/table_randomization[`k'+1,`i'])
|
323 |
+
if `ttest'<`cv10' {
|
324 |
+
local star "0"
|
325 |
+
}
|
326 |
+
if `ttest'>=`cv10' & `ttest'<`cv5' {
|
327 |
+
local star "3"
|
328 |
+
}
|
329 |
+
if `ttest'>=`cv5' & `ttest'<`cv1' {
|
330 |
+
local star "2"
|
331 |
+
}
|
332 |
+
if `ttest'>=`cv1' & `ttest'!=. {
|
333 |
+
local star "1"
|
334 |
+
}
|
335 |
+
di
|
336 |
+
matrix stars[`k',`i'] = `star'
|
337 |
+
|
338 |
+
}
|
339 |
+
forvalues k = `start2'(2)`end2' {
|
340 |
+
|
341 |
+
local ttest=abs(table_randomization[`k',`i']/table_randomization[`k'+1,`i'])
|
342 |
+
if `ttest'<`cv10' {
|
343 |
+
local star "0"
|
344 |
+
}
|
345 |
+
if `ttest'>=`cv10' & `ttest'<`cv5' {
|
346 |
+
local star "3"
|
347 |
+
}
|
348 |
+
if `ttest'>=`cv5' & `ttest'<`cv1' {
|
349 |
+
local star "2"
|
350 |
+
}
|
351 |
+
if `ttest'>=`cv1' {
|
352 |
+
local star "1"
|
353 |
+
}
|
354 |
+
di
|
355 |
+
matrix stars[`k',`i'] = `star'
|
356 |
+
|
357 |
+
}
|
358 |
+
|
359 |
+
}
|
360 |
+
|
361 |
+
drop _all
|
362 |
+
svmat table_randomization
|
363 |
+
svmat stars
|
364 |
+
svmat se
|
365 |
+
g t0=""
|
366 |
+
forval i=1/`totrow' {
|
367 |
+
di "`part`i''"
|
368 |
+
replace t0= "`part`i''" if _n==`i'
|
369 |
+
}
|
370 |
+
|
371 |
+
forval var=1/5 {
|
372 |
+
tostring table_randomization`var', format("%9.3f") replace force
|
373 |
+
replace table_randomization`var'="" if table_randomization`var'=="."
|
374 |
+
replace table_randomization`var'="0"+table_randomization`var' if substr(table_randomization`var',1,1)=="."
|
375 |
+
replace table_randomization`var'= table_randomization`var'+"\sym{*}" if stars`var'==3
|
376 |
+
replace table_randomization`var'= table_randomization`var'+"\sym{**}" if stars`var'==2
|
377 |
+
replace table_randomization`var'= table_randomization`var'+"\sym{***}" if stars`var'==1
|
378 |
+
|
379 |
+
}
|
380 |
+
replace table_randomization1= "["+table_randomization1+"]" if se1==1
|
381 |
+
|
382 |
+
forval i=2/3 {
|
383 |
+
replace table_randomization`i'="("+table_randomization`i'+")" if se1==1
|
384 |
+
}
|
385 |
+
|
386 |
+
forval i=1/5 {
|
387 |
+
replace table_randomization`i'= table_randomization`i'+"&"
|
388 |
+
}
|
389 |
+
tostring table_randomization6, format("%9.0f") replace force
|
390 |
+
replace table_randomization6="" if table_randomization6=="."
|
391 |
+
replace table_randomization6="0"+table_randomization6 if substr(table_randomization6,1,1)=="."
|
392 |
+
|
393 |
+
|
394 |
+
replace table_randomization6= table_randomization6+"\\" if table_randomization6!=""
|
395 |
+
replace table_randomization6= table_randomization6+"& \\" if table_randomization6==""
|
396 |
+
|
397 |
+
set obs `=_N+2'
|
398 |
+
g index= _n
|
399 |
+
replace index=0 if _n==_N-1
|
400 |
+
sort index
|
401 |
+
order t0 table_randomization1-table_randomization8
|
402 |
+
keep t0-table_randomization8
|
403 |
+
list, clean
|
404 |
+
|
405 |
+
#delimit ;
|
406 |
+
local fn "$footnote0_alt $footnote1";
|
407 |
+
local text0 "\begin{table}[h!] \begin{adjustbox}{max width=1\textwidth} \begin{threeparttable} \caption{Selection into Analysis Samples by Treatment} \label{selection} {
|
408 |
+
\begin{tabular}{l*{7}{c}} \hline\hline & \multicolumn{1}{c}{(1)} & \multicolumn{1}{c}{(2)} & \multicolumn{1}{c}{(3)} & \multicolumn{1}{c}{(4)} & \multicolumn{1}{c}{(5)} & \multicolumn{1}{c}{(6)} \\
|
409 |
+
& & \multicolumn{2}{c}{Regression Coefficients} & \multicolumn{2}{c}{P-Values} & \\
|
410 |
+
\cmidrule(lr){3-4} \cmidrule(lr){5-6} &
|
411 |
+
\multicolumn{1}{c}{\shortstack{Control\\Mean}} & \multicolumn{1}{c}{\shortstack{Patient\\Voucher}} & \multicolumn{1}{c}{\shortstack{Doctor\\ Voucher}} &
|
412 |
+
\multicolumn{1}{c}{\shortstack{Joint Test\\ PV=DV}} & \multicolumn{1}{c}{\shortstack{Joint Test \\ PV=DV=0}} & \multicolumn{1}{c}{N} \\ \hline";
|
413 |
+
local textlast "\hline \end{tabular} } \begin{tablenotes}[flushleft] \small
|
414 |
+
\item `fn'
|
415 |
+
\end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table}";
|
416 |
+
#delimit cr
|
417 |
+
replace t0="`text0'" if _n==1
|
418 |
+
replace t0="`textlast'" if _n==_N
|
419 |
+
* replace t0=" & " if t1!="" & _n>=2 & _n<_N & t0==""
|
420 |
+
|
421 |
+
outfile t0-table_randomization6 using "$tables/B5_selection.tex", noquote replace wide
|
422 |
+
|
423 |
+
restore
|
21/replication_package/Do_Files/Tables/B6_table_diff_test_consent.do
ADDED
@@ -0,0 +1,419 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
preserve
|
3 |
+
|
4 |
+
local namestr `" "\it{A. Patient Characteristics}" "'
|
5 |
+
di `"`namestr'"'
|
6 |
+
|
7 |
+
|
8 |
+
local varlist1a= subinstr("$varlist1", "RDTresult_POS", "",.)
|
9 |
+
local varlist1a= "`varlist1a' treat_sev_simple_mal"
|
10 |
+
local varlist2= "$varlist2"
|
11 |
+
local varlist3= "$varlist3"
|
12 |
+
|
13 |
+
la var digestiveproblemsintake "Digestive Problems"
|
14 |
+
la var poorappetiteintake "Poor Appetite"
|
15 |
+
la var genderpatient "Male (Patient)"
|
16 |
+
la var breathingintake "Difficulty Breathing"
|
17 |
+
la var readwrite_fluent_french "Literate (in French)"
|
18 |
+
la var gender "Male"
|
19 |
+
la var islamicschool "Islamic School"
|
20 |
+
la var ltmiddleschool "Primary School"
|
21 |
+
la var middleschool "Middle School"
|
22 |
+
la var ethnic_bambara "Bambara"
|
23 |
+
la var took_meds_before "Meds Before Visit"
|
24 |
+
la var thinks_malaria "Suspects Malaria"
|
25 |
+
la var roomshousehold "Rooms in Home"
|
26 |
+
la var members14oryounger_H "HH Members Under 15"
|
27 |
+
la var members15orolder_H "HH Members 15 or Older"
|
28 |
+
la var membersjob_H "HH Members Working"
|
29 |
+
la var totalincome_H "Total HH Income"
|
30 |
+
la var mosquitonets_H "Number Mosquito Nets"
|
31 |
+
la var rent_value_H "Rental Value of Home"
|
32 |
+
la var symptomsscreening_4 "Poor Appetite"
|
33 |
+
la var symptomsscreening_7 "Weakness/Fatigue"
|
34 |
+
la var agepatient "Age"
|
35 |
+
la var age "Age"
|
36 |
+
la var total_hh_members_H "Household Size"
|
37 |
+
la var pred_mal_pos "Predicted Malaria Probability"
|
38 |
+
la var treat_sev_simple_mal "Purchased Malaria Treatment"
|
39 |
+
la var speak_french "Speaks French"
|
40 |
+
la var prischoolorless "Primary School or Less"
|
41 |
+
|
42 |
+
g nordt= 1 - rdt_H
|
43 |
+
replace nordt=0 if nordt==.
|
44 |
+
|
45 |
+
foreach var in total_hh_members_H HH_frac_14 HH_frac_job income_percap_H rent_value_H HH_frac_nets {
|
46 |
+
local lbz: variable label `var'
|
47 |
+
local lbz "`lbz'$^+$"
|
48 |
+
la var `var' "`lbz'"
|
49 |
+
}
|
50 |
+
|
51 |
+
foreach var in `varlist1a' `varlist2' {
|
52 |
+
local repx ""
|
53 |
+
if "`var'"!="nobs" & "`var'"!="bobs" local repx "replace `var'=. if dropme==1"
|
54 |
+
`repx'
|
55 |
+
}
|
56 |
+
|
57 |
+
* Varlists
|
58 |
+
local v1= wordcount("`varlist1a'")
|
59 |
+
local v2= wordcount("`varlist2'")
|
60 |
+
|
61 |
+
|
62 |
+
local totrow= 2*(`v1'+`v2')+4
|
63 |
+
matrix table_randomization=J(`totrow',9,.)
|
64 |
+
matrix se= J(`totrow',9,.)
|
65 |
+
|
66 |
+
local part1 "\it{A. Patient Characteristics} &"
|
67 |
+
|
68 |
+
loc f = 2
|
69 |
+
|
70 |
+
foreach var in `varlist1a' {
|
71 |
+
|
72 |
+
cap replace `var'=. if MSS`var'==1
|
73 |
+
|
74 |
+
local lbz: variable label `var'
|
75 |
+
local namestr " `namestr' "`lbz'" "\thinspace" "
|
76 |
+
|
77 |
+
local q= `f'+1
|
78 |
+
local part`f' "\enspace `lbz' &"
|
79 |
+
local part`q' "\thinspace &"
|
80 |
+
|
81 |
+
*Regressions
|
82 |
+
|
83 |
+
* first: selected vs. not for home survey
|
84 |
+
reg `var' selected_home_survey, clu($cluvar)
|
85 |
+
local coeff_home: display %7.3f _b[selected_home_survey]
|
86 |
+
local se_home: display %7.3f _se[selected_home_survey]
|
87 |
+
|
88 |
+
matrix table_randomization[`f',2] =`coeff_home'
|
89 |
+
matrix table_randomization[`f'+1,2] =`se_home'
|
90 |
+
matrix table_randomization[`f',3] =e(N)
|
91 |
+
matrix se[`f'+1,1]=1
|
92 |
+
|
93 |
+
*Average for not selected
|
94 |
+
sum `var' if selected_home_survey==0 & e(sample)
|
95 |
+
local control_mean: display %7.3f r(mean)
|
96 |
+
local control_sd: display %7.3f r(sd)
|
97 |
+
|
98 |
+
matrix table_randomization[`f',1] =`control_mean'
|
99 |
+
matrix table_randomization[`f'+1,1] =`control_sd'
|
100 |
+
local ct=r(N)
|
101 |
+
foreach j in 1 2 3 {
|
102 |
+
local do1 ""
|
103 |
+
local do2 ""
|
104 |
+
if `ct'==0 {
|
105 |
+
local do1= "mat table_randomization[`f',`j']=."
|
106 |
+
local do2= "mat table_randomization[`f'+1,`j']=."
|
107 |
+
}
|
108 |
+
`do1'
|
109 |
+
`do2'
|
110 |
+
}
|
111 |
+
* second: interviewed vs. not for home survey
|
112 |
+
reg `var' in_home_survey if selected_home_survey==1, clu($cluvar)
|
113 |
+
local coeff_home: display %7.3f _b[in_home_survey]
|
114 |
+
local se_home: display %7.3f _se[in_home_survey]
|
115 |
+
|
116 |
+
matrix table_randomization[`f',5] =`coeff_home'
|
117 |
+
matrix table_randomization[`f'+1,5] =`se_home'
|
118 |
+
matrix table_randomization[`f',6] =e(N)
|
119 |
+
matrix se[`f'+1,1]=1
|
120 |
+
|
121 |
+
*Average for not in home survey
|
122 |
+
sum `var' if in_home_survey==0 & e(sample) & selected_home_survey==1
|
123 |
+
local control_mean: display %7.3f r(mean)
|
124 |
+
local control_sd: display %7.3f r(sd)
|
125 |
+
|
126 |
+
matrix table_randomization[`f',4] =`control_mean'
|
127 |
+
matrix table_randomization[`f'+1,4] =`control_sd'
|
128 |
+
local ct=r(N)
|
129 |
+
foreach j in 4 5 6 {
|
130 |
+
local do1 ""
|
131 |
+
local do2 ""
|
132 |
+
if `ct'==0 {
|
133 |
+
local do1= "mat table_randomization[`f',`j']=."
|
134 |
+
local do2= "mat table_randomization[`f'+1,`j']=."
|
135 |
+
}
|
136 |
+
`do1'
|
137 |
+
`do2'
|
138 |
+
}
|
139 |
+
* third: took RDT vs. not for home survey
|
140 |
+
reg `var' nordt if in_home_survey==1, clu($cluvar)
|
141 |
+
local coeff_test: display %7.3f _b[nordt]
|
142 |
+
local se_test: display %7.3f _se[nordt]
|
143 |
+
|
144 |
+
matrix table_randomization[`f',8] =`coeff_test'
|
145 |
+
matrix table_randomization[`f'+1,8] =`se_test'
|
146 |
+
matrix table_randomization[`f',9] =e(N)
|
147 |
+
matrix se[`f'+1,1]=1
|
148 |
+
|
149 |
+
*Average for consenters
|
150 |
+
sum `var' if nordt==0 & e(sample)
|
151 |
+
local control_mean2: display %7.3f r(mean)
|
152 |
+
local control_sd2: display %7.3f r(sd)
|
153 |
+
|
154 |
+
matrix table_randomization[`f',7] =`control_mean2'
|
155 |
+
matrix table_randomization[`f'+1,7] =`control_sd2'
|
156 |
+
|
157 |
+
*Increase the counter of the row
|
158 |
+
loc f = `f' + 2
|
159 |
+
|
160 |
+
}
|
161 |
+
|
162 |
+
local sustring ""
|
163 |
+
local sutest1 ""
|
164 |
+
local sutest2 ""
|
165 |
+
|
166 |
+
local part`f' "\it{B. Household Characteristics} &"
|
167 |
+
|
168 |
+
local f = `f'+1
|
169 |
+
|
170 |
+
local namestr " `namestr' "\it{B. Household Characteristics}" "
|
171 |
+
|
172 |
+
foreach var of local varlist2 {
|
173 |
+
|
174 |
+
cap replace `var'=. if MSS`var'==1
|
175 |
+
|
176 |
+
local lbz: variable label `var'
|
177 |
+
local namestr " `namestr' "`lbz'" "\thinspace" "
|
178 |
+
|
179 |
+
local q= `f'+1
|
180 |
+
local part`f' "\enspace `lbz' &"
|
181 |
+
local part`q' "\thinspace &"
|
182 |
+
|
183 |
+
|
184 |
+
*Regressions
|
185 |
+
* first: selected vs. not for home survey
|
186 |
+
reg `var' selected_home_survey, clu($cluvar)
|
187 |
+
local coeff_home: display %7.3f _b[selected_home_survey]
|
188 |
+
local se_home: display %7.3f _se[selected_home_survey]
|
189 |
+
|
190 |
+
matrix table_randomization[`f',2] =`coeff_home'
|
191 |
+
matrix table_randomization[`f'+1,2] =`se_home'
|
192 |
+
matrix table_randomization[`f',3] =e(N)
|
193 |
+
matrix se[`f'+1,1]=1
|
194 |
+
|
195 |
+
*Average for not selected
|
196 |
+
sum `var' if selected_home_survey==0 & e(sample)
|
197 |
+
local control_mean: display %7.3f r(mean)
|
198 |
+
local control_sd: display %7.3f r(sd)
|
199 |
+
|
200 |
+
matrix table_randomization[`f',1] =`control_mean'
|
201 |
+
matrix table_randomization[`f'+1,1] =`control_sd'
|
202 |
+
local ct=r(N)
|
203 |
+
di `ct'
|
204 |
+
|
205 |
+
|
206 |
+
foreach j in 1 2 3 {
|
207 |
+
local do1 ""
|
208 |
+
local do2 ""
|
209 |
+
if `ct'==0 {
|
210 |
+
local do1= "mat table_randomization[`f',`j']=."
|
211 |
+
local do2= "mat table_randomization[`f'+1,`j']=."
|
212 |
+
}
|
213 |
+
`do1'
|
214 |
+
`do2'
|
215 |
+
}
|
216 |
+
|
217 |
+
reg `var' in_home_survey if selected_home_survey==1, clu($cluvar)
|
218 |
+
local coeff_home: display %7.3f _b[in_home_survey]
|
219 |
+
local se_home: display %7.3f _se[in_home_survey]
|
220 |
+
|
221 |
+
matrix table_randomization[`f',5] =`coeff_home'
|
222 |
+
matrix table_randomization[`f'+1,5] =`se_home'
|
223 |
+
matrix table_randomization[`f',6] =e(N)
|
224 |
+
matrix se[`f'+1,1]=1
|
225 |
+
|
226 |
+
*Average for not in home survey
|
227 |
+
sum `var' if in_home_survey==0 & e(sample) & selected_home_survey==1
|
228 |
+
local control_mean: display %7.3f r(mean)
|
229 |
+
local control_sd: display %7.3f r(sd)
|
230 |
+
|
231 |
+
matrix table_randomization[`f',4] =`control_mean'
|
232 |
+
matrix table_randomization[`f'+1,4] =`control_sd'
|
233 |
+
local ct=r(N)
|
234 |
+
di `ct'
|
235 |
+
|
236 |
+
|
237 |
+
foreach j in 4 5 6 {
|
238 |
+
local do1 ""
|
239 |
+
local do2 ""
|
240 |
+
if `ct'==0 {
|
241 |
+
local do1= "mat table_randomization[`f',`j']=."
|
242 |
+
local do2= "mat table_randomization[`f'+1,`j']=."
|
243 |
+
}
|
244 |
+
`do1'
|
245 |
+
`do2'
|
246 |
+
}
|
247 |
+
|
248 |
+
reg `var' nordt if in_home_survey==1, clu($cluvar)
|
249 |
+
local coeff_test: display %7.3f _b[nordt]
|
250 |
+
local se_test: display %7.3f _se[nordt]
|
251 |
+
|
252 |
+
matrix table_randomization[`f',8] =`coeff_test'
|
253 |
+
matrix table_randomization[`f'+1,8] =`se_test'
|
254 |
+
matrix table_randomization[`f',9] =e(N)
|
255 |
+
matrix se[`f'+1,1]=1
|
256 |
+
|
257 |
+
*Average for consenters
|
258 |
+
sum `var' if nordt==0 & e(sample)
|
259 |
+
local control_mean2: display %7.3f r(mean)
|
260 |
+
local control_sd2: display %7.3f r(sd)
|
261 |
+
|
262 |
+
matrix table_randomization[`f',7] =`control_mean2'
|
263 |
+
matrix table_randomization[`f'+1,7] =`control_sd2'
|
264 |
+
|
265 |
+
*Increase the counter of the row
|
266 |
+
loc f = `f' + 2
|
267 |
+
|
268 |
+
}
|
269 |
+
|
270 |
+
|
271 |
+
local df= e(df_r)
|
272 |
+
|
273 |
+
mat li table_randomization
|
274 |
+
matrix rownames table_randomization= `namestr'
|
275 |
+
|
276 |
+
local bc = rowsof(table_randomization)
|
277 |
+
|
278 |
+
matrix stars = J(`bc',9,0)
|
279 |
+
|
280 |
+
local end1= `v1'*2
|
281 |
+
local start2= `end1'+3
|
282 |
+
*CL: there was a mistake here, we didn't put * in Panel B (Isabelle's comments)
|
283 |
+
local end2= `start2' + `v2'*2-2
|
284 |
+
|
285 |
+
|
286 |
+
di `end1'
|
287 |
+
di `start2'
|
288 |
+
di `end2'
|
289 |
+
|
290 |
+
|
291 |
+
|
292 |
+
// use critical values from t-distribution, just as is done in regressions
|
293 |
+
local cv10= abs(invt(`df',.05))
|
294 |
+
local cv5= abs(invt(`df',.025))
|
295 |
+
local cv1= abs(invt(`df',.005))
|
296 |
+
|
297 |
+
foreach i in 2 5 8 {
|
298 |
+
|
299 |
+
forvalues k = 2(2)`end1' {
|
300 |
+
|
301 |
+
local ttest=abs(table_randomization[`k',`i']/table_randomization[`k'+1,`i'])
|
302 |
+
if `ttest'<`cv10' {
|
303 |
+
local star "0"
|
304 |
+
}
|
305 |
+
if `ttest'>=`cv10' & `ttest'<`cv5' {
|
306 |
+
local star "3"
|
307 |
+
}
|
308 |
+
if `ttest'>=`cv5' & `ttest'<`cv1' {
|
309 |
+
local star "2"
|
310 |
+
}
|
311 |
+
if `ttest'>=`cv1' & `ttest'!=. {
|
312 |
+
local star "1"
|
313 |
+
}
|
314 |
+
di
|
315 |
+
matrix stars[`k',`i'] = `star'
|
316 |
+
}
|
317 |
+
|
318 |
+
forvalues k = `start2'(2)`end2' {
|
319 |
+
|
320 |
+
local ttest=abs(table_randomization[`k',`i']/table_randomization[`k'+1,`i'])
|
321 |
+
if `ttest'<`cv10' {
|
322 |
+
local star "0"
|
323 |
+
}
|
324 |
+
if `ttest'>=`cv10' & `ttest'<`cv5' {
|
325 |
+
local star "3"
|
326 |
+
}
|
327 |
+
if `ttest'>=`cv5' & `ttest'<`cv1' {
|
328 |
+
local star "2"
|
329 |
+
}
|
330 |
+
if `ttest'>=`cv1' & `ttest'!=. {
|
331 |
+
local star "1"
|
332 |
+
}
|
333 |
+
di
|
334 |
+
matrix stars[`k',`i'] = `star'
|
335 |
+
|
336 |
+
}
|
337 |
+
|
338 |
+
}
|
339 |
+
|
340 |
+
drop _all
|
341 |
+
svmat table_randomization
|
342 |
+
|
343 |
+
list
|
344 |
+
|
345 |
+
|
346 |
+
svmat stars
|
347 |
+
svmat se
|
348 |
+
g t0=""
|
349 |
+
forval i=1/`totrow' {
|
350 |
+
di "`part`i''"
|
351 |
+
replace t0= "`part`i''" if _n==`i'
|
352 |
+
}
|
353 |
+
|
354 |
+
foreach var in 1 2 4 5 7 8 {
|
355 |
+
tostring table_randomization`var', format("%9.3f") replace force
|
356 |
+
replace table_randomization`var'="" if table_randomization`var'=="."
|
357 |
+
replace table_randomization`var'="0"+table_randomization`var' if substr(table_randomization`var',1,1)=="."
|
358 |
+
replace table_randomization`var'= table_randomization`var'+"\sym{*}" if stars`var'==3
|
359 |
+
replace table_randomization`var'= table_randomization`var'+"\sym{**}" if stars`var'==2
|
360 |
+
replace table_randomization`var'= table_randomization`var'+"\sym{***}" if stars`var'==1
|
361 |
+
|
362 |
+
}
|
363 |
+
|
364 |
+
foreach var in 3 6 9{
|
365 |
+
tostring table_randomization`var', format("%9.0f") replace force
|
366 |
+
replace table_randomization`var'="" if table_randomization`var'=="."
|
367 |
+
replace table_randomization`var'="0"+table_randomization`var' if substr(table_randomization`var',1,1)=="."
|
368 |
+
replace table_randomization`var'= table_randomization`var'+"\sym{*}" if stars`var'==3
|
369 |
+
replace table_randomization`var'= table_randomization`var'+"\sym{**}" if stars`var'==2
|
370 |
+
replace table_randomization`var'= table_randomization`var'+"\sym{***}" if stars`var'==1
|
371 |
+
|
372 |
+
}
|
373 |
+
|
374 |
+
foreach i in 1 4 7 {
|
375 |
+
replace table_randomization`i'= "["+table_randomization`i'+"]" if se1==1 | se4==1 | se7==1
|
376 |
+
}
|
377 |
+
|
378 |
+
foreach i in 2 5 8 {
|
379 |
+
replace table_randomization`i'="("+table_randomization`i'+")" if se1==1
|
380 |
+
}
|
381 |
+
|
382 |
+
forval i=1/8 {
|
383 |
+
replace table_randomization`i'= table_randomization`i'+"&"
|
384 |
+
}
|
385 |
+
replace table_randomization9= table_randomization9+"\\" if table_randomization9!=""
|
386 |
+
replace table_randomization9= table_randomization9+"& \\" if table_randomization9==""
|
387 |
+
foreach i in 1 2 4 5 {
|
388 |
+
replace table_randomization`i'="&" if table_randomization`i'=="[]&" | table_randomization`i'=="()&"
|
389 |
+
}
|
390 |
+
set obs `=_N+2'
|
391 |
+
g index= _n
|
392 |
+
replace index=0 if _n==_N-1
|
393 |
+
sort index
|
394 |
+
order t0 table_randomization1-table_randomization9
|
395 |
+
keep t0-table_randomization9
|
396 |
+
list, clean
|
397 |
+
|
398 |
+
#delimit ;
|
399 |
+
local fn "\emph{Notes}: Robust standard errors clustered at the clinic level in parentheses. $^+$ indicates that variable was recorded in the home survey only. Variables measured in CFA and duration of illness top-coded at the 99th percentile. CFA610 $\approx$ USD1. $footnote1";
|
400 |
+
local text0 "\begin{table}[h!] \begin{adjustbox}{max width=.91\textwidth} \begin{threeparttable} \caption{Selection Into Home Survey and RDT Consent} \label{diff_test_consent} {
|
401 |
+
\begin{tabular}{l*{10}{c}} \hline\hline & \multicolumn{1}{c}{(1)} & \multicolumn{1}{c}{(2)} & \multicolumn{1}{c}{(3)} & \multicolumn{1}{c}{(4)} & \multicolumn{1}{c}{(5)} & \multicolumn{1}{c}{(6)} & \multicolumn{1}{c}{(7)} & \multicolumn{1}{c}{(8)} & \multicolumn{1}{c}{(9)} \\
|
402 |
+
& \multicolumn{3}{c}{Whole Sample} & \multicolumn{3}{c}{Selected Home Survey} & \multicolumn{3}{c}{Took Home Survey} \\
|
403 |
+
\cmidrule(lr){2-4} \cmidrule(lr){5-7} \cmidrule(lr){8-10} &
|
404 |
+
\multicolumn{1}{c}{\shortstack{Mean:\\Not \\ Selected}} & \multicolumn{1}{c}{\shortstack{Diff: \\ Selected }} & \multicolumn{1}{c}{\shortstack{N}} &
|
405 |
+
\multicolumn{1}{c}{\shortstack{Mean:\\Survey Not \\ Taken}} & \multicolumn{1}{c}{\shortstack{Diff: \\ Took \\ Survey }} & \multicolumn{1}{c}{\shortstack{N}} &
|
406 |
+
\multicolumn{1}{c}{\shortstack{Mean:\\ Took \\ RDT}} & \multicolumn{1}{c}{\shortstack{Diff: \\ Refused \\ RDT}} &
|
407 |
+
\multicolumn{1}{c}{\shortstack{N}} \\ \hline";
|
408 |
+
local textlast "\hline \end{tabular} } \begin{tablenotes}[flushleft] \small
|
409 |
+
\item `fn'
|
410 |
+
\end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table}";
|
411 |
+
#delimit cr
|
412 |
+
replace t0="`text0'" if _n==1
|
413 |
+
replace t0="`textlast'" if _n==_N
|
414 |
+
drop if _n==_N-1 | _n==_N-2
|
415 |
+
list t0-table_randomization9
|
416 |
+
outfile t0-table_randomization9 using "$tables/B6_diff_test_consent.tex", noquote replace wide
|
417 |
+
|
418 |
+
|
419 |
+
restore
|
21/replication_package/Do_Files/Tables/B7_table_mal_prob_probit.do
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
* Predicting RDT w/ observables
|
3 |
+
|
4 |
+
la var symptomsscreening_2 "Chills or Excessive Sweating"
|
5 |
+
la var symptomsscreening_3 "Nausea, Vomiting, or Diarrhea"
|
6 |
+
la var symptomsscreening_4 "Reduced Appetite"
|
7 |
+
la var symptomsscreening_7 "Weakness, Fatigue, or Reduced Consciousness"
|
8 |
+
la var genderpatient "Patient is Male"
|
9 |
+
la var speak_french "Speaks French (Resp.)"
|
10 |
+
la var readwrite_fluent_french "Literate in French (Resp.)"
|
11 |
+
la var prischoolorless "Primary School or Less (Resp.)"
|
12 |
+
la var respondent "Patient Answered CSCom Survey"
|
13 |
+
la var daysillness99 "Duration of Illness in Days"
|
14 |
+
la var pregnancy "Patient is Pregnant"
|
15 |
+
la var speak_french "Respondent Speaks French"
|
16 |
+
la var readwrite_fluent_french "Respondent is Literate in French"
|
17 |
+
la var prischoolorless "Respondent Has Primary Education or Less"
|
18 |
+
la var respondent "Patient Answered Clinic Survey"
|
19 |
+
|
20 |
+
|
21 |
+
global predcont "symptomsscreening_1 symptomsscreening_2 symptomsscreening_3 symptomsscreening_4 symptomsscreening_5 symptomsscreening_6 symptomsscreening_7 daysillness99 agepatient under5 u5_age genderpatient pregnancy ethnic_bambara speak_french readwrite_fluent_french prischoolorless respondent"
|
22 |
+
global useme ""
|
23 |
+
foreach var in $predcont {
|
24 |
+
cap g MSS`var'= `var'==.
|
25 |
+
cap replace `var'=0 if `var'==.
|
26 |
+
global useme "$useme `var' MSS`var'"
|
27 |
+
}
|
28 |
+
g varx= RDTresult_POS
|
29 |
+
la var varx "\textcolor{white}{X}"
|
30 |
+
probit varx $useme if dropme==0, cluster(cscomnum) asis
|
31 |
+
drop pred_mal_pos
|
32 |
+
predict pred_mal_pos if dropme==0, p
|
33 |
+
estadd scalar addme= `e(r2_p)'
|
34 |
+
|
35 |
+
esttab using "$tables/B7_mal_prob_probit.tex", label noabbrev nogaps noline nodep nomtit nonum replace keep($predcont) stats(addme N, label("Pseudo R-Squared" "N") fmt(3 0)) se nonote tex ///
|
36 |
+
star(* .1 ** .05 *** .01) prehead(\begin{table}[h!] \begin{adjustbox}{max width=.65\textwidth} \begin{threeparttable} \caption{Predicting RDT Positivity With Observables} \label{malprobprobit} {\begin{tabular}{l*{2}{C{0.15\linewidth}}} \toprule \toprule & (1) \\ & RDT Positive \\ \hline) ///
|
37 |
+
postfoot(\hline \end{tabular} } \begin{tablenotes}[flushleft] \small \item \emph{Notes}: Robust standard errors clustered at the clinic level in parentheses. Respondent refers to individual who answered clinic survey. ***, **, and * indicate significance at the 1, 5, and 10 percent significance levels respectively. \end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table})
|
38 |
+
drop varx
|
21/replication_package/Figures/1_DocPat-graphs-theory-figure-2020-08-28.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5eb91689e73cc0bda562a06183799f155931632828443aad2d1c1628577bc8b9
|
3 |
+
size 140519
|
21/replication_package/Figures/2_DocPat-InterventionScheduleDiagram.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4c6c511efd01616dcf6791af6936c1eef50be512efb64b344e2dafb69714e7ee
|
3 |
+
size 59737
|
21/replication_package/Figures/3_outcomeXpredpos_control.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f733792b17baa80ea8193544dd3bdaff913c76c18dec1db1091743e75536f684
|
3 |
+
size 31126
|
21/replication_package/Figures/4_tmtXpredpos.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e73cd80bd50f76092d305e7a9f42efa447bf4024045dfa555305a4a28d052d22
|
3 |
+
size 49318
|
21/replication_package/Figures/5_voucher_tmt.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b1feaa7411def8bc1664a815a947f2e97d70bb1a67cdf506053e0451d6fef6cd
|
3 |
+
size 18059
|
21/replication_package/Figures/B1_misallocation.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:79b615ea6a76ed399ea83261cba06b4ddf1d3335ec02e7f903ff96d0744c7b20
|
3 |
+
size 17423
|
21/replication_package/Figures/B2_dist_pred_pos.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d5d29a5402c7039ec078fe892cb058ff500d2545f1d85cb4aaca867bf4ad7a14
|
3 |
+
size 26052
|
21/replication_package/Figures/B3_outcomeXpredpos_control_home.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fd6393dc2aae44edbbd002db2325999d0665a80a48d642e6814b2b7a44076568
|
3 |
+
size 36267
|
21/replication_package/Figures/B4_vouchersXbins.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b86859546e56d29bfebd1abcbde597cae24f27c439b0a67faa00d07f9607a7b7
|
3 |
+
size 21487
|
21/replication_package/LSS_Appendix_Replication.tex
ADDED
@@ -0,0 +1,183 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
% PREAMBLE
|
3 |
+
\documentclass[11pt]{article}
|
4 |
+
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
|
5 |
+
\geometry{letterpaper} % ... or a4paper or a5paper or ...
|
6 |
+
\usepackage{pdflscape}
|
7 |
+
\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
|
8 |
+
\usepackage{graphicx}
|
9 |
+
\usepackage{amssymb,amsmath}
|
10 |
+
\usepackage{epstopdf}
|
11 |
+
\usepackage{lscape}
|
12 |
+
\usepackage{adjustbox,lipsum}
|
13 |
+
\usepackage{threeparttable} % For Notes below table
|
14 |
+
\usepackage{longtable}
|
15 |
+
\usepackage{verbatim}
|
16 |
+
\usepackage{booktabs,caption,fixltx2e}
|
17 |
+
\usepackage{flafter}
|
18 |
+
\usepackage{tabularx}
|
19 |
+
\usepackage{threeparttablex}
|
20 |
+
\usepackage{array}
|
21 |
+
\usepackage{xcolor}
|
22 |
+
\usepackage{ragged2e}
|
23 |
+
% SET MARGINS
|
24 |
+
\geometry{margin=1in}
|
25 |
+
|
26 |
+
% this command lets you put line breaks in column titles in esttab
|
27 |
+
\newcommand{\specialcell}[2][c]{\begin{tabular}[#1]{@{}c@{}}#2\end{tabular}}
|
28 |
+
\newcommand{\speccell}[2][l]{%
|
29 |
+
\begin{tabular}[#1]{@{}l@{}}#2\end{tabular}}
|
30 |
+
\newcommand\T{\rule{0pt}{2.6ex}} % Top strut
|
31 |
+
% fixing column widths
|
32 |
+
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
|
33 |
+
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
|
34 |
+
% makes sure floats are centered
|
35 |
+
\makeatletter
|
36 |
+
\g@addto@macro\@floatboxreset\centering
|
37 |
+
\makeatother
|
38 |
+
|
39 |
+
% PATHS
|
40 |
+
\newcommand{\fig}{Figures}
|
41 |
+
\newcommand{\tab}{Tables}
|
42 |
+
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
|
43 |
+
|
44 |
+
|
45 |
+
\begin{document}
|
46 |
+
|
47 |
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
48 |
+
%%%%%%%%%%%% APPENDIX MATERIAL %%%%%%%%%%%
|
49 |
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
50 |
+
|
51 |
+
|
52 |
+
%%%%%%%% THEORY %%%%%%%%
|
53 |
+
|
54 |
+
% COUNTERS AND NUMBERING
|
55 |
+
%\setcounter{table}{0}
|
56 |
+
%\renewcommand{\thetable}{A\arabic{table}}
|
57 |
+
%\setcounter{figure}{0}
|
58 |
+
%\renewcommand{\thefigure}{A\arabic{figure}}
|
59 |
+
|
60 |
+
%\begin{landscape}
|
61 |
+
|
62 |
+
\section*{Does Patient Demand Contribute to the Overuse of Prescription Drugs? (Lopez Sautmann, Schaner)}
|
63 |
+
\section*{Appendix Figures and Tables}
|
64 |
+
|
65 |
+
%\input{"\tab/A1_theory_table.tex"}
|
66 |
+
|
67 |
+
%\end{landscape}
|
68 |
+
|
69 |
+
|
70 |
+
%%%%%%%% EMPIRICS %%%%%%%%
|
71 |
+
|
72 |
+
% COUNTERS AND NUMBERING
|
73 |
+
\setcounter{table}{0}
|
74 |
+
\renewcommand{\thetable}{B\arabic{table}}
|
75 |
+
\setcounter{figure}{0}
|
76 |
+
\renewcommand{\thefigure}{B\arabic{figure}}
|
77 |
+
|
78 |
+
|
79 |
+
% FIGURES
|
80 |
+
|
81 |
+
% MISALLOCATION BY TESTING STATUS
|
82 |
+
\begin{figure}[ht!]
|
83 |
+
\centering
|
84 |
+
\caption{Misallocation of Treatment by Clinic Malaria Test Status (Home Tested Subsample)}
|
85 |
+
\label{misallocation}
|
86 |
+
\begin{minipage}{.9\linewidth}
|
87 |
+
\begin{center}
|
88 |
+
\includegraphics[width=14cm]{{"\fig/B1_misallocation"}.pdf}
|
89 |
+
\end{center}
|
90 |
+
\footnotesize
|
91 |
+
\emph{Notes:} Sample limited to 1,070 patients who had a valid home-based RDT result. 506 patients received no malaria test, 314 received an RDT only, 207 received microscope test only, and 43 received both types of tests. The black bar graphs the share of each subgroup that received a positive home-based RDT result. The dark grey bar graphs the share of the sample that either received a positive home-based test and an antimalarial prescription or had a negative test and no antimalarial prescription. The medium grey bar graphs the share of each group that had a positive home test and an antimalarial prescription; the light grey bar graphs the share of each group that had a negative test and no antimalarial prescription.
|
92 |
+
\end{minipage}
|
93 |
+
\end{figure}
|
94 |
+
|
95 |
+
% DISTRIBUTION PREDICTED MALARIA RISK
|
96 |
+
\begin{figure}[ht!]
|
97 |
+
\caption{Distribution of Predicted Malaria Risk by Treatment Group}
|
98 |
+
\label{dist_pred_pos}
|
99 |
+
\begin{minipage}{.93\linewidth}
|
100 |
+
\includegraphics[width=15cm]{{"\fig/B2_dist_pred_pos"}.pdf}
|
101 |
+
\footnotesize
|
102 |
+
\emph{Notes:} Kernel density estimates. Vertical dashed lines indicate 25th, 50th, and 75th percentiles of overall distribution respectively.
|
103 |
+
\end{minipage}
|
104 |
+
\end{figure}
|
105 |
+
|
106 |
+
\begin{landscape}
|
107 |
+
|
108 |
+
% TREATMENT OUTCOMES BY PREDICTED MALARIA RISK IN CONTROL GROUP- BY HOME TESTING STATUS
|
109 |
+
\begin{figure}[ht!]
|
110 |
+
\caption{Treatment Outcomes by Predicted Malaria Risk in Control Group -- By Home RDT Test Status}
|
111 |
+
\label{outcomeXpredpos_control_new_byHome}
|
112 |
+
\begin{minipage}{1\linewidth}
|
113 |
+
\includegraphics[width=23.3cm]{{"\fig/B3_outcomeXpredpos_control_home"}.pdf}
|
114 |
+
\footnotesize
|
115 |
+
\emph{Notes:} Results from local linear regressions. Regressions are run on the full sample, but graphs omit results for top and bottom 2.5 percent of malaria risk distribution to avoid influence of outliers. Vertical dashed lines indicate 25th, 50th, and 75th percentiles of predicted malaria risk respectively.
|
116 |
+
\end{minipage}
|
117 |
+
\end{figure}
|
118 |
+
\end{landscape}
|
119 |
+
|
120 |
+
% TREATMENT OUTCOMES BY BINS
|
121 |
+
\begin{figure}[ht!]
|
122 |
+
\caption{Voucher Treatment Effects by Clinic Observation Day}
|
123 |
+
\label{vouchersXbins}
|
124 |
+
\begin{minipage}{.93\linewidth}
|
125 |
+
\begin{center}
|
126 |
+
\includegraphics[width=13cm]{{"\fig/B4_vouchersXbins"}.pdf}
|
127 |
+
\end{center}
|
128 |
+
\footnotesize
|
129 |
+
\emph{Notes:} Graphs show point estimates of a linear regression model where PV and DV dummies are interacted with dummies for patient observation day bins, along with 95 percent confidence intervals. Robust standard errors clustered at the clinic level in parentheses. All regressions control for clinic visit date fixed effects and dummies for days 1-2 and days 3-4. We use double selection lasso to choose additional controls. See notes to Table \ref{mal_tmt_overall_new} for a list of potential controls.
|
130 |
+
\end{minipage}
|
131 |
+
\end{figure}
|
132 |
+
|
133 |
+
\clearpage
|
134 |
+
|
135 |
+
% TABLES
|
136 |
+
\input{"\tab/B1_clinic_census.tex"}
|
137 |
+
\input{"\tab/B2_means_doctor.tex"}
|
138 |
+
|
139 |
+
% PI IMPACTS
|
140 |
+
\input{"\tab/B3_mal_tmt_pat_info_lso.tex"}
|
141 |
+
|
142 |
+
% DI IMPACTS
|
143 |
+
\input{"\tab/B4_mal_tmt_doc_info_lso.tex"}
|
144 |
+
|
145 |
+
% SELECTION
|
146 |
+
\input{"\tab/B5_selection.tex"}
|
147 |
+
|
148 |
+
\input{"\tab/B6_diff_test_consent.tex"}
|
149 |
+
|
150 |
+
% PREDICTING RDT +
|
151 |
+
\input{"\tab/B7_mal_prob_probit.tex"}
|
152 |
+
|
153 |
+
% MAIN TABLES W/O CONTROLS
|
154 |
+
\input{"\tab/B8_mal_tmt_overall_nc.tex"}
|
155 |
+
\input{"\tab/B9_mal_tmt_het_nc.tex"}
|
156 |
+
|
157 |
+
% MAIN TABLES W/O LASSO
|
158 |
+
\input{"\tab/B10_mal_tmt_overall_nl.tex"}
|
159 |
+
\input{"\tab/B11_mal_tmt_het_nl.tex"}
|
160 |
+
|
161 |
+
% Share of Patients Taking An ACT at Home Survey
|
162 |
+
\input{"\tab/B12_vouchers_tmt_lso.tex"}
|
163 |
+
|
164 |
+
% STOCKPILING
|
165 |
+
\input{"\tab/B13_stockpiling_lso.tex"}
|
166 |
+
|
167 |
+
\begin{landscape}
|
168 |
+
% PI IMPACTS ON TESTING
|
169 |
+
\input{"\tab/B14_mal_testing_info_RX_lso.tex"}
|
170 |
+
\end{landscape}
|
171 |
+
|
172 |
+
% COSTS
|
173 |
+
\input{"\tab/B15_cost_overall_lso.tex"}
|
174 |
+
|
175 |
+
% EXPECTED MATCH
|
176 |
+
\input{"\tab/B16_expected_match_lso.tex"}
|
177 |
+
|
178 |
+
|
179 |
+
\end{document}
|
180 |
+
|
181 |
+
|
182 |
+
|
183 |
+
|
21/replication_package/LSS_Main_Replication.tex
ADDED
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
% PREAMBLE
|
3 |
+
\documentclass[11pt]{article}
|
4 |
+
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
|
5 |
+
\geometry{letterpaper} % ... or a4paper or a5paper or ...
|
6 |
+
\usepackage{pdflscape}
|
7 |
+
\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
|
8 |
+
\usepackage{graphicx}
|
9 |
+
\usepackage{amssymb}
|
10 |
+
\usepackage{epstopdf}
|
11 |
+
\usepackage{lscape}
|
12 |
+
\usepackage{adjustbox,lipsum}
|
13 |
+
\usepackage{threeparttable} % For Notes below table
|
14 |
+
\usepackage{longtable}
|
15 |
+
\usepackage{verbatim}
|
16 |
+
\usepackage{booktabs,caption,fixltx2e}
|
17 |
+
\usepackage{flafter}
|
18 |
+
\usepackage{tabularx}
|
19 |
+
\usepackage{threeparttablex}
|
20 |
+
\usepackage{array}
|
21 |
+
\usepackage{xcolor}
|
22 |
+
\usepackage{ragged2e}
|
23 |
+
% SET MARGINS
|
24 |
+
\geometry{margin=1in}
|
25 |
+
% this command lets you put line breaks in column titles in esttab
|
26 |
+
\newcommand{\specialcell}[2][c]{\begin{tabular}[#1]{@{}c@{}}#2\end{tabular}}
|
27 |
+
\newcommand{\speccell}[2][l]{%
|
28 |
+
\begin{tabular}[#1]{@{}l@{}}#2\end{tabular}}
|
29 |
+
\newcommand\T{\rule{0pt}{2.6ex}} % Top strut
|
30 |
+
% fixing column widths
|
31 |
+
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}}
|
32 |
+
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}}
|
33 |
+
% makes sure floats are centered
|
34 |
+
\makeatletter
|
35 |
+
\g@addto@macro\@floatboxreset\centering
|
36 |
+
\makeatother
|
37 |
+
|
38 |
+
% PATHS
|
39 |
+
\newcommand{\fig}{Figures}
|
40 |
+
\newcommand{\tab}{Tables}
|
41 |
+
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
|
42 |
+
|
43 |
+
|
44 |
+
\begin{document}
|
45 |
+
|
46 |
+
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
47 |
+
% MAIN ANALYSIS
|
48 |
+
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
49 |
+
\section*{Does Patient Demand Contribute to the Overuse of Prescription Drugs? (Lopez Sautmann, Schaner)}
|
50 |
+
\section*{Main Figures and Tables}
|
51 |
+
\begin{landscape}
|
52 |
+
|
53 |
+
% THEORY EXAMPLE
|
54 |
+
\begin{figure}[ht]
|
55 |
+
\caption{Patient Preferences and Doctor Voucher-Sharing Strategies}
|
56 |
+
\vspace{1.4cm}
|
57 |
+
\label{fig:demand}
|
58 |
+
\begin{minipage}{1\linewidth}
|
59 |
+
\includegraphics[width=17cm, trim={.75in 4.75in 3.5in 2in}]{{"\fig/1_DocPat-graphs-theory-figure-2020-08-28"}.pdf}
|
60 |
+
\footnotesize
|
61 |
+
\vspace{6cm} \newline
|
62 |
+
\emph{Notes:} Diagonal lines graph patient utility net of costs. Shaded bars with $P$ and $0$ subscripts indicate patient preferences when the price of simple malaria treatment is $P$, and $0$ respectively. $N$ denotes ``no antimalarial purchase'', $L1$ denotes ``simple malaria treatment, unwilling to purchase severe malaria treatment'', $L2$ denotes ``simple malaria treatment, willing to purchase severe malaria treatment'', and $H$ denotes ``severe malaria treatment''. The bottom shaded bars in panels B and C show the outcome when the doctor adopts the strategy specified in the panel title.
|
63 |
+
\end{minipage}
|
64 |
+
\end{figure}
|
65 |
+
|
66 |
+
|
67 |
+
% RANDOMIZATION DESIGN
|
68 |
+
\begin{figure}[ht]
|
69 |
+
\caption{Within-CSCOM Randomization Design}
|
70 |
+
\label{RandDesign}
|
71 |
+
\begin{minipage}{.93\linewidth}
|
72 |
+
\includegraphics[width=21cm, trim={.75in 1in 1.5in 1in}]{{"\fig/2_DocPat-InterventionScheduleDiagram"}.pdf}
|
73 |
+
\footnotesize
|
74 |
+
\emph{Notes:} Before the interventions launched, clinic staff received trainings on RDTs on November 2, 3, and 4 2016. The interventions listed above ran between November 14-December 30 2016 in three two-week blocks, with 20 CSCOMs active in each two-week block.
|
75 |
+
\end{minipage}
|
76 |
+
\end{figure}
|
77 |
+
|
78 |
+
|
79 |
+
% TREATMENT OUTCOMES BY PREDICTED MALARIA RISK IN CONTROL GROUP-NEW
|
80 |
+
\begin{figure}[ht]
|
81 |
+
\caption{Treatment Outcomes by Predicted Malaria Risk in Control Group}
|
82 |
+
\label{outcomeXpredpos_control_new}
|
83 |
+
\begin{minipage}{.93\linewidth}
|
84 |
+
\includegraphics[width=22cm]{{"\fig/3_outcomeXpredpos_control"}.pdf}
|
85 |
+
\footnotesize
|
86 |
+
\emph{Notes:} Results from local linear regressions. Regressions are run on the full sample, but graphs omit results for top and bottom 2.5 percent of malaria risk distribution to avoid influence of outliers. Vertical dashed lines indicate 25th, 50th, and 75th percentiles of predicted malaria risk respectively.
|
87 |
+
\end{minipage}
|
88 |
+
\end{figure}
|
89 |
+
|
90 |
+
% HET TMT EFFECTS BY MALARIA RISK -- NON PARAMETRIC-NEW
|
91 |
+
\begin{figure}[ht]
|
92 |
+
\caption{Treatment Outcomes by Predicted Malaria Risk and Voucher Group}
|
93 |
+
\label{tmtXpredpos_new}
|
94 |
+
\begin{minipage}{.93\linewidth}
|
95 |
+
\includegraphics[width=21cm]{{"\fig/4_tmtXpredpos"}.pdf}
|
96 |
+
\footnotesize
|
97 |
+
\emph{Notes:} Results from local linear regressions. Dotted lines give 90 percent confidence intervals. The standard errors used to calculate confidence intervals are bootstrapped by re-sampling clinics and recalculating predicted malaria risk on each of 1,000 bootstrap replications. Regressions are run on the full sample, but graphs omit results for top and bottom 2.5 percent of malaria risk distribution to avoid influence of outliers. Vertical dashed lines indicate 25th, 50th, and 75th percentiles of predicted malaria risk respectively.
|
98 |
+
\end{minipage}
|
99 |
+
\end{figure}
|
100 |
+
|
101 |
+
% TREATMENT OUTCOMES AND VOUCHER USE BY PREDICTED MALARIA RISK-NEW
|
102 |
+
\begin{figure}[ht]
|
103 |
+
\caption{Use of Vouchers for Simple and Severe Malaria by Treatment Arm}
|
104 |
+
\label{voucher_tmt}
|
105 |
+
\begin{minipage}{.93\linewidth}
|
106 |
+
\includegraphics[width=21cm]{{"\fig/5_voucher_tmt"}.pdf}
|
107 |
+
\footnotesize
|
108 |
+
\emph{Notes:} Each panel graphs the share of patients receiving the specified treatment by voucher condition. \end{minipage}
|
109 |
+
\end{figure}
|
110 |
+
\end{landscape}
|
111 |
+
|
112 |
+
%%%%%%%%%%% TABLES %%%%%%%%%%%
|
113 |
+
\begin{landscape}
|
114 |
+
\input{"\tab/1_control_group.tex"}
|
115 |
+
\end{landscape}
|
116 |
+
|
117 |
+
%\input{_TabFig/theory_table_new.tex}
|
118 |
+
\input{"\tab/2_balance.tex"}
|
119 |
+
|
120 |
+
\input{"\tab/3_mal_tmt_overall_new_lso.tex"}
|
121 |
+
|
122 |
+
\input{"\tab/4_mal_tmt_het_new_lso.tex"}
|
123 |
+
|
124 |
+
\begin{landscape}
|
125 |
+
|
126 |
+
\input{"\tab/5_expected_match_decomp_lso.tex"}
|
127 |
+
|
128 |
+
\end{landscape}
|
129 |
+
|
130 |
+
\end{document}
|
131 |
+
|
21/replication_package/Survey Instruments/CSComPatientInterview_Questionnaire.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cb74574d791e6cf6cc06e6503db7fd58b946800d00af965f21bc70b4cf977d12
|
3 |
+
size 14236968
|
21/replication_package/Survey Instruments/DocPat-ClinicCensus-FR-2016-05-17.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f48d2faf0e18b8ed47906851b870473c66ff459a1cb9a57f8e09cc29a0d23a6a
|
3 |
+
size 219670
|
21/replication_package/Survey Instruments/DoctorEndlineInterview_Questionnaire.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:03dc32f7bbdc840b29cea7621c45668fe6b78c77b8156fc8d2981cc953452d54
|
3 |
+
size 201146
|
21/replication_package/Survey Instruments/HomePatientInterview_Questionnaire.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:53830b7eba9da9eff3fa0b3d4ba8169ee3fd35a1a4af652995c0d55f17bb2b73
|
3 |
+
size 594075
|
21/replication_package/Survey Instruments/Interventions_Notes.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7d1bebf0021e20519f815e6e924cdeec278ed0fb399d8bb0cade1a190ecf8f62
|
3 |
+
size 138369
|
21/replication_package/Survey Instruments/MorningCSComID_Questionnaire.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f5eb403693c0e31645d0dfec65f74a6fe1712f67632bd3a2c9e1021c20f24c43
|
3 |
+
size 139075
|
21/replication_package/Tables/1_control_group.tex
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
\begin{table}[h!] \begin{adjustbox}{max width=1.2\textwidth} \begin{threeparttable} \caption{Descriptive Statistics from Control Group} \label{control_group} { \begin{tabular}{l*{6}{c}} \hline\hline & \multicolumn{1}{c}{(1)} & \multicolumn{1}{c}{(2)} & \multicolumn{1}{c}{(3)} & \multicolumn{1}{c}{(4)} & \multicolumn{1}{c}{(5)} \\ & \multicolumn{2}{c}{Full Sample} & \multicolumn{3}{c}{Has Valid RDT (Home Survey)} & \\ \cmidrule(lr){2-3} \cmidrule(lr){4-6} & \multicolumn{1}{c}{\shortstack{N}} & \multicolumn{1}{c}{\shortstack{Mean}} & \multicolumn{1}{c}{\shortstack{All\\Patients}} & \multicolumn{1}{c}{\shortstack{RDT\\Positive}} & \multicolumn{1}{c}{\shortstack{RDT\\Negative}} \\ \hline
|
2 |
+
\emph{Panel A. Malaria Beliefs and Treatment Outcomes} & \\
|
3 |
+
\enspace Respondent Suspects Illness is Malaria (Pre-Consultation) & 628& 0.551& 0.610& 0.791& 0.550&\\
|
4 |
+
\enspace Simple Malaria Treatment: Prescribed & 627& 0.313& 0.295& 0.163& 0.338&\\
|
5 |
+
\enspace Simple Malaria Treatment: Purchased & 627& 0.206& 0.197& 0.140& 0.215&\\
|
6 |
+
\enspace Severe Malaria Treatment: Prescribed & 627& 0.303& 0.327& 0.593& 0.238&\\
|
7 |
+
\enspace Severe Malaria Treatment: Purchased & 627& 0.255& 0.283& 0.535& 0.200&\\
|
8 |
+
\emph{Panel B. Other Treatment Outcomes} & \\
|
9 |
+
\enspace Purchased Antibiotics & 627& 0.426& 0.442& 0.430& 0.446&\\
|
10 |
+
\enspace Received Injection or IV & 628& 0.398& 0.454& 0.674& 0.381&\\
|
11 |
+
\enspace Patient Referred to Hospital or Placed Under Observation & 628& 0.139& 0.179& 0.395& 0.108&\\
|
12 |
+
\emph{Panel C. Patient Costs} & \\
|
13 |
+
\enspace Total Cost No Malaria Treatment (CFA) & 301& 2793.349& -- & -- & -- &\\
|
14 |
+
\enspace Total Cost Simple Malaria (CFA) & 126& 4474.873& -- & -- & -- &\\
|
15 |
+
\enspace Total Cost Severe Malaria (CFA) & 147& 10352.714& -- & -- & -- &\\
|
16 |
+
\hline \end{tabular} } \begin{tablenotes}[flushleft] \small \item \emph{Notes}: Column 1 reports the number of non-missing observations of variables among all individuals in the Control group. Column 2 reports means for this sample. Columns 3-6 limit the sample to Control group individuals who were administered a valid RDT test at home, with column 3 reporting means for all patients with a valid test, column 4 reporting means for patients with a positive test, and column 5 reporting means for patients with a negative test. Sample sizes for columns 3, 4, and 5 are 346, 86, and 260 respectively. Variables measured in CFA top-coded at the 99th percentile. CFA610 $\approx$ USD1. \end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table}
|
21/replication_package/Tables/2_balance.tex
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
\begin{table}[h!] \begin{adjustbox}{max width=.8\textwidth} \begin{threeparttable} \caption{Demographic Characteristics and Randomization Verification} \label{balance} { \begin{tabular}{l*{7}{c}} \hline\hline & \multicolumn{1}{c}{(1)} & \multicolumn{1}{c}{(2)} & \multicolumn{1}{c}{(3)} & \multicolumn{1}{c}{(4)} & \multicolumn{1}{c}{(5)} & \multicolumn{1}{c}{(6)} \\ & & \multicolumn{2}{c}{Regression Coefficients} & \multicolumn{2}{c}{P-Values} & \\ \cmidrule(lr){3-4} \cmidrule(lr){5-6} & \multicolumn{1}{c}{\shortstack{Control\\Mean}} & \multicolumn{1}{c}{\shortstack{Patient\\Voucher}} & \multicolumn{1}{c}{\shortstack{Doctor\\ Voucher}} & \multicolumn{1}{c}{\shortstack{Joint Test\\ PV=DV}} & \multicolumn{1}{c}{\shortstack{Joint Test \\ PV=DV=0}} & \multicolumn{1}{c}{N} \\ \hline
|
2 |
+
\multicolumn{7}{l}{\it{A. Sample Frame (Clinic $\times$ Day-Level Observations)}} .\\
|
3 |
+
\enspace Number Eligible Logged Patients & 5.233& 0.757\sym{**}& 0.634\sym{**}& 0.725& 0.054\sym{*}& 360\\
|
4 |
+
\thinspace & [3.322]& (0.348)& (0.312)& & & & \\
|
5 |
+
\multicolumn{7}{l}{\it{B. Patient Characteristics (Individual-Level Observations)}} .\\
|
6 |
+
\enspace Number of symptoms & 3.559& 0.023& -0.090& 0.114& 0.270& 2055\\
|
7 |
+
\thinspace & [1.578]& (0.081)& (0.086)& & & & \\
|
8 |
+
\enspace Fever & 0.801& 0.045\sym{*}& 0.012& 0.096\sym{*}& 0.130& 2055\\
|
9 |
+
\thinspace & [0.400]& (0.024)& (0.022)& & & & \\
|
10 |
+
\enspace Chills or Excessive Sweating & 0.298& -0.045& -0.051\sym{**}& 0.782& 0.092\sym{*}& 2055\\
|
11 |
+
\thinspace & [0.458]& (0.027)& (0.024)& & & & \\
|
12 |
+
\enspace Nausea, Vomiting, or Diarrhea & 0.497& -0.004& -0.024& 0.455& 0.599& 2055\\
|
13 |
+
\thinspace & [0.500]& (0.028)& (0.026)& & & & \\
|
14 |
+
\enspace Poor Appetite & 0.505& -0.023& -0.040& 0.501& 0.292& 2055\\
|
15 |
+
\thinspace & [0.500]& (0.031)& (0.026)& & & & \\
|
16 |
+
\enspace Headache & 0.621& -0.006& -0.007& 0.963& 0.951& 2055\\
|
17 |
+
\thinspace & [0.486]& (0.023)& (0.023)& & & & \\
|
18 |
+
\enspace Cough & 0.363& 0.027& -0.005& 0.230& 0.403& 2055\\
|
19 |
+
\thinspace & [0.481]& (0.025)& (0.028)& & & & \\
|
20 |
+
\enspace Weakness/Fatigue & 0.475& 0.029& 0.025& 0.881& 0.538& 2055\\
|
21 |
+
\thinspace & [0.500]& (0.028)& (0.027)& & & & \\
|
22 |
+
\enspace Duration of Illness in Days & 4.299& 0.180& -0.007& 0.444& 0.648& 2055\\
|
23 |
+
\thinspace & [4.276]& (0.233)& (0.268)& & & & \\
|
24 |
+
\enspace Age & 16.603& 1.545\sym{**}& 1.282\sym{*}& 0.760& 0.078\sym{*}& 2055\\
|
25 |
+
\thinspace & [15.096]& (0.760)& (0.740)& & & & \\
|
26 |
+
\enspace Under 5 Years Old & 0.314& -0.041& -0.034& 0.746& 0.179& 2055\\
|
27 |
+
\thinspace & [0.464]& (0.025)& (0.022)& & & & \\
|
28 |
+
\enspace Male & 0.395& 0.031& 0.058\sym{**}& 0.377& 0.102& 2055\\
|
29 |
+
\thinspace & [0.489]& (0.030)& (0.026)& & & & \\
|
30 |
+
\enspace Patient is Pregnant & 0.105& 0.003& -0.016& 0.331& 0.567& 1139\\
|
31 |
+
\thinspace & [0.307]& (0.022)& (0.020)& & & & \\
|
32 |
+
\enspace Positive RDT (home) & 0.249& -0.037& 0.028& 0.015\sym{**}& 0.051\sym{*}& 1126\\
|
33 |
+
\thinspace & [0.433]& (0.027)& (0.027)& & & & \\
|
34 |
+
\enspace Predicted Malaria Risk & 0.212& 0.008& 0.008& 0.981& 0.361& 2055\\
|
35 |
+
\thinspace & [0.160]& (0.007)& (0.007)& & & & \\
|
36 |
+
\multicolumn{7}{l}{\it{C. Respondent and Household Characteristics (Individual-Level Observations)}} .\\
|
37 |
+
\enspace Patient Answered Clinic Survey & 0.470& 0.003& 0.003& 0.990& 0.990& 2055\\
|
38 |
+
\thinspace & [0.499]& (0.026)& (0.024)& & & & \\
|
39 |
+
\enspace Male & 0.264& 0.017& 0.039\sym{*}& 0.350& 0.213& 2055\\
|
40 |
+
\thinspace & [0.441]& (0.024)& (0.022)& & & & \\
|
41 |
+
\enspace Bambara & 0.377& 0.006& 0.011& 0.850& 0.926& 2053\\
|
42 |
+
\thinspace & [0.485]& (0.023)& (0.027)& & & & \\
|
43 |
+
\enspace Speaks French & 0.518& -0.015& 0.000& 0.550& 0.822& 2055\\
|
44 |
+
\thinspace & [0.500]& (0.031)& (0.027)& & & & \\
|
45 |
+
\enspace Literate (in French) & 0.264& -0.005& -0.012& 0.772& 0.901& 2055\\
|
46 |
+
\thinspace & [0.441]& (0.030)& (0.028)& & & & \\
|
47 |
+
\enspace Primary School or Less & 0.424& 0.046& 0.047& 0.962& 0.248& 2055\\
|
48 |
+
\thinspace & [0.495]& (0.033)& (0.030)& & & & \\
|
49 |
+
\enspace Household Size$^+$ & 10.308& 0.347& 0.729& 0.500& 0.483& 1491\\
|
50 |
+
\thinspace & [8.111]& (0.506)& (0.602)& & & & \\
|
51 |
+
\enspace Share HH Under 15$^+$ & 0.412& 0.017& 0.013& 0.777& 0.397& 1485\\
|
52 |
+
\thinspace & [0.191]& (0.013)& (0.014)& & & & \\
|
53 |
+
\enspace Share HH Members Working$^+$ & 0.258& -0.004& -0.002& 0.886& 0.937& 1485\\
|
54 |
+
\thinspace & [0.188]& (0.010)& (0.011)& & & & \\
|
55 |
+
\enspace Monthly income per capita$^+$ & 21987.613& -2143.183& -2928.525\sym{**}& 0.522& 0.135& 1432\\
|
56 |
+
\thinspace & [25298.328]& (1388.442)& (1459.962)& & & & \\
|
57 |
+
\enspace Rental Value of Home$^+$ & 63823.469& -2452.218& -5053.802& 0.607& 0.694& 1469\\
|
58 |
+
\thinspace & [90722.250]& (5457.584)& (5934.901)& & & & \\
|
59 |
+
\enspace Mosquito Nets Per Capita$^+$ & 0.491& -0.016& -0.012& 0.830& 0.766& 1482\\
|
60 |
+
\thinspace & [0.342]& (0.022)& (0.021)& & & & \\
|
61 |
+
\hline \end{tabular} } \begin{tablenotes}[flushleft] \small \item \emph{Notes}: Robust standard errors clustered at the clinic level in parentheses. All regressions include clinic visit date fixed effects. $^+$ indicates that variable was recorded in the home survey only. Variables measured in CFA and duration of illness top-coded at the 99th percentile. CFA610 $\approx$ USD1. *, **, and *** denote statistical significance at the 10, 5, and 1 percent levels respectively. \end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table}
|
21/replication_package/Tables/3_mal_tmt_overall_new_lso.tex
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
\begin{table}[ht!] \begin{adjustbox}{max width=.95\textwidth} \begin{threeparttable} \caption{Impacts on Malaria Treatment Outcomes} \label{mal_tmt_overall_new} {\begin{tabular}{l*{6}{C{0.12\linewidth}}} \toprule \toprule & (1) & (2) & (3) & (4) & (5) \\ & & \multicolumn{2}{c}{Any Malaria Treatment} & \multicolumn{2}{c}{Severe Malaria Treatment} \\ \cmidrule(lr){3-4} \cmidrule(lr){5-6} \\ & Used Voucher& Prescribed& Purchased& Prescribed& Purchased \\ \toprule
|
2 |
+
$\beta_P$: Patient Voucher& 0.35\sym{***}& 0.052\sym{**} & 0.14\sym{***}& -0.046\sym{**} & -0.022 \\
|
3 |
+
& (0.030) & (0.025) & (0.027) & (0.018) & (0.020) \\
|
4 |
+
$\beta_D$: Doctor Voucher& 0.26\sym{***}& 0.016 & 0.085\sym{***}& -0.054\sym{**} & -0.050\sym{***}\\
|
5 |
+
& (0.024) & (0.025) & (0.025) & (0.021) & (0.019) \\
|
6 |
+
\emph{P-values and theory-driven tests}& & & & & \\
|
7 |
+
\enspace $\beta_P=\beta_D$&0.011\sym{**} &0.079\sym{*} &0.018\sym{**} & 0.735 & 0.193 \\
|
8 |
+
\enspace Test for mechanism:& GC & PD & PD & DD & DD \\
|
9 |
+
\enspace Significant evidence of mechanism:& Yes & Yes & Yes & No & No \\
|
10 |
+
& & & & & \\
|
11 |
+
Mean (Control) & 0.000 & 0.616 & 0.461 & 0.303 & 0.255 \\
|
12 |
+
N & 2055 & 2053 & 2053 & 2053 & 2053 \\
|
13 |
+
\hline \end{tabular} } \begin{tablenotes}[flushleft] \small \item \emph{Notes}: Robust standard errors clustered at the clinic level in parentheses. All regressions control for clinic visit date fixed effects. We use double selection lasso to choose additional controls. Eligible controls include clinic dummies, symptom dummies, duration of illness (topcoded at the 99th percentile) and its square, patient age and its square, a dummy for patients under 5, patient gender, a dummy to identify pregnant patients, a dummy to identify whether the patient (versus a caregiver) answered the survey, the gender of the survey respondent, an ethnicity (Bambara) dummy, a dummy for French speaking respondents, a dummy for literate respondents, a dummy for respondents with a primary education or less, a dummy to identify patients in the home-based follow up survey, and pairwise interactions between all previously-listed patient and respondent controls. Missing values are recoded to the sample mean and separately dummied out. These missing dummies are also used to construct pairwise interactions. GC, PD, and DD indicate tests of gatekeeping costs, patient-driven, and doctor-driven demand respectively. *, **, and *** denote statistical significance at the 10, 5, and 1 percent levels respectively. \end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table}
|
21/replication_package/Tables/4_mal_tmt_het_new_lso.tex
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
\begin{table}[ht!] \begin{adjustbox}{max width=1\textwidth} \begin{threeparttable} \caption{Impacts on Malaria Treatment Outcomes - Heterogeneity by Predicted Malaria Risk} \label{mal_tmt_het_new} {\begin{tabular}{l*{6}{C{0.12\linewidth}}} \toprule \toprule & (1) & (2) & (3) & (4) & (5) \\ & & \multicolumn{2}{c}{Any Malaria Treatment} & \multicolumn{2}{c}{Severe Malaria Treatment} \\ \cmidrule(lr){3-4} \cmidrule(lr){5-6} \\ & Used Voucher& Prescribed& Purchased& Prescribed& Purchased \\ \toprule
|
2 |
+
$\delta_{PH}$: Patient Voucher $\times$ High Risk& 0.34\sym{***}& 0.035 & 0.12\sym{***}& -0.055\sym{*} & -0.020 \\
|
3 |
+
& (0.039) & (0.035) & (0.037) & (0.031) & (0.033) \\
|
4 |
+
$\delta_{DH}$: Doctor Voucher $\times$ High Risk& 0.32\sym{***}& 0.021 & 0.078\sym{**} & -0.12\sym{***}& -0.12\sym{***}\\
|
5 |
+
& (0.038) & (0.034) & (0.036) & (0.036) & (0.033) \\
|
6 |
+
$\delta_{PL}$: Patient Voucher $\times$ Low Risk& 0.36\sym{***}& 0.092\sym{**} & 0.18\sym{***}& -0.026 & -0.016 \\
|
7 |
+
& (0.041) & (0.036) & (0.041) & (0.027) & (0.029) \\
|
8 |
+
$\delta_{DL}$: Doctor Voucher $\times$ Low Risk& 0.21\sym{***}& 0.011 & 0.086\sym{**} & -0.0019 & 0.0085 \\
|
9 |
+
& (0.033) & (0.035) & (0.034) & (0.030) & (0.026) \\
|
10 |
+
$\theta$: High Malaria Risk& 0.0029 & 0.13\sym{***}& 0.13\sym{***}& 0.090\sym{*} & 0.093\sym{**} \\
|
11 |
+
& (0.041) & (0.046) & (0.048) & (0.048) & (0.043) \\
|
12 |
+
\emph{P-values and theory-driven tests}& & & & & \\
|
13 |
+
\enspace $\delta_{PH}=\delta_{DH}$& 0.749 & 0.689 & 0.275 & 0.101 &0.007\sym{***} \\
|
14 |
+
\enspace Test for mechanism:& GC/DD & -- & -- & DD & DD \\
|
15 |
+
\enspace Significant evidence of mechanism:& No & -- & -- & No & No \\
|
16 |
+
& & & & & \\
|
17 |
+
\enspace $\delta_{PL}=\delta_{DL}$&0.000\sym{***} &0.030\sym{**} &0.014\sym{**} & 0.481 & 0.435 \\
|
18 |
+
\enspace Test for mechanism:& GC/PD & PD & PD & -- & -- \\
|
19 |
+
\enspace Significant evidence of mechanism:& Yes & Yes & Yes & -- & -- \\
|
20 |
+
& & & & & \\
|
21 |
+
Mean (Control, Low Risk)& 0.000 & 0.486 & 0.329 & 0.154 & 0.116 \\
|
22 |
+
N & 2055 & 2053 & 2053 & 2053 & 2053 \\
|
23 |
+
\hline \end{tabular} } \begin{tablenotes}[flushleft] \small \item \emph{Notes}: Robust standard errors clustered at the clinic level in parentheses. All regressions control for clinic visit date fixed effects. We use double selection lasso to choose additional controls. See notes to Table 3 for a list of potential controls. Standard errors are based on 1,000 bootstrap replications, with re-sampling at the clinic level. Predicted malaria risk is re-calculated on each bootstrap replication. GC, PD, and DD indicate tests of gatekeeping costs, patient-driven, and doctor-driven demand respectively. *, **, and *** denote statistical significance at the 10, 5, and 1 percent levels respectively. \end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table}
|
21/replication_package/Tables/5_expected_match_decomp_lso.tex
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
\begin{table}[ht!] \begin{adjustbox}{max width=1.25\textwidth} \begin{threeparttable} \caption{Impacts on Match Between Treatment and Illness} \label{expected_match_decomp} {\begin{tabular}{l*{7}{C{0.1\linewidth}}} \toprule \toprule & (1) & (2) & (3) & (4) & (5) & (6) \\ & \multicolumn{3}{c}{Expected Match: Prescribed} & \multicolumn{3}{c}{Expected Match: Purchased} \\ \cmidrule(lr){2-4} \cmidrule(lr){5-7} \\ & Malaria Positive& Malaria Negative& Overall Match& Malaria Positive& Malaria Negative& Overall Match \\ \toprule
|
2 |
+
$\beta_P$: Patient Voucher& 0.0096 & -0.043\sym{**} & -0.032\sym{*} & 0.023\sym{***}& -0.11\sym{***}& -0.083\sym{***}\\
|
3 |
+
& (0.0070) & (0.021) & (0.017) & (0.0079) & (0.022) & (0.017) \\
|
4 |
+
$\beta_D$: Doctor Voucher& 0.0073 & -0.0074 & 0.0049 & 0.018\sym{***}& -0.063\sym{***}& -0.039\sym{**} \\
|
5 |
+
& (0.0076) & (0.021) & (0.017) & (0.0071) & (0.020) & (0.016) \\
|
6 |
+
\emph{P-values} & & & & & & \\
|
7 |
+
\enspace $\beta_P=\beta_D$& 0.718 &0.034\sym{**} &0.006\sym{***} & 0.537 &0.008\sym{***} &0.002\sym{***} \\
|
8 |
+
\enspace $\beta_P=\beta_D=0$& 0.384 &0.050\sym{*} &0.015\sym{**} &0.007\sym{***} &0.000\sym{***} &0.000\sym{***} \\
|
9 |
+
& & & & & & \\
|
10 |
+
Mean (Control) & 0.153 & 0.326 & 0.479 & 0.122 & 0.449 & 0.570 \\
|
11 |
+
N & 2053 & 2053 & 2053 & 2053 & 2053 & 2053 \\
|
12 |
+
\hline \end{tabular} } \begin{tablenotes}[flushleft] \small \item \emph{Notes}: Robust standard errors clustered at the clinic level in parentheses. All regressions control for clinic visit date fixed effects. We use double selection lasso to choose additional controls. See notes to Table 3 for a list of potential controls. The expected match for malaria positive is equal to predicted malaria risk times the relevant malaria treatment/purchase dummy. The expected match for malaria negative is equal to one minus predicted malaria risk times one minus the malaria prescription/purchase dummy. The overall expected match is the sum of these two variables. *, **, and *** denote statistical significance at the 10, 5, and 1 percent levels respectively. \end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table}
|
21/replication_package/Tables/A1_theory_table.tex
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
|
3 |
+
|
4 |
+
\begin{table}[h!] \begin{adjustbox}{max width=1.2\textwidth} \begin{threeparttable}
|
5 |
+
\caption{Doctor's Expected Utility from Different Prescription Choices}
|
6 |
+
\label{tab:Doctor's-expected-utility} {
|
7 |
+
\begin{tabular}{|c|c|c|}
|
8 |
+
\hline
|
9 |
+
& {\footnotesize{}Utility from treatment use} & {\footnotesize{}Utility loss from gatekeeping cost}\tabularnewline
|
10 |
+
\hline
|
11 |
+
% No treatment
|
12 |
+
\hline
|
13 |
+
\multicolumn{3}{|l|}{{\footnotesize{}No treatment}}\tabularnewline
|
14 |
+
\hline
|
15 |
+
{\footnotesize{}(1) C \& DV} & {\footnotesize{}0} & {\footnotesize{}$-g\int_{L_{P}}U_{l}(\pi,P)dF(\pi|\gamma,\eta)-g\int_{H_{P}}U_{v}(\pi)dF(\pi|\gamma,\eta)$}\tabularnewline
|
16 |
+
\hline
|
17 |
+
{\footnotesize{}(2) PV} & {\footnotesize{}0} & {\footnotesize{}$-g\int_{L_{0}}U_{l}(\pi,0)dF(\pi|\gamma,\eta)-g\int_{H_{0}}U_{v}(\pi)dF(\pi|\gamma,\eta)$}\tabularnewline
|
18 |
+
\hline
|
19 |
+
% Severe treatment
|
20 |
+
\multicolumn{3}{|l|}{{\footnotesize{}Severe treatment}}\tabularnewline
|
21 |
+
\hline
|
22 |
+
{\footnotesize{}(3) C \& DV} & {\footnotesize{}$P(\pi\in L2_{P}\cup H_{P})V_{v}(\hat{\pi})$} & {\footnotesize{}$-g\int_{L1_{P}}U_{l}(\pi,P)dF(\pi|\gamma,\eta)-g\int_{L2_{P}}\left[U_{l}(\pi,P)-U_{v}(\pi)\right]dF(\pi|\gamma,\eta)$}\tabularnewline
|
23 |
+
\hline
|
24 |
+
{\footnotesize{}(4) PV} & {\footnotesize{}$P(\pi\in L2_{0}\cup H_{0})V_{v}(\hat{\pi})$} & {\footnotesize{}$-g\int_{L1_{0}}U_{l}(\pi,0)dF(\pi|\gamma,\eta)-g\int_{L2_{0}}\left[U_{l}(\pi,0)-U_{v}(\pi)\right]dF(\pi|\gamma,\eta)$}\tabularnewline
|
25 |
+
\hline
|
26 |
+
% Simple treatment
|
27 |
+
\multicolumn{3}{|l|}{{\footnotesize{}Simple treatment}}\tabularnewline
|
28 |
+
\hline
|
29 |
+
{\footnotesize{}(5) C \& (DV/no voucher)} & {\footnotesize{}$P(\pi\in L_{P}\cup H_{P})V_{l}(\hat{\pi},P)$} & {\footnotesize{}$-g\int_{H_{P}}\left[U_{v}(\pi)-U_{l}(\pi,P)\right]dF(\pi|\gamma,\eta)$}\tabularnewline
|
30 |
+
\hline
|
31 |
+
{\footnotesize{}(6) (PV \& DV)/voucher} & {\footnotesize{}$P(\pi\in L_{0}\cup H_{0})V_{l}(\hat{\pi},0)$} & {\footnotesize{}$-g\int_{H_{0}}\left[U_{v}(\pi)-U_{l}(\pi,0)\right]dF(\pi|\gamma,\eta)$}\tabularnewline
|
32 |
+
\hline
|
33 |
+
\multirow{2}{*}{{\footnotesize{}(7) PV/no voucher}} & \multirow{2}{*}{{\footnotesize{}$P(\pi\in L_{P}\cup H_{P})V_{l}(\hat{\pi},P)$}} & {\footnotesize{}$-g\int_{L1_{0}\backslash L1_{P}}U_{l}(\pi,0)dF(\pi |\gamma,\eta)-g\int_{L1_{P}\cup L2_{0}}\left[U_{l}(\pi,0)-U_{l}(\pi,P)\right]dF(\pi |\gamma,\eta)$}\tabularnewline
|
34 |
+
& & {\footnotesize{}$-g\int_{H_{0}}\left[U_{v}(\pi)-U_{l}(\pi,P)\right]dF(\pi|\gamma,\eta)$}\tabularnewline
|
35 |
+
\hline
|
36 |
+
% Choice
|
37 |
+
\multicolumn{3}{|l|}{{\footnotesize{}Patient choice between simple and severe treatment}}\tabularnewline
|
38 |
+
\hline
|
39 |
+
{\footnotesize{}(8) C \& (DV/no voucher)} & {\footnotesize{}$P(\pi\in L_{P})V_{l}(\hat{\pi},P)+P(\pi\in H_{P})V_{v}(\hat{\pi})$} & 0
|
40 |
+
\tabularnewline
|
41 |
+
\hline
|
42 |
+
{\footnotesize{}(9) C \& (PV \& DV/voucher)} & {\footnotesize{}$P(\pi\in L_{0})V_{l}(\hat{\pi},0)+P(\pi\in H_{0})V_{v}(\hat{\pi})$} & 0
|
43 |
+
\tabularnewline
|
44 |
+
\hline
|
45 |
+
\multirow{2}{*}{{\footnotesize{}(10) PV/no voucher}} & \multirow{2}{*}{{\footnotesize{}$P(\pi\in L_{P})V_{l}(\hat{\pi},P)+P(\pi\in H_{P})V_{v}(\hat{\pi})$}} &
|
46 |
+
{\footnotesize{}$-g\int_{L_{0}}U_{l}(\pi,0)dF(\pi|\gamma,\eta)$}\tabularnewline
|
47 |
+
& & {\footnotesize{}$+g\int_{L_{P}}U_{l}(\pi,P)dF(\pi|\gamma,\eta)+g\int_{H_{P}\backslash H_0}U_{v}(\pi)dF(\pi |\gamma,\eta)$}\tabularnewline
|
48 |
+
\hline
|
49 |
+
|
50 |
+
\end{tabular}
|
51 |
+
} \begin{tablenotes}[flushleft] \small
|
52 |
+
\item \emph{Notes}: C denotes control, DV denotes voucher given to doctor, PV denotes voucher given to patient. "No voucher" and "voucher" indicate if the doctor offers the subsidy when prescribing simple treatment.
|
53 |
+
\end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table}
|
54 |
+
|
55 |
+
|
21/replication_package/Tables/B10_mal_tmt_overall_nl.tex
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
\begin{table}[ht!] \begin{adjustbox}{max width=.8\textwidth} \begin{threeparttable} \caption{Impacts on Malaria Treatment Outcomes} \label{mal_tmt_overall_nl} {\begin{tabular}{l*{6}{C{0.12\linewidth}}} \toprule \toprule & (1) & (2) & (3) & (4) & (5) \\ & & \multicolumn{2}{c}{Any Malaria Treatment} & \multicolumn{2}{c}{Severe Malaria Treatment} \\ \cmidrule(lr){3-4} \cmidrule(lr){5-6} \\ & Used Voucher& Prescribed& Purchased& Prescribed& Purchased \\ \toprule
|
2 |
+
$\beta_P$: Patient Voucher& 0.35\sym{***}& 0.060\sym{**} & 0.14\sym{***}& -0.038\sym{**} & -0.017 \\
|
3 |
+
& (0.030) & (0.026) & (0.029) & (0.019) & (0.021) \\
|
4 |
+
$\beta_D$: Doctor Voucher& 0.26\sym{***}& 0.016 & 0.080\sym{***}& -0.059\sym{***}& -0.054\sym{***}\\
|
5 |
+
& (0.024) & (0.025) & (0.026) & (0.022) & (0.020) \\
|
6 |
+
\emph{P-values and theory-driven tests}& & & & & \\
|
7 |
+
\enspace $\beta_P=\beta_D$&0.011\sym{**} &0.059\sym{*} &0.019\sym{**} & 0.419 & 0.112 \\
|
8 |
+
\enspace Test for mechanism:& GC & PD & PD & DD & DD \\
|
9 |
+
\enspace Significant evidence of mechanism:& Yes & Yes & Yes & No & No \\
|
10 |
+
& & & & & \\
|
11 |
+
Mean (Control) & 0.000 & 0.616 & 0.461 & 0.303 & 0.255 \\
|
12 |
+
N & 2055 & 2053 & 2053 & 2053 & 2053 \\
|
13 |
+
\hline \end{tabular} } \begin{tablenotes}[flushleft] \small \item \emph{Notes}: Robust standard errors clustered at the clinic level in parentheses. All regressions control for clinic visit date fixed effects. Controls include number of symptoms, symptom dummies, duration of illness (topcoded at the 99th percentile), patient age, a dummy for patients under 5, patient gender, dummy to identify pregnant patients, a dummy to identify whether the patient (versus a caregiver) answered the survey, the gender of the survey respondent, an ethnicity (Bambara) dummy, a dummy for French speaking respondents, a dummy for literate respondents, a dummy for respondents with a primary education or less. Missing values are recoded to the sample mean. GC, PD, and DD indicate tests of gatekeeping costs, patient-driven, and doctor-driven demand respectively. *, **, and *** denote statistical significance at the 10, 5, and 1 percent levels respectively. \end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table}
|
21/replication_package/Tables/B11_mal_tmt_het_nl.tex
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
\begin{table}[ht!] \begin{adjustbox}{max width=.8\textwidth} \begin{threeparttable} \caption{Impacts on Malaria Treatment Outcomes - Heterogeneity by Predicted Malaria Risk} \label{mal_tmt_het_nl} {\begin{tabular}{l*{6}{C{0.12\linewidth}}} \toprule \toprule & (1) & (2) & (3) & (4) & (5) \\ & & \multicolumn{2}{c}{Any Malaria Treatment} & \multicolumn{2}{c}{Severe Malaria Treatment} \\ \cmidrule(lr){3-4} \cmidrule(lr){5-6} \\ & Used Voucher& Prescribed& Purchased& Prescribed& Purchased \\ \toprule
|
2 |
+
$\delta_{PH}$: Patient Voucher $\times$ High Risk& 0.34\sym{***}& 0.035 & 0.11\sym{***}& -0.056\sym{*} & -0.023 \\
|
3 |
+
& (0.040) & (0.037) & (0.039) & (0.031) & (0.032) \\
|
4 |
+
$\delta_{DH}$: Doctor Voucher $\times$ High Risk& 0.32\sym{***}& 0.032 & 0.082\sym{**} & -0.12\sym{***}& -0.12\sym{***}\\
|
5 |
+
& (0.038) & (0.033) & (0.036) & (0.034) & (0.032) \\
|
6 |
+
$\delta_{PL}$: Patient Voucher $\times$ Low Risk& 0.36\sym{***}& 0.090\sym{**} & 0.18\sym{***}& -0.019 & -0.012 \\
|
7 |
+
& (0.041) & (0.036) & (0.040) & (0.027) & (0.028) \\
|
8 |
+
$\delta_{DL}$: Doctor Voucher $\times$ Low Risk& 0.20\sym{***}& 0.00094 & 0.079\sym{**} & -0.0013 & 0.0066 \\
|
9 |
+
& (0.031) & (0.035) & (0.033) & (0.029) & (0.024) \\
|
10 |
+
$\theta$: High Malaria Risk& -0.054 & 0.061 & 0.054 & 0.096\sym{**} & 0.078\sym{*} \\
|
11 |
+
& (0.041) & (0.045) & (0.049) & (0.049) & (0.046) \\
|
12 |
+
\emph{P-values and theory-driven tests}& & & & & \\
|
13 |
+
\enspace $\delta_{PH}=\delta_{DH}$& 0.727 & 0.932 & 0.413 & 0.121 &0.012\sym{**} \\
|
14 |
+
\enspace Test for mechanism:& GC/DD & -- & -- & DD & DD \\
|
15 |
+
\enspace Significant evidence of mechanism:& No & -- & -- & No & No \\
|
16 |
+
& & & & & \\
|
17 |
+
\enspace $\delta_{PL}=\delta_{DL}$&0.000\sym{***} &0.016\sym{**} &0.011\sym{**} & 0.615 & 0.554 \\
|
18 |
+
\enspace Test for mechanism:& GC/PD & PD & PD & -- & -- \\
|
19 |
+
\enspace Significant evidence of mechanism:& Yes & Yes & Yes & -- & -- \\
|
20 |
+
& & & & & \\
|
21 |
+
Mean (Control, Low Risk)& 0.000 & 0.486 & 0.329 & 0.154 & 0.116 \\
|
22 |
+
N & 2055 & 2053 & 2053 & 2053 & 2053 \\
|
23 |
+
\hline \end{tabular} } \begin{tablenotes}[flushleft] \small \item \emph{Notes}: Robust standard errors clustered at the clinic level in parentheses. All regressions control for clinic visit date fixed effects. Controls include number of symptoms, symptom dummies, duration of illness (topcoded at the 99th percentile), patient age, a dummy for patients under 5, patient gender, dummy to identify pregnant patients, a dummy to identify whether the patient (versus a caregiver) answered the survey, the gender of the survey respondent, an ethnicity (Bambara) dummy, a dummy for French speaking respondents, a dummy for literate respondents, a dummy for respondents with a primary education or less. Missing values are recoded to the sample mean. GC, PD, and DD indicate tests of gatekeeping costs, patient-driven, and doctor-driven demand respectively. *, **, and *** denote statistical significance at the 10, 5, and 1 percent levels respectively. \end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table}
|
21/replication_package/Tables/B12_vouchers_tmt_lso.tex
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
\begin{table}[ht!] \begin{adjustbox}{max width=.8\textwidth} \begin{threeparttable} \caption{Use of Voucher for Purchased Malaria Treatment} \label{vouchers_tmt} {\begin{tabular}{l*{5}{C{0.1\linewidth}}} \toprule \toprule & (1) & (2) & (3) & (4) \\ & Severe Malaria Treatment and Used Voucher& Severe Malaria Treatment, No Voucher& Simple Malaria Treatment and Used Voucher& Simple Malaria Treatment, No Voucher \\ \toprule
|
2 |
+
$\beta_P$: Patient Voucher& 0.042\sym{***}& -0.065\sym{***}& 0.31\sym{***}& -0.14\sym{***}\\
|
3 |
+
& (0.010) & (0.020) & (0.029) & (0.021) \\
|
4 |
+
$\beta_D$: Doctor Voucher& 0.0097\sym{*} & -0.062\sym{***}& 0.26\sym{***}& -0.11\sym{***}\\
|
5 |
+
& (0.0054) & (0.020) & (0.024) & (0.021) \\
|
6 |
+
\emph{P-values and theory-driven tests}& & & & \\
|
7 |
+
\enspace $\beta_P=\beta_D$&0.004\sym{***} & 0.886 & 0.119 &0.061\sym{*} \\
|
8 |
+
\enspace Test for mechanism:& DD & DD & PD & PD \\
|
9 |
+
\enspace Significant evidence of mechanism:& No & No & No & Yes \\
|
10 |
+
& & & & \\
|
11 |
+
Mean (Control) & 0.000 & 0.255 & 0.000 & 0.206 \\
|
12 |
+
N & 2053 & 2053 & 2053 & 2053 \\
|
13 |
+
\hline \end{tabular} } \begin{tablenotes}[flushleft] \small \item \emph{Notes}: Robust standard errors clustered at the clinic level in parentheses. All regressions control for clinic visit date fixed effects. We use double selection lasso to choose additional controls. See notes to Table 3 for a list of potential controls. DD and PD indicates a test of doctor and patient-driven demand respectively. *, **, and *** denote statistical significance at the 10, 5, and 1 percent levels respectively. \end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table}
|
21/replication_package/Tables/B13_stockpiling_lso.tex
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
\begin{table}[ht!] \begin{adjustbox}{max width=1\textwidth} \begin{threeparttable} \caption{Share of Patients Taking An ACT at Home Survey} \label{stockpiling} {\begin{tabular}{l*{3}{C{0.12\linewidth}}} \toprule \toprule & (1) & (2) \\ & All Prescribed ACTs& Prescribed ACT for Simple Malaria \\ \toprule
|
2 |
+
$\beta_P$: Patient Voucher& -0.028 & 0.0037 \\
|
3 |
+
& (0.039) & (0.036) \\
|
4 |
+
$\beta_D$: Doctor Voucher& -0.065 & 0.025 \\
|
5 |
+
& (0.048) & (0.031) \\
|
6 |
+
\emph{P-values} & & \\
|
7 |
+
\enspace $\beta_P=\beta_D$& 0.405 & 0.562 \\
|
8 |
+
\enspace $\beta_P=\beta_D=0$& 0.408 & 0.709 \\
|
9 |
+
& & \\
|
10 |
+
Mean (Control) & 0.922 & 0.938 \\
|
11 |
+
N & 460 & 346 \\
|
12 |
+
\hline \end{tabular} } \begin{tablenotes}[flushleft] \small \item \emph{Notes}: Robust standard errors clustered at the clinic level in parentheses. All regressions control for clinic visit date fixed effects. We use double selection lasso to choose additional controls. See notes to Table 3 for a list of potential controls. The first column is limited to individuals who purchased an ACT treatment at the CSCom as part of either simple or severe malaria treatment. The second column is limited to individuals who purchased an ACT as part of simple malaria treatment. *, **, and *** denote statistical significance at the 10, 5, and 1 percent levels respectively. \end{tablenotes} \end{threeparttable} \end{adjustbox} \end{table}
|