| |
|
| |
|
| |
|
| |
|
| | clear
|
| | set more off
|
| |
|
| |
|
| | cd "$main/Output"
|
| | |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| | use "$main/Data/cleaned_commitment_study_data", clear
|
| |
|
| |
|
| |
|
| | gen id = _n
|
| |
|
| |
|
| | gen first_info = type_of_info=="1-onlygraph"
|
| | gen new_info = type_of_info=="2-graphplus"
|
| | gen control_info = (new_info == 0 & first_info == 0)
|
| |
|
| |
|
| | gen wave1 = (wave == "fall")
|
| | gen wave2 = (wave == "winter")
|
| | gen wave3 = (wave == "spring")
|
| |
|
| |
|
| | gen anticommit8 = q170 ==2 if q170<.
|
| | gen commit8 = q169 ==2 if q169<.
|
| | gen anticommit12 = chose_anticommit11
|
| | gen commit12 = chose_commit12
|
| | gen anticommit16 = q296==2 if q296<.
|
| | gen commit16 = q295 ==2 if q295<.
|
| |
|
| |
|
| | |
| |
|
| | gen delta1=(wtp1) - (days_1+days_0)/2
|
| | gen delta2 = (wtp2-wtp1) - (days_2+days_1)/2
|
| | gen delta3=(wtp3-wtp2) - (days_3+days_2)/2
|
| | gen delta5=(wtp5-wtp3)/(5-3) - (days_5+days_3)/2
|
| | gen delta7=(wtp7-wtp5)/(7-5) - (days_7+days_5)/2
|
| | gen delta12=(wtp12-wtp7)/(12-7) - (days_12+days_7)/2
|
| |
|
| | gen avg_delta = (delta1 + delta2+delta3 + delta5 + delta7 + delta12)/6
|
| | gen avg_delta_ex1 = (delta2+delta3 + delta5 + delta7 + delta12)/5
|
| |
|
| |
|
| | gen diffa1=(days_1-days_0)
|
| | gen diffa2=(days_2-days_1)
|
| | gen diffa3=(days_3-days_2)
|
| | gen diffa5=(days_5-days_3)/2
|
| | gen diffa7=(days_7-days_5)/2
|
| | gen diffa12=(days_12-days_7)/5
|
| | gen avg_diffa=(diffa1+diffa2+diffa3+diffa5+diffa7+diffa12)/6
|
| | gen avg_diffa_ex1=(diffa2+diffa3+diffa5+diffa7+diffa12)/5
|
| |
|
| |
|
| | gen nocommit12 = !commit12
|
| |
|
| |
|
| | foreach k in 0 1 2 3 5 7 12{
|
| |
|
| | foreach cdtn in "" "&commit12==1" "&first_info!=1" "&commit12==1&first_info!=1"{
|
| |
|
| | if "`cdtn'" == "" loc n ""
|
| | else if "`cdtn'" == "&commit12==1" loc n "_c12"
|
| | else if "`cdtn'" == "&first_info!=1" loc n "_inf"
|
| | else loc n "_infc12"
|
| |
|
| | ci means days_`k' if flag_exclude_exog==0&flag_low_wtp==0 `cdtn'
|
| |
|
| | local mean = r(mean)
|
| | local ub = r(ub)
|
| | local lb = r(lb)
|
| | gen mean_days`n'_`k' = `mean'
|
| | gen ub_days`n'_`k' = `ub'
|
| | gen lb_days`n'_`k' = `lb'
|
| |
|
| |
|
| | if `k' != 1 & `k' != 3 & `k' != 12{
|
| | ci means visits if incentive == `k' &flag_exclude_exog==0&
|
| | flag_low_wtp==0 `cdtn'
|
| |
|
| | local mean = r(mean)
|
| | local ub = r(ub)
|
| | local lb = r(lb)
|
| | gen mean_visits`n'_`k' = `mean'
|
| | gen ub_visits`n'_`k' = `ub'
|
| | gen lb_visits`n'_`k' = `lb'
|
| |
|
| | if "`n'" == "_inf"{
|
| |
|
| | if `k' == 0 loc num "zero"
|
| | else if `k' == 2 loc num "two"
|
| | else if `k' == 5 loc num "five"
|
| | else loc num "seven"
|
| | latex_write incentive`num'infobs `r(N)' numbers
|
| | }
|
| | }
|
| | }
|
| | }
|
| |
|
| |
|
| | sum commit12 if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.
|
| | loc totalobs = r(N)
|
| | sum commit12 if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&(control_info==1|new_info==1)
|
| | loc obs : di %5.0fc `r(N)'
|
| | latex_write minfoavgobspe `obs' numbers
|
| | loc obs : di %5.0fc `totalobs'-`r(N)'
|
| | latex_write infodropobs `obs' numbers
|
| | sum commit12 if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&(control_info==1|new_info==1)&flag_confusion!=1
|
| | loc obs : di %5.0fc `r(N)'
|
| | latex_write minfoavgnoconfusedobspe `obs' numbers
|
| |
|
| |
|
| | preserve
|
| | reshape long days_ mean_days_ ub_days_ lb_days_
|
| | mean_visits_ ub_visits_ lb_visits_
|
| | mean_days_c12_ ub_days_c12_ lb_days_c12_
|
| | mean_visits_c12_ ub_visits_c12_ lb_visits_c12_
|
| | mean_days_inf_ ub_days_inf_ lb_days_inf_
|
| | mean_visits_inf_ ub_visits_inf_ lb_visits_inf_
|
| | mean_days_infc12_ ub_days_infc12_ lb_days_infc12_
|
| | mean_visits_infc12_ ub_visits_infc12_ lb_visits_infc12_, i(id) j(prize)
|
| | rename days_ days
|
| | gen prize2=prize^2
|
| | gen incentivesq=incentive^2
|
| |
|
| | gen visits12=visits>=12
|
| | gen getcommit=treatment=="threshold80_12"
|
| |
|
| |
|
| |
|
| | cap program drop latex_write_gmm latex_write_nlcom
|
| |
|
| | program define latex_write_gmm
|
| | loc obs : di %5.0fc `e(N_clust)'
|
| | latex_write `1'obspe `obs' `2'
|
| | loc k = 1
|
| | foreach param in lambda betatilde b beta {
|
| | if `k' == 1 loc fig : di %4.3f [`param']_cons
|
| | else loc fig : di %4.2f [`param']_cons
|
| | latex_write `param'`1' `fig' `2'
|
| | matrix temp = e(V)
|
| | loc lb : di %4.2f [`param']_cons - invnormal(0.975)*sqrt(el(temp,`k',`k'))
|
| | loc ub : di %4.2f [`param']_cons + invnormal(0.975)*sqrt(el(temp,`k',`k'))
|
| | loc ci : di "(`lb', `ub')"
|
| | latex_write `param'`1'CI "`ci'" `2'
|
| | loc ++k
|
| | }
|
| | end
|
| |
|
| | program define latex_write_nlcom
|
| | matrix tempb = r(b)
|
| | matrix tempv = r(V)
|
| | loc fig : di %4.2f tempb[1,1]
|
| | loc lb : di %4.2f tempb[1,1] - invnormal(0.975)*sqrt(tempv[1,1])
|
| | loc ub : di %4.2f tempb[1,1] + invnormal(0.975)*sqrt(tempv[1,1])
|
| | loc ci : di "(`lb', `ub')"
|
| | latex_write `1' `fig' `2'
|
| | latex_write `1'CI "`ci'" `2'
|
| | end
|
| |
|
| |
|
| |
|
| |
|
| | foreach v in "" "+5" "-10" "+0"{
|
| |
|
| |
|
| | if "`v'" == ""{
|
| | loc o ""
|
| | loc lx "numbers_struct"
|
| | }
|
| | else if "`v'" == "+5"{
|
| | loc o "V"
|
| | loc lx "numbers_struct_appx"
|
| | }
|
| | else if "`v'" == "-10"{
|
| | loc o "X"
|
| | loc lx "numbers_struct_appx"
|
| | }
|
| | else{
|
| | loc o "noconfused"
|
| | loc lx "numbers_struct_appx"
|
| | drop if flag_confusion==1
|
| | }
|
| |
|
| |
|
| | gmm (eq1:28*(1-exp(-{lambda}*({betatilde}*({b}+prize)`v')))-days)
|
| | (eq2: 28*(1-exp(-{lambda}*({beta}*({b}+incentive)`v')))-visits)
|
| | (eq3: (1-{betatilde})*diffa2*({b}+(1+2)/2)-delta2)
|
| | (eq4: (1-{betatilde})*diffa3*({b}+(2+3)/2)-delta3)
|
| | (eq5: (1-{betatilde})*diffa5*({b}+(3+5)/2)-delta5)
|
| | (eq6: (1-{betatilde})*diffa7*({b}+(5+7)/2)-delta7)
|
| | (eq7: (1-{betatilde})*diffa12*({b}+(7+12)/2)-delta12)
|
| | if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.,
|
| | instruments (eq1: prize prize2) instruments(eq2:incentive incentivesq)
|
| | from (b 8 lambda 0.06 beta 0.5 betatilde 0.8) vce(cluster id) winitial(identity) nolog
|
| | latex_write_gmm all`o' `lx'
|
| |
|
| |
|
| | nlcom (1-[beta]_cons)*[b]_cons
|
| | latex_write_nlcom aintall`o' `lx'
|
| |
|
| |
|
| | nlcom (1-[betatilde]_cons)/(1-[beta]_cons)
|
| | latex_write_nlcom naiveall`o' `lx'
|
| |
|
| |
|
| | nlcom 1/[lambda]_cons
|
| | latex_write_nlcom expcostall`o' `lx'
|
| |
|
| |
|
| | if "`v'" == ""{
|
| |
|
| | foreach p in 1 2 3 5 7{
|
| |
|
| |
|
| | if `p' == 1 | `p' == 2 loc delta = 1
|
| | else if `p' == 3 | `p' == 5 loc delta = 2
|
| | else loc delta = 5
|
| |
|
| |
|
| | loc error_numerator =
|
| | `delta' - ( ( exp(-[lambda]_cons*[betatilde]_cons*([b]_cons + `p')) / ([lambda]_cons*[betatilde]_cons) ) * (1 - exp(-[lambda]_cons*[betatilde]_cons*`delta')) ) -
|
| | ( `delta' * ( 1 - ( exp(-[lambda]_cons*[betatilde]_cons*([b]_cons + `p')) * ( (1 + exp(-[lambda]_cons*[betatilde]_cons*`delta')) / 2 ) ) ) )
|
| |
|
| |
|
| | loc error_denominator =
|
| | ( (1 - [betatilde]_cons) * ( [b]_cons*exp(-[lambda]_cons*[betatilde]_cons*([b]_cons + `p')) ) * (1 - exp(-[lambda]_cons*[betatilde]_cons*`delta')) ) +
|
| | ( (1 - [betatilde]_cons) * exp(-[lambda]_cons*[betatilde]_cons*[b]_cons) * ( `p' + ( (1/([lambda]_cons*[betatilde]_cons)) * (1 - (1 + ([lambda]_cons*[betatilde]_cons*`delta'))*exp(-[lambda]_cons*[betatilde]_cons*`delta') ) ) ) )
|
| |
|
| |
|
| | loc error : di %4.2f abs(`error_numerator'/`error_denominator')*100
|
| |
|
| |
|
| | if `p' == 1 & `delta' == 1 loc errorname "poneDone"
|
| | else if `p' == 2 & `delta' == 1 loc errorname "ptwoDone"
|
| | else if `p' == 3 & `delta' == 2 loc errorname "pthreeDtwo"
|
| | else if `p' == 5 & `delta' == 2 loc errorname "pfiveDtwo"
|
| | else loc errorname "psevenDfive"
|
| | latex_write `errorname'error `error' numbers_struct
|
| |
|
| | }
|
| | }
|
| |
|
| |
|
| | if "`v'" == ""{
|
| | global obs = _N
|
| | loc num = _N+241
|
| | set obs `num'
|
| | gen plot_incentive = .
|
| | forval i = 0(.05)12.05{
|
| | qui replace plot_incentive = `i' if _n == $obs + (`i'*20) + 1
|
| | }
|
| | }
|
| | if "`v'" != "+0"{
|
| | predictnl mean_days_pred`o' = 28*(1-exp(-[lambda]_cons*([betatilde]_cons*([b]_cons+plot_incentive)`v')))
|
| | if _n > $obs, ci(lb_days_pred`o' ub_days_pred`o') level(95)
|
| | predictnl mean_visits_pred`o' = 28*(1-exp(-[lambda]_cons*([beta]_cons*([b]_cons+plot_incentive)`v')))
|
| | if _n > $obs, ci(lb_visits_pred`o' ub_visits_pred`o') level(95)
|
| |
|
| |
|
| | twoway (conn mean_days_pred`o' plot_incentive, lcolor(black) m(none))
|
| | (conn ub_days_pred`o' plot_incentive, lc(black) lp(shortdash) m(none))
|
| | (conn lb_days_pred`o' plot_incentive, lc(black) lp(shortdash) m(none))
|
| | (sc mean_days_ prize, msize(small) color(black))
|
| | (rcap ub_days_ lb_days_ prize, lcolor(black) lwidth(medium) lpattern(dash))
|
| | (conn mean_visits_pred`o' plot_incentive, lcolor(red) m(none))
|
| | (conn ub_visits_pred`o' plot_incentive, lc(red) lp(shortdash) m(none))
|
| | (conn lb_visits_pred`o' plot_incentive, lc(red) lp(shortdash) m(none))
|
| | (sc mean_visits_ prize, m(square) msize(small) color(red))
|
| | (rcap ub_visits_ lb_visits_ prize, lcolor(red) lwidth(medium) lpattern(dash)),
|
| | xlab(0(1)12) ylabel(0(5)22, angle(0))
|
| | xtitle("Per-visit incentive ($)", height(6)) ytitle("Visits", height(6))
|
| | graphregion(color(white)) plotregion(margin(sides))
|
| | legend(order(1 2 6 7 4 9) label(1 "Predicted expected visits") label(2 "Prediction 95% CI") label(4 "Average expected visits") label(6 "Predicted realized visits") label(7 "Prediction 95% CI") label(9 "Average realized visits")) legend(rows(3))
|
| | graph export overconfidence_estimates`o'.pdf, replace
|
| | }
|
| |
|
| |
|
| |
|
| | if "`v'" == ""{
|
| |
|
| | foreach i in 1 3{
|
| |
|
| | if `i' == 1 loc wname "wtwothree"
|
| | else loc wname "wonetwo"
|
| |
|
| | gmm (eq1:28*(1-exp(-{lambda}*({betatilde}*({b}+prize)`v')))-days)
|
| | (eq2: 28*(1-exp(-{lambda}*({beta}*({b}+incentive)`v')))-visits)
|
| | (eq3: (1-{betatilde})*diffa2*({b}+(1+2)/2)-delta2)
|
| | (eq4: (1-{betatilde})*diffa3*({b}+(2+3)/2)-delta3)
|
| | (eq5: (1-{betatilde})*diffa5*({b}+(3+5)/2)-delta5)
|
| | (eq6: (1-{betatilde})*diffa7*({b}+(5+7)/2)-delta7)
|
| | (eq7: (1-{betatilde})*diffa12*({b}+(7+12)/2)-delta12)
|
| | if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&wave`i'==0,
|
| | instruments (eq1: prize prize2) instruments(eq2:incentive incentivesq)
|
| | from (b 8 lambda 0.06 beta 0.5 betatilde 0.8) vce(cluster id) winitial(identity) nolog
|
| | latex_write_gmm `wname' `lx'
|
| |
|
| |
|
| | nlcom (1-[beta]_cons)*[b]_cons
|
| | latex_write_nlcom aint`wname' `lx'
|
| |
|
| |
|
| | nlcom (1-[betatilde]_cons)/(1-[beta]_cons)
|
| | latex_write_nlcom naive`wname' `lx'
|
| |
|
| |
|
| | nlcom 1/[lambda]_cons
|
| | latex_write_nlcom expcost`wname' `lx'
|
| |
|
| | }
|
| | }
|
| |
|
| |
|
| |
|
| |
|
| | gmm (eq1:28*(1-exp(-{lambda}*({betatilde}*({b}+prize)`v')))-days)
|
| | (eq2: 28*(1-exp(-{lambda}*({beta}*({b}+incentive)`v')))-visits)
|
| | (eq3: (1-{betatilde})*diffa2*({b}+(1+2)/2)-delta2)
|
| | (eq4: (1-{betatilde})*diffa3*({b}+(2+3)/2)-delta3)
|
| | (eq5: (1-{betatilde})*diffa5*({b}+(3+5)/2)-delta5)
|
| | (eq6: (1-{betatilde})*diffa7*({b}+(5+7)/2)-delta7)
|
| | (eq7: (1-{betatilde})*diffa12*({b}+(7+12)/2)-delta12)
|
| | if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&control_info==1,
|
| | instruments (eq1: prize prize2) instruments(eq2:incentive incentivesq)
|
| | from (b 8 lambda 0.06 beta 0.5 betatilde 0.8) vce(cluster id) winitial(identity) nolog
|
| | latex_write_gmm control`o' `lx'
|
| |
|
| |
|
| | nlcom (1-[beta]_cons)*[b]_cons
|
| | latex_write_nlcom aintcontrol`o' `lx'
|
| |
|
| |
|
| | nlcom (1-[betatilde]_cons)/(1-[beta]_cons)
|
| | latex_write_nlcom naivecontrol`o' `lx'
|
| |
|
| |
|
| | nlcom 1/[lambda]_cons
|
| | latex_write_nlcom expcostcontrol`o' `lx'
|
| |
|
| |
|
| | gmm (eq1:28*(1-exp(-{lambda}*({betatilde}*({b}+prize)`v')))-days)
|
| | (eq2: 28*(1-exp(-{lambda}*({beta}*({b}+incentive)`v')))-visits)
|
| | (eq3: (1-{betatilde})*diffa2*({b}+(1+2)/2)-delta2)
|
| | (eq4: (1-{betatilde})*diffa3*({b}+(2+3)/2)-delta3)
|
| | (eq5: (1-{betatilde})*diffa5*({b}+(3+5)/2)-delta5)
|
| | (eq6: (1-{betatilde})*diffa7*({b}+(5+7)/2)-delta7)
|
| | (eq7: (1-{betatilde})*diffa12*({b}+(7+12)/2)-delta12)
|
| | if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&new_info==1,
|
| | instruments (eq1: prize prize2) instruments(eq2:incentive incentivesq)
|
| | from (b 8 lambda 0.06 beta 0.5 betatilde 0.8) vce(cluster id) winitial(identity) nolog
|
| | latex_write_gmm treat`o' `lx'
|
| |
|
| |
|
| | nlcom (1-[beta]_cons)*[b]_cons
|
| | latex_write_nlcom ainttreat`o' `lx'
|
| |
|
| |
|
| | nlcom (1-[betatilde]_cons)/(1-[beta]_cons)
|
| | latex_write_nlcom naivetreat`o' `lx'
|
| |
|
| |
|
| | nlcom 1/[lambda]_cons
|
| | latex_write_nlcom expcosttreat`o' `lx'
|
| |
|
| |
|
| |
|
| | if "`v'" == ""{
|
| | sum past4 if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.,d
|
| | loc q1past4=r(p25)
|
| | loc medpast4=r(p50)
|
| | loc q3past4=r(p75)
|
| | gen abovemedpast4=past4>=`medpast4'
|
| | gen belowmedpast4=past4<`medpast4'
|
| | gen qpast4=1 if past4<`q1past4'
|
| | replace qpast4=2 if past4>=`q1past4'&past4<`medpast4'
|
| | replace qpast4=3 if past4>=`medpast4'&past4<`q3past4'
|
| | replace qpast4=4 if past4>=`q3past4'
|
| | }
|
| |
|
| |
|
| | foreach r in "0" "1"{
|
| |
|
| | if "`r'"=="0" loc name "bm"
|
| | else loc name "am"
|
| |
|
| | gmm (eq1:28*(1-exp(-{lambda}*({betatilde}*({b}+prize)`v')))-days)
|
| | (eq2: 28*(1-exp(-{lambda}*({beta}*({b}+incentive)`v')))-visits)
|
| | (eq3: (1-{betatilde})*diffa2*({b}+(1+2)/2)-delta2)
|
| | (eq4: (1-{betatilde})*diffa3*({b}+(2+3)/2)-delta3)
|
| | (eq5: (1-{betatilde})*diffa5*({b}+(3+5)/2)-delta5)
|
| | (eq6: (1-{betatilde})*diffa7*({b}+(5+7)/2)-delta7)
|
| | (eq7: (1-{betatilde})*diffa12*({b}+(7+12)/2)-delta12)
|
| | if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&abovemedpast4==`r',
|
| | instruments (eq1: prize prize2) instruments(eq2:incentive incentivesq)
|
| | from (b 8 lambda 0.06 beta 0.5 betatilde 0.8) vce(cluster id) winitial(identity) nolog
|
| | latex_write_gmm `name'`o' `lx'
|
| |
|
| |
|
| | nlcom (1-[beta]_cons)*[b]_cons
|
| | latex_write_nlcom aint`name'`o' `lx'
|
| |
|
| |
|
| | nlcom (1-[betatilde]_cons)/(1-[beta]_cons)
|
| | latex_write_nlcom naive`name'`o' `lx'
|
| |
|
| |
|
| | nlcom 1/[lambda]_cons
|
| | latex_write_nlcom expcost`name'`o' `lx'
|
| |
|
| | }
|
| |
|
| |
|
| |
|
| | loc name "het`o'"
|
| |
|
| |
|
| | sum commit12 if first_info!=1&flag_low_wtp==0&flag_exclude_exog==0&incentive!=.
|
| | loc propcommit12het = r(mean)
|
| | sum abovemedpast4 if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit12==1
|
| | loc meanam = r(mean)
|
| | sum control_info if first_info!=1&flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit12==1&abovemedpast4==1
|
| | loc propamctrlcommit`o' = `meanam'*r(mean)*`propcommit12het'
|
| | loc propaminfocommit`o' = `meanam'*(1 - r(mean))*`propcommit12het'
|
| | sum control_info if first_info!=1&flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit12==1&abovemedpast4==0
|
| | loc propbmctrlcommit`o' = (1 - `meanam')*r(mean)*`propcommit12het'
|
| | loc propbminfocommit`o' = (1 - `meanam')*(1 - r(mean))*`propcommit12het'
|
| | sum abovemedpast4 if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit12==0
|
| | loc meanam = r(mean)
|
| | sum control_info if first_info!=1&flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit12==0&abovemedpast4==1
|
| | loc propamctrlnocommit`o' = `meanam'*r(mean)*(1 - `propcommit12het')
|
| | loc propaminfonocommit`o' = `meanam'*(1 - r(mean))*(1 - `propcommit12het')
|
| | sum control_info if first_info!=1&flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit12==0&abovemedpast4==0
|
| | loc propbmctrlnocommit`o' = (1 - `meanam')*r(mean)*(1 - `propcommit12het')
|
| | loc propbminfonocommit`o' = (1 - `meanam')*(1 - r(mean))*(1 - `propcommit12het')
|
| |
|
| | gmm (eq1:28*(1-exp(-{lambda0}*({betatilde0}*({b0}+prize)`v')))*control_info*abovemedpast4*commit12-days*control_info*abovemedpast4*commit12)
|
| | (eq2: 28*(1-exp(-{lambda0}*({beta0}*({b0}+incentive)`v')))*control_info*abovemedpast4*commit12-visits*control_info*abovemedpast4*commit12)
|
| | (eq3: (1-{betatilde0})*diffa2*({b0}+(1+2)/2)*control_info*abovemedpast4*commit12-delta2*control_info*abovemedpast4*commit12)
|
| | (eq4: (1-{betatilde0})*diffa3*({b0}+(2+3)/2)*control_info*abovemedpast4*commit12-delta3*control_info*abovemedpast4*commit12)
|
| | (eq5: (1-{betatilde0})*diffa5*({b0}+(3+5)/2)*control_info*abovemedpast4*commit12-delta5*control_info*abovemedpast4*commit12)
|
| | (eq6: (1-{betatilde0})*diffa7*({b0}+(5+7)/2)*control_info*abovemedpast4*commit12-delta7*control_info*abovemedpast4*commit12)
|
| | (eq7: (1-{betatilde0})*diffa12*({b0}+(7+12)/2)*control_info*abovemedpast4*commit12-delta12*control_info*abovemedpast4*commit12)
|
| | (eq1b:28*(1-exp(-{lambda1}*({betatilde1}*({b1}+prize)`v')))*new_info*abovemedpast4*commit12-days*new_info*abovemedpast4*commit12)
|
| | (eq2b: 28*(1-exp(-{lambda1}*({beta1}*({b1}+incentive)`v')))*new_info*abovemedpast4*commit12-visits*new_info*abovemedpast4*commit12)
|
| | (eq3b: (1-{betatilde1})*diffa2*({b1}+(1+2)/2)*new_info*abovemedpast4*commit12-delta2*new_info*abovemedpast4*commit12)
|
| | (eq4b: (1-{betatilde1})*diffa3*({b1}+(2+3)/2)*new_info*abovemedpast4*commit12-delta3*new_info*abovemedpast4*commit12)
|
| | (eq5b: (1-{betatilde1})*diffa5*({b1}+(3+5)/2)*new_info*abovemedpast4*commit12-delta5*new_info*abovemedpast4*commit12)
|
| | (eq6b: (1-{betatilde1})*diffa7*({b1}+(5+7)/2)*new_info*abovemedpast4*commit12-delta7*new_info*abovemedpast4*commit12)
|
| | (eq7b: (1-{betatilde1})*diffa12*({b1}+(7+12)/2)*new_info*abovemedpast4*commit12-delta12*new_info*abovemedpast4*commit12)
|
| | (eq1c:28*(1-exp(-{lambda2}*({betatilde2}*({b2}+prize)`v')))*control_info*belowmedpast4*commit12-days*control_info*belowmedpast4*commit12)
|
| | (eq2c: 28*(1-exp(-{lambda2}*({beta2}*({b2}+incentive)`v')))*control_info*belowmedpast4*commit12-visits*control_info*belowmedpast4*commit12)
|
| | (eq3c: (1-{betatilde2})*diffa2*({b2}+(1+2)/2)*control_info*belowmedpast4*commit12-delta2*control_info*belowmedpast4*commit12)
|
| | (eq4c: (1-{betatilde2})*diffa3*({b2}+(2+3)/2)*control_info*belowmedpast4*commit12-delta3*control_info*belowmedpast4*commit12)
|
| | (eq5c: (1-{betatilde2})*diffa5*({b2}+(3+5)/2)*control_info*belowmedpast4*commit12-delta5*control_info*belowmedpast4*commit12)
|
| | (eq6c: (1-{betatilde2})*diffa7*({b2}+(5+7)/2)*control_info*belowmedpast4*commit12-delta7*control_info*belowmedpast4*commit12)
|
| | (eq7c: (1-{betatilde2})*diffa12*({b2}+(7+12)/2)*control_info*belowmedpast4*commit12-delta12*control_info*belowmedpast4*commit12)
|
| | (eq1d:28*(1-exp(-{lambda3}*({betatilde3}*({b3}+prize)`v')))*new_info*belowmedpast4*commit12-days*new_info*belowmedpast4*commit12)
|
| | (eq2d: 28*(1-exp(-{lambda3}*({beta3}*({b3}+incentive)`v')))*new_info*belowmedpast4*commit12-visits*new_info*belowmedpast4*commit12)
|
| | (eq3d: (1-{betatilde3})*diffa2*({b3}+(1+2)/2)*new_info*belowmedpast4*commit12-delta2*new_info*belowmedpast4*commit12)
|
| | (eq4d: (1-{betatilde3})*diffa3*({b3}+(2+3)/2)*new_info*belowmedpast4*commit12-delta3*new_info*belowmedpast4*commit12)
|
| | (eq5d: (1-{betatilde3})*diffa5*({b3}+(3+5)/2)*new_info*belowmedpast4*commit12-delta5*new_info*belowmedpast4*commit12)
|
| | (eq6d: (1-{betatilde3})*diffa7*({b3}+(5+7)/2)*new_info*belowmedpast4*commit12-delta7*new_info*belowmedpast4*commit12)
|
| | (eq7d: (1-{betatilde3})*diffa12*({b3}+(7+12)/2)*new_info*belowmedpast4*commit12-delta12*new_info*belowmedpast4*commit12)
|
| | (eq1e:28*(1-exp(-{lambda4}*({betatilde4}*({b4}+prize)`v')))*control_info*abovemedpast4*nocommit12-days*control_info*abovemedpast4*nocommit12)
|
| | (eq2e: 28*(1-exp(-{lambda4}*({beta4}*({b4}+incentive)`v')))*control_info*abovemedpast4*nocommit12-visits*control_info*abovemedpast4*nocommit12)
|
| | (eq3e: (1-{betatilde4})*diffa2*({b4}+(1+2)/2)*control_info*abovemedpast4*nocommit12-delta2*control_info*abovemedpast4*nocommit12)
|
| | (eq4e: (1-{betatilde4})*diffa3*({b4}+(2+3)/2)*control_info*abovemedpast4*nocommit12-delta3*control_info*abovemedpast4*nocommit12)
|
| | (eq5e: (1-{betatilde4})*diffa5*({b4}+(3+5)/2)*control_info*abovemedpast4*nocommit12-delta5*control_info*abovemedpast4*nocommit12)
|
| | (eq6e: (1-{betatilde4})*diffa7*({b4}+(5+7)/2)*control_info*abovemedpast4*nocommit12-delta7*control_info*abovemedpast4*nocommit12)
|
| | (eq7e: (1-{betatilde4})*diffa12*({b4}+(7+12)/2)*control_info*abovemedpast4*nocommit12-delta12*control_info*abovemedpast4*nocommit12)
|
| | (eq1f:28*(1-exp(-{lambda5}*({betatilde5}*({b5}+prize)`v')))*new_info*abovemedpast4*nocommit12-days*new_info*abovemedpast4*nocommit12)
|
| | (eq2f: 28*(1-exp(-{lambda5}*({beta5}*({b5}+incentive)`v')))*new_info*abovemedpast4*nocommit12-visits*new_info*abovemedpast4*nocommit12)
|
| | (eq3f: (1-{betatilde5})*diffa2*({b5}+(1+2)/2)*new_info*abovemedpast4*nocommit12-delta2*new_info*abovemedpast4*nocommit12)
|
| | (eq4f: (1-{betatilde5})*diffa3*({b5}+(2+3)/2)*new_info*abovemedpast4*nocommit12-delta3*new_info*abovemedpast4*nocommit12)
|
| | (eq5f: (1-{betatilde5})*diffa5*({b5}+(3+5)/2)*new_info*abovemedpast4*nocommit12-delta5*new_info*abovemedpast4*nocommit12)
|
| | (eq6f: (1-{betatilde5})*diffa7*({b5}+(5+7)/2)*new_info*abovemedpast4*nocommit12-delta7*new_info*abovemedpast4*nocommit12)
|
| | (eq7f: (1-{betatilde5})*diffa12*({b5}+(7+12)/2)*new_info*abovemedpast4*nocommit12-delta12*new_info*abovemedpast4*nocommit12)
|
| | (eq1g:28*(1-exp(-{lambda6}*({betatilde6}*({b6}+prize)`v')))*control_info*belowmedpast4*nocommit12-days*control_info*belowmedpast4*nocommit12)
|
| | (eq2g: 28*(1-exp(-{lambda6}*({beta6}*({b6}+incentive)`v')))*control_info*belowmedpast4*nocommit12-visits*control_info*belowmedpast4*nocommit12)
|
| | (eq3g: (1-{betatilde6})*diffa2*({b6}+(1+2)/2)*control_info*belowmedpast4*nocommit12-delta2*control_info*belowmedpast4*nocommit12)
|
| | (eq4g: (1-{betatilde6})*diffa3*({b6}+(2+3)/2)*control_info*belowmedpast4*nocommit12-delta3*control_info*belowmedpast4*nocommit12)
|
| | (eq5g: (1-{betatilde6})*diffa5*({b6}+(3+5)/2)*control_info*belowmedpast4*nocommit12-delta5*control_info*belowmedpast4*nocommit12)
|
| | (eq6g: (1-{betatilde6})*diffa7*({b6}+(5+7)/2)*control_info*belowmedpast4*nocommit12-delta7*control_info*belowmedpast4*nocommit12)
|
| | (eq7g: (1-{betatilde6})*diffa12*({b6}+(7+12)/2)*control_info*belowmedpast4*nocommit12-delta12*control_info*belowmedpast4*nocommit12)
|
| | (eq1h:28*(1-exp(-{lambda7}*({betatilde7}*({b7}+prize)`v')))*new_info*belowmedpast4*nocommit12-days*new_info*belowmedpast4*nocommit12)
|
| | (eq2h: 28*(1-exp(-{lambda7}*({beta7}*({b7}+incentive)`v')))*new_info*belowmedpast4*nocommit12-visits*new_info*belowmedpast4*nocommit12)
|
| | (eq3h: (1-{betatilde7})*diffa2*({b7}+(1+2)/2)*new_info*belowmedpast4*nocommit12-delta2*new_info*belowmedpast4*nocommit12)
|
| | (eq4h: (1-{betatilde7})*diffa3*({b7}+(2+3)/2)*new_info*belowmedpast4*nocommit12-delta3*new_info*belowmedpast4*nocommit12)
|
| | (eq5h: (1-{betatilde7})*diffa5*({b7}+(3+5)/2)*new_info*belowmedpast4*nocommit12-delta5*new_info*belowmedpast4*nocommit12)
|
| | (eq6h: (1-{betatilde7})*diffa7*({b7}+(5+7)/2)*new_info*belowmedpast4*nocommit12-delta7*new_info*belowmedpast4*nocommit12)
|
| | (eq7h: (1-{betatilde7})*diffa12*({b7}+(7+12)/2)*new_info*belowmedpast4*nocommit12-delta12*new_info*belowmedpast4*nocommit12)
|
| | if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&(control_info==1|new_info==1),
|
| | instruments(eq1: prize prize2) instruments(eq2:incentive incentivesq)
|
| | instruments(eq1b: prize prize2) instruments(eq2b:incentive incentivesq)
|
| | instruments(eq1c: prize prize2) instruments(eq2c:incentive incentivesq)
|
| | instruments(eq1d: prize prize2) instruments(eq2d:incentive incentivesq)
|
| | instruments(eq1e: prize prize2) instruments(eq2e:incentive incentivesq)
|
| | instruments(eq1f: prize prize2) instruments(eq2f:incentive incentivesq)
|
| | instruments(eq1g: prize prize2) instruments(eq2g:incentive incentivesq)
|
| | instruments(eq1h: prize prize2) instruments(eq2h:incentive incentivesq)
|
| | from (b7 8 b6 8 b5 8 b4 8 b3 8 b2 8 b1 8 b0 8 lambda7 0.06 lambda6 0.06 lambda5 0.06 lambda4 0.06 lambda3 0.06 lambda2 0.06 lambda1 0.06 lambda0 0.06 beta7 0.5 beta6 0.5 beta5 0.5 beta4 0.5 beta3 0.5 beta2 0.5 beta1 0.5 beta0 0.5 betatilde7 0.8 betatilde6 0.8 betatilde5 0.8 betatilde4 0.8 betatilde3 0.8 betatilde2 0.8 betatilde1 0.8 betatilde0 0.8)
|
| | vce(cluster id) winitial(identity)
|
| | foreach p in b lambda beta betatilde{
|
| | nlcom [`p'0]_cons*`propamctrlcommit`o'' +
|
| | [`p'1]_cons*`propaminfocommit`o'' +
|
| | [`p'2]_cons*`propbmctrlcommit`o'' +
|
| | [`p'3]_cons*`propbminfocommit`o'' +
|
| | [`p'4]_cons*`propamctrlnocommit`o'' +
|
| | [`p'5]_cons*`propaminfonocommit`o'' +
|
| | [`p'6]_cons*`propbmctrlnocommit`o'' +
|
| | [`p'7]_cons*`propbminfonocommit`o''
|
| | latex_write_nlcom `p'minfoavg`name' `lx'
|
| | }
|
| |
|
| |
|
| | nlcom (1-[beta0]_cons)*[b0]_cons*`propamctrlcommit`o'' +
|
| | (1-[beta1]_cons)*[b1]_cons*`propaminfocommit`o'' +
|
| | (1-[beta2]_cons)*[b2]_cons*`propbmctrlcommit`o'' +
|
| | (1-[beta3]_cons)*[b3]_cons*`propbminfocommit`o'' +
|
| | (1-[beta4]_cons)*[b4]_cons*`propamctrlnocommit`o'' +
|
| | (1-[beta5]_cons)*[b5]_cons*`propaminfonocommit`o'' +
|
| | (1-[beta6]_cons)*[b6]_cons*`propbmctrlnocommit`o'' +
|
| | (1-[beta7]_cons)*[b7]_cons*`propbminfonocommit`o''
|
| | latex_write_nlcom aintminfoavg`name' `lx'
|
| |
|
| |
|
| | nlcom (1-[betatilde0]_cons)/(1-[beta0]_cons)*`propamctrlcommit`o'' +
|
| | (1-[betatilde1]_cons)/(1-[beta1]_cons)*`propaminfocommit`o'' +
|
| | (1-[betatilde2]_cons)/(1-[beta2]_cons)*`propbmctrlcommit`o'' +
|
| | (1-[betatilde3]_cons)/(1-[beta3]_cons)*`propbminfocommit`o'' +
|
| | (1-[betatilde4]_cons)/(1-[beta4]_cons)*`propamctrlnocommit`o'' +
|
| | (1-[betatilde5]_cons)/(1-[beta5]_cons)*`propaminfonocommit`o'' +
|
| | (1-[betatilde6]_cons)/(1-[beta6]_cons)*`propbmctrlnocommit`o'' +
|
| | (1-[betatilde7]_cons)/(1-[beta7]_cons)*`propbminfonocommit`o''
|
| | latex_write_nlcom naiveminfoavg`name' `lx'
|
| |
|
| |
|
| | nlcom (1/[lambda0]_cons)*`propamctrlcommit`o'' +
|
| | (1/[lambda1]_cons)*`propaminfocommit`o'' +
|
| | (1/[lambda2]_cons)*`propbmctrlcommit`o'' +
|
| | (1/[lambda3]_cons)*`propbminfocommit`o'' +
|
| | (1/[lambda4]_cons)*`propamctrlnocommit`o'' +
|
| | (1/[lambda5]_cons)*`propaminfonocommit`o'' +
|
| | (1/[lambda6]_cons)*`propbmctrlnocommit`o'' +
|
| | (1/[lambda7]_cons)*`propbminfonocommit`o''
|
| | latex_write_nlcom expcostminfoavg`name' `lx'
|
| |
|
| | if "`v'" != "+0"{
|
| |
|
| | predictnl mean_days_minfo`name'_pred =
|
| | 28*((1-exp(-[lambda0]_cons*([betatilde0]_cons*([b0]_cons+plot_incentive)`v')))*`propamctrlcommit`o'' +
|
| | (1-exp(-[lambda1]_cons*([betatilde1]_cons*([b1]_cons+plot_incentive)`v')))*`propaminfocommit`o'' +
|
| | (1-exp(-[lambda2]_cons*([betatilde2]_cons*([b2]_cons+plot_incentive)`v')))*`propbmctrlcommit`o'' +
|
| | (1-exp(-[lambda3]_cons*([betatilde3]_cons*([b3]_cons+plot_incentive)`v')))*`propbminfocommit`o'' +
|
| | (1-exp(-[lambda4]_cons*([betatilde4]_cons*([b4]_cons+plot_incentive)`v')))*`propamctrlnocommit`o'' +
|
| | (1-exp(-[lambda5]_cons*([betatilde5]_cons*([b5]_cons+plot_incentive)`v')))*`propaminfonocommit`o'' +
|
| | (1-exp(-[lambda6]_cons*([betatilde6]_cons*([b6]_cons+plot_incentive)`v')))*`propbmctrlnocommit`o'' +
|
| | (1-exp(-[lambda7]_cons*([betatilde7]_cons*([b7]_cons+plot_incentive)`v')))*`propbminfonocommit`o'')
|
| | if _n > $obs, ci(lb_days_minfo`name'_pred ub_days_minfo`name'_pred) level(95)
|
| | predictnl mean_visits_minfo`name'_pred =
|
| | 28*((1-exp(-[lambda0]_cons*([beta0]_cons*([b0]_cons+plot_incentive)`v')))*`propamctrlcommit`o'' +
|
| | (1-exp(-[lambda1]_cons*([beta1]_cons*([b1]_cons+plot_incentive)`v')))*`propaminfocommit`o'' +
|
| | (1-exp(-[lambda2]_cons*([beta2]_cons*([b2]_cons+plot_incentive)`v')))*`propbmctrlcommit`o'' +
|
| | (1-exp(-[lambda3]_cons*([beta3]_cons*([b3]_cons+plot_incentive)`v')))*`propbminfocommit`o'' +
|
| | (1-exp(-[lambda4]_cons*([beta4]_cons*([b4]_cons+plot_incentive)`v')))*`propamctrlnocommit`o'' +
|
| | (1-exp(-[lambda5]_cons*([beta5]_cons*([b5]_cons+plot_incentive)`v')))*`propaminfonocommit`o'' +
|
| | (1-exp(-[lambda6]_cons*([beta6]_cons*([b6]_cons+plot_incentive)`v')))*`propbmctrlnocommit`o'' +
|
| | (1-exp(-[lambda7]_cons*([beta7]_cons*([b7]_cons+plot_incentive)`v')))*`propbminfonocommit`o'')
|
| | if _n > $obs, ci(lb_visits_minfo`name'_pred ub_visits_minfo`name'_pred) level(95)
|
| |
|
| |
|
| | twoway (conn mean_days_minfo`name'_pred plot_incentive, lcolor(black) m(none))
|
| | (conn ub_days_minfo`name'_pred plot_incentive, lc(black) lp(shortdash) m(none))
|
| | (conn lb_days_minfo`name'_pred plot_incentive, lc(black) lp(shortdash) m(none))
|
| | (sc mean_days_inf_ prize, msize(small) color(black))
|
| | (rcap ub_days_inf_ lb_days_inf_ prize, lcolor(black) lwidth(medium) lpattern(dash))
|
| | (conn mean_visits_minfo`name'_pred plot_incentive, lcolor(red) m(none))
|
| | (conn ub_visits_minfo`name'_pred plot_incentive, lc(red) lp(shortdash) m(none))
|
| | (conn lb_visits_minfo`name'_pred plot_incentive, lc(red) lp(shortdash) m(none))
|
| | (sc mean_visits_inf_ prize, m(square) msize(small) color(red))
|
| | (rcap ub_visits_inf_ lb_visits_inf_ prize, lcolor(red) lwidth(medium) lpattern(dash)),
|
| | xlab(0(1)12) ylabel(0(5)22, angle(0))
|
| | xtitle("Per-visit incentive ($)", height(6)) ytitle("Visits", height(6))
|
| | graphregion(color(white)) plotregion(margin(sides))
|
| | legend(order(1 2 6 7 4 9) label(1 "Predicted expected visits") label(2 "Prediction 95% CI") label(4 "Average expected visits") label(6 "Predicted realized visits") label(7 "Prediction 95% CI") label(9 "Average realized visits")) legend(rows(3))
|
| | graph export overconfidence_estimates_past4_info_`name'.pdf, replace
|
| |
|
| |
|
| | forval j = 8(4)16{
|
| |
|
| | if `j' == 8 loc x "e"
|
| | else if `j' == 12 loc x ""
|
| | else loc x "s"
|
| |
|
| | foreach r in "0&commit`j'==1" "1&commit`j'==1" "0&commit`j'==0" "1&commit`j'==0"{
|
| |
|
| | if "`r'"=="0&commit`j'==1" loc name "bmcommit`x'`o'"
|
| | else if "`r'"=="1&commit`j'==1" loc name "amcommit`x'`o'"
|
| | else if "`r'"=="0&commit`j'==0" loc name "bmnocommit`x'`o'"
|
| | else loc name "amnocommit`x'`o'"
|
| |
|
| | gmm (eq1:28*(1-exp(-{lambda}*({betatilde}*({b}+prize)`v')))-days)
|
| | (eq2: 28*(1-exp(-{lambda}*({beta}*({b}+incentive)`v')))-visits)
|
| | (eq3: (1-{betatilde})*diffa2*({b}+(1+2)/2)-delta2)
|
| | (eq4: (1-{betatilde})*diffa3*({b}+(2+3)/2)-delta3)
|
| | (eq5: (1-{betatilde})*diffa5*({b}+(3+5)/2)-delta5)
|
| | (eq6: (1-{betatilde})*diffa7*({b}+(5+7)/2)-delta7)
|
| | (eq7: (1-{betatilde})*diffa12*({b}+(7+12)/2)-delta12)
|
| | if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&abovemedpast4==`r',
|
| | instruments (eq1: prize prize2) instruments(eq2:incentive incentivesq)
|
| | from (b 8 lambda 0.06 beta 0.5 betatilde 0.8) vce(cluster id) winitial(identity) nolog
|
| | foreach p in b lambda beta betatilde{
|
| | loc `p'`name' = [`p']_cons
|
| | }
|
| | }
|
| |
|
| |
|
| | sum abovemedpast4 if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit`j'==1
|
| | loc propamcommit`x'`o' = r(mean)
|
| | loc propbmcommit`x'`o' = 1 - r(mean)
|
| | loc propmavgcommit`x'`o' = 1
|
| | sum abovemedpast4 if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit`j'==0
|
| | loc propamnocommit`x'`o' = r(mean)
|
| | loc propbmnocommit`x'`o' = 1 - r(mean)
|
| |
|
| | }
|
| |
|
| |
|
| | forval j = 8(4)16{
|
| |
|
| | if `j' == 8 loc x "e"
|
| | else if `j' == 12 loc x ""
|
| | else loc x "s"
|
| |
|
| | foreach r in "1&commit`j'==1" "2&commit`j'==1" "3&commit`j'==1" "4&commit`j'==1" "1&commit`j'==0" "2&commit`j'==0" "3&commit`j'==0" "4&commit`j'==0"{
|
| |
|
| | if "`r'"=="1&commit`j'==1" loc name "qfstcommit`x'`o'"
|
| | else if "`r'"=="2&commit`j'==1" loc name "qsndcommit`x'`o'"
|
| | else if "`r'"=="3&commit`j'==1" loc name "qthdcommit`x'`o'"
|
| | else if "`r'"=="4&commit`j'==1" loc name "qfthcommit`x'`o'"
|
| | else if "`r'"=="1&commit`j'==0" loc name "qfstnocommit`x'`o'"
|
| | else if "`r'"=="2&commit`j'==0" loc name "qsndnocommit`x'`o'"
|
| | else if "`r'"=="3&commit`j'==0" loc name "qthdnocommit`x'`o'"
|
| | else loc name "qfthnocommit`x'`o'"
|
| |
|
| | gmm (eq1:28*(1-exp(-{lambda}*({betatilde}*({b}+prize)`v')))-days)
|
| | (eq2: 28*(1-exp(-{lambda}*({beta}*({b}+incentive)`v')))-visits)
|
| | (eq3: (1-{betatilde})*diffa2*({b}+(1+2)/2)-delta2)
|
| | (eq4: (1-{betatilde})*diffa3*({b}+(2+3)/2)-delta3)
|
| | (eq5: (1-{betatilde})*diffa5*({b}+(3+5)/2)-delta5)
|
| | (eq6: (1-{betatilde})*diffa7*({b}+(5+7)/2)-delta7)
|
| | (eq7: (1-{betatilde})*diffa12*({b}+(7+12)/2)-delta12)
|
| | if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&qpast4==`r',
|
| | instruments (eq1: prize prize2) instruments(eq2:incentive incentivesq)
|
| | from (b 8 lambda 0.06 beta 0.5 betatilde 0.8) vce(cluster id) winitial(identity) nolog
|
| | foreach p in b lambda beta betatilde{
|
| | loc `p'`name' = [`p']_cons
|
| | }
|
| | }
|
| |
|
| |
|
| | sum qpast4 if abovemedpast4==0&flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit`j'==1
|
| | loc propqfstcommit`x'`o' = (2 - r(mean))*`propbmcommit`x'`o''
|
| | loc propqsndcommit`x'`o' = (1 - (2 - r(mean)))*`propbmcommit`x'`o''
|
| | sum qpast4 if abovemedpast4==1&flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit`j'==1
|
| | loc propqthdcommit`x'`o' = (4 - r(mean))*`propamcommit`x'`o''
|
| | loc propqfthcommit`x'`o' = (1 - (4 - r(mean)))*`propamcommit`x'`o''
|
| | sum qpast4 if abovemedpast4==0&flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit`j'==0
|
| | loc propqfstnocommit`x'`o' = (2 - r(mean))*`propbmnocommit`x'`o''
|
| | loc propqsndnocommit`x'`o' = (1 - (2 - r(mean)))*`propbmnocommit`x'`o''
|
| | sum qpast4 if abovemedpast4==1&flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit`j'==0
|
| | loc propqthdnocommit`x'`o' = (4 - r(mean))*`propamnocommit`x'`o''
|
| | loc propqfthnocommit`x'`o' = (1 - (4 - r(mean)))*`propamnocommit`x'`o''
|
| |
|
| | }
|
| |
|
| |
|
| | forval j = 8(4)16{
|
| |
|
| | if `j' == 8 loc x "e"
|
| | else if `j' == 12 loc x ""
|
| | else loc x "s"
|
| |
|
| | foreach r in "0&control_info==1&commit`j'==1" "0&new_info==1&commit`j'==1" "1&control_info==1&commit`j'==1" "1&new_info==1&commit`j'==1" "0&control_info==1&commit`j'==0" "0&new_info==1&commit`j'==0" "1&control_info==1&commit`j'==0" "1&new_info==1&commit`j'==0" {
|
| |
|
| | if "`r'"=="0&control_info==1&commit`j'==1" loc name "bmctrlcommit`x'`o'"
|
| | else if "`r'"=="0&new_info==1&commit`j'==1" loc name "bminfocommit`x'`o'"
|
| | else if "`r'"=="1&control_info==1&commit`j'==1" loc name "amctrlcommit`x'`o'"
|
| | else if "`r'"=="1&new_info==1&commit`j'==1" loc name "aminfocommit`x'`o'"
|
| | else if "`r'"=="0&control_info==1&commit`j'==0" loc name "bmctrlnocommit`x'`o'"
|
| | else if "`r'"=="0&new_info==1&commit`j'==0" loc name "bminfonocommit`x'`o'"
|
| | else if "`r'"=="1&control_info==1&commit`j'==0" loc name "amctrlnocommit`x'`o'"
|
| | else loc name "aminfonocommit`x'`o'"
|
| |
|
| | gmm (eq1:28*(1-exp(-{lambda}*({betatilde}*({b}+prize)`v')))-days)
|
| | (eq2: 28*(1-exp(-{lambda}*({beta}*({b}+incentive)`v')))-visits)
|
| | (eq3: (1-{betatilde})*diffa2*({b}+(1+2)/2)-delta2)
|
| | (eq4: (1-{betatilde})*diffa3*({b}+(2+3)/2)-delta3)
|
| | (eq5: (1-{betatilde})*diffa5*({b}+(3+5)/2)-delta5)
|
| | (eq6: (1-{betatilde})*diffa7*({b}+(5+7)/2)-delta7)
|
| | (eq7: (1-{betatilde})*diffa12*({b}+(7+12)/2)-delta12)
|
| | if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&abovemedpast4==`r',
|
| | instruments (eq1: prize prize2) instruments(eq2:incentive incentivesq)
|
| | from (b 8 lambda 0.06 beta 0.5 betatilde 0.8) vce(cluster id) winitial(identity) nolog
|
| | foreach p in b lambda beta betatilde{
|
| | loc `p'`name' = [`p']_cons
|
| | }
|
| | }
|
| |
|
| |
|
| | sum commit`j' if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.
|
| | loc propcommit
|
| | sum abovemedpast4 if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit`j'==1
|
| | loc meanam = r(mean)
|
| | sum control_info if first_info!=1&flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit`j'==1&abovemedpast4==1
|
| | loc propamctrlcommit`x'`o' = `meanam'*r(mean)
|
| | loc propaminfocommit`x'`o' = `meanam'*(1 - r(mean))
|
| | sum control_info if first_info!=1&flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit`j'==1&abovemedpast4==0
|
| | loc propbmctrlcommit`x'`o' = (1 - `meanam')*r(mean)
|
| | loc propbminfocommit`x'`o' = (1 - `meanam')*(1 - r(mean))
|
| | sum abovemedpast4 if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit`j'==0
|
| | loc meanam = r(mean)
|
| | sum control_info if first_info!=1&flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit`j'==0&abovemedpast4==1
|
| | loc propamctrlnocommit`x'`o' = `meanam'*r(mean)
|
| | loc propaminfonocommit`x'`o' = `meanam'*(1 - r(mean))
|
| | sum control_info if first_info!=1&flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit`j'==0&abovemedpast4==0
|
| | loc propbmctrlnocommit`x'`o' = (1 - `meanam')*r(mean)
|
| | loc propbminfonocommit`x'`o' = (1 - `meanam')*(1 - r(mean))
|
| |
|
| | }
|
| |
|
| |
|
| | loc j = 12
|
| | loc x ""
|
| | foreach r in "1&commit`j'==1&control_info==1" "2&commit`j'==1&control_info==1" "3&commit`j'==1&control_info==1" "4&commit`j'==1&control_info==1" "1&commit`j'==1&new_info==1" "2&commit`j'==1&new_info==1" "3&commit`j'==1&new_info==1" "4&commit`j'==1&new_info==1" {
|
| |
|
| | if "`r'"=="1&commit`j'==1&control_info==1" loc name "qfstctrlcommit`x'`o'"
|
| | else if "`r'"=="2&commit`j'==1&control_info==1" loc name "qsndctrlcommit`x'`o'"
|
| | else if "`r'"=="3&commit`j'==1&control_info==1" loc name "qthdctrlcommit`x'`o'"
|
| | else if "`r'"=="4&commit`j'==1&control_info==1" loc name "qfthctrlcommit`x'`o'"
|
| | else if "`r'"=="1&commit`j'==0&control_info==1" loc name "qfstctrlnocommit`x'`o'"
|
| | else if "`r'"=="2&commit`j'==0&control_info==1" loc name "qsndctrlnocommit`x'`o'"
|
| | else if "`r'"=="3&commit`j'==0&control_info==1" loc name "qthdctrlnocommit`x'`o'"
|
| | else if "`r'"=="4&commit`j'==0&control_info==1" loc name "qfthctrlnocommit`x'`o'"
|
| | else if "`r'"=="1&commit`j'==1&new_info==1" loc name "qfstinfocommit`x'`o'"
|
| | else if "`r'"=="2&commit`j'==1&new_info==1" loc name "qsndinfocommit`x'`o'"
|
| | else if "`r'"=="3&commit`j'==1&new_info==1" loc name "qthdinfocommit`x'`o'"
|
| | else if "`r'"=="4&commit`j'==1&new_info==1" loc name "qfthinfocommit`x'`o'"
|
| | else if "`r'"=="1&commit`j'==0&new_info==1" loc name "qfstinfonocommit`x'`o'"
|
| | else if "`r'"=="2&commit`j'==0&new_info==1" loc name "qsndinfonocommit`x'`o'"
|
| | else if "`r'"=="3&commit`j'==0&new_info==1" loc name "qthdinfonocommit`x'`o'"
|
| | else loc name "qfthinfonocommit`x'`o'"
|
| |
|
| | gmm (eq1:28*(1-exp(-{lambda}*({betatilde}*({b}+prize)`v')))-days)
|
| | (eq2: 28*(1-exp(-{lambda}*({beta}*({b}+incentive)`v')))-visits)
|
| | (eq3: (1-{betatilde})*diffa2*({b}+(1+2)/2)-delta2)
|
| | (eq4: (1-{betatilde})*diffa3*({b}+(2+3)/2)-delta3)
|
| | (eq5: (1-{betatilde})*diffa5*({b}+(3+5)/2)-delta5)
|
| | (eq6: (1-{betatilde})*diffa7*({b}+(5+7)/2)-delta7)
|
| | (eq7: (1-{betatilde})*diffa12*({b}+(7+12)/2)-delta12)
|
| | if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&qpast4==`r',
|
| | instruments (eq1: prize prize2) instruments(eq2:incentive incentivesq)
|
| | from (b 8 lambda 0.06 beta 0.5 betatilde 0.8) vce(cluster id) winitial(identity) nolog
|
| | foreach p in b lambda beta betatilde{
|
| | loc `p'`name' = [`p']_cons
|
| | }
|
| | }
|
| |
|
| |
|
| | forval k = 1/4{
|
| | sum control_info if first_info!=1&flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit`j'==0&qpast4==`k'
|
| | loc propctrlq`k' = r(mean)
|
| | }
|
| | sum qpast4 if abovemedpast4==0&flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit`j'==1
|
| | loc propqfstctrlcommit`x'`o' = (2 - r(mean))*`propbmcommit`x'`o''*`propctrlq1'
|
| | loc propqfstinfocommit`x'`o' = (2 - r(mean))*`propbmcommit`x'`o''*(1 - `propctrlq1')
|
| | loc propqsndctrlcommit`x'`o' = (1 - (2 - r(mean)))*`propbmcommit`x'`o''*`propctrlq2'
|
| | loc propqsndinfocommit`x'`o' = (1 - (2 - r(mean)))*`propbmcommit`x'`o''*(1 - `propctrlq2')
|
| | sum qpast4 if abovemedpast4==1&flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit`j'==1
|
| | loc propqthdctrlcommit`x'`o' = (4 - r(mean))*`propamcommit`x'`o''*`propctrlq3'
|
| | loc propqthdinfocommit`x'`o' = (4 - r(mean))*`propamcommit`x'`o''*(1 - `propctrlq3')
|
| | loc propqfthctrlcommit`x'`o' = (1 - (4 - r(mean)))*`propamcommit`x'`o''*`propctrlq4'
|
| | loc propqfthinfocommit`x'`o' = (1 - (4 - r(mean)))*`propamcommit`x'`o''*(1 - `propctrlq4')
|
| | sum qpast4 if abovemedpast4==0&flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit`j'==0
|
| | loc propqfstctrlnocommit`x'`o' = (2 - r(mean))*`propbmnocommit`x'`o''*`propctrlq1'
|
| | loc propqfstinfonocommit`x'`o' = (2 - r(mean))*`propbmnocommit`x'`o''*(1 - `propctrlq1')
|
| | loc propqsndctrlnocommit`x'`o' = (1 - (2 - r(mean)))*`propbmnocommit`x'`o''*`propctrlq2'
|
| | loc propqsndinfonocommit`x'`o' = (1 - (2 - r(mean)))*`propbmnocommit`x'`o''*(1 - `propctrlq2')
|
| | sum qpast4 if abovemedpast4==1&flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit`j'==0
|
| | loc propqthdctrlnocommit`x'`o' = (4 - r(mean))*`propamnocommit`x'`o''*`propctrlq3'
|
| | loc propqthdinfonocommit`x'`o' = (4 - r(mean))*`propamnocommit`x'`o''*(1 - `propctrlq3')
|
| | loc propqfthctrlnocommit`x'`o' = (1 - (4 - r(mean)))*`propamnocommit`x'`o''*`propctrlq4'
|
| | loc propqfthinfonocommit`x'`o' = (1 - (4 - r(mean)))*`propamnocommit`x'`o''*(1 - `propctrlq4')
|
| |
|
| | }
|
| |
|
| |
|
| |
|
| |
|
| | gmm (eq1:28*(1-exp(-{lambda}*({betatilde}*({b}+prize)`v')))-days)
|
| | (eq2: 28*(1-exp(-{lambda}*({beta}*({b}+incentive)`v')))-visits)
|
| | (eq3: (1-{betatilde})*diffa2*({b}+(1+2)/2)-delta2)
|
| | (eq4: (1-{betatilde})*diffa3*({b}+(2+3)/2)-delta3)
|
| | (eq5: (1-{betatilde})*diffa5*({b}+(3+5)/2)-delta5)
|
| | (eq6: (1-{betatilde})*diffa7*({b}+(5+7)/2)-delta7)
|
| | (eq7: (1-{betatilde})*diffa12*({b}+(7+12)/2)-delta12)
|
| | if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit12==1,
|
| | instruments (eq1: prize prize2) instruments(eq2:incentive incentivesq)
|
| | from (b 8 lambda 0.06 beta 0.5 betatilde 0.8) vce(cluster id) winitial(identity) nolog
|
| | latex_write_gmm twelve`o' `lx'
|
| |
|
| |
|
| | foreach param in lambda betatilde b beta {
|
| | loc `param'commit12`o' = [`param']_cons
|
| | }
|
| |
|
| |
|
| | nlcom (1-[beta]_cons)*[b]_cons
|
| | latex_write_nlcom ainttwelve`o' `lx'
|
| |
|
| |
|
| | nlcom (1-[betatilde]_cons)/(1-[beta]_cons)
|
| | latex_write_nlcom naivetwelve`o' `lx'
|
| |
|
| |
|
| | nlcom 1/[lambda]_cons
|
| | latex_write_nlcom expcosttwelve`o' `lx'
|
| |
|
| |
|
| | sum commit12 if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.
|
| | loc propcommit12`o' = r(mean)
|
| | loc propnocommit12`o' = 1 - r(mean)
|
| |
|
| | if "`v'" == ""{
|
| |
|
| |
|
| | predictnl mean_days_c12_pred =
|
| | 28*(1-exp(-[lambda]_cons*[betatilde]_cons*([b]_cons+plot_incentive)))
|
| | if _n > $obs, ci(lb_days_c12_pred ub_days_c12_pred) level(95)
|
| | predictnl mean_visits_c12_pred =
|
| | 28*(1-exp(-[lambda]_cons*[beta]_cons*([b]_cons+plot_incentive)))
|
| | if _n > $obs, ci(lb_visits_c12_pred ub_visits_c12_pred) level(95)
|
| |
|
| |
|
| | twoway (conn mean_days_c12_pred plot_incentive, lcolor(black) m(none))
|
| | (conn ub_days_c12_pred plot_incentive, lc(black) lp(shortdash) m(none))
|
| | (conn lb_days_c12_pred plot_incentive, lc(black) lp(shortdash) m(none))
|
| | (sc mean_days_c12_ prize, msize(small) color(black))
|
| | (rcap ub_days_c12_ lb_days_c12_ prize, lcolor(black) lwidth(medium) lpattern(dash))
|
| | (conn mean_visits_c12_pred plot_incentive, lcolor(red) m(none))
|
| | (conn ub_visits_c12_pred plot_incentive, lc(red) lp(shortdash) m(none))
|
| | (conn lb_visits_c12_pred plot_incentive, lc(red) lp(shortdash) m(none))
|
| | (sc mean_visits_c12_ prize, m(square) msize(small) color(red))
|
| | (rcap ub_visits_c12_ lb_visits_c12_ prize, lcolor(red) lwidth(medium) lpattern(dash)),
|
| | xlab(0(1)12) ylabel(0(5)22, angle(0))
|
| | xtitle("Per-visit incentive ($)", height(6)) ytitle("Visits", height(6))
|
| | graphregion(color(white)) plotregion(margin(sides))
|
| | legend(order(1 2 6 7 4 9) label(1 "Predicted expected visits") label(2 "Prediction 95% CI") label(4 "Average expected visits") label(6 "Predicted realized visits") label(7 "Prediction 95% CI") label(9 "Average realized visits")) legend(rows(3))
|
| | graph export overconfidence_estimates_commit12.pdf, replace
|
| |
|
| |
|
| | loc internalityC12=(1-[beta]_cons)*[b]_cons
|
| |
|
| | reg visits getcommit if wave3==1&(getcommit==1|incentive==0)&commit12==1
|
| | loc internalityBenefit=_b[getcommit]*`internalityC12'
|
| | di `internalityBenefit'
|
| |
|
| | qui sum visits12 if commit12==1&getcommit==1
|
| | loc lose=1-r(mean)
|
| | loc dollarslost=`lose'*80
|
| | di `dollarslost'
|
| |
|
| | di `dollarslost'-`internalityBenefit'
|
| |
|
| | }
|
| |
|
| |
|
| | if "`v'" != "+0"{
|
| | gmm (eq1:28*(1-exp(-{lambda}*({betatilde}*({b}+prize)`v')))-days)
|
| | (eq2: 28*(1-exp(-{lambda}*({beta}*({b}+incentive)`v')))-visits)
|
| | (eq3: (1-{betatilde})*diffa2*({b}+(1+2)/2)-delta2)
|
| | (eq4: (1-{betatilde})*diffa3*({b}+(2+3)/2)-delta3)
|
| | (eq5: (1-{betatilde})*diffa5*({b}+(3+5)/2)-delta5)
|
| | (eq6: (1-{betatilde})*diffa7*({b}+(5+7)/2)-delta7)
|
| | (eq7: (1-{betatilde})*diffa12*({b}+(7+12)/2)-delta12)
|
| | if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit12==0,
|
| | instruments (eq1: prize prize2) instruments(eq2:incentive incentivesq)
|
| | from (b 8 lambda 0.06 beta 0.5 betatilde 0.8) vce(cluster id) winitial(identity) nolog
|
| | if "`v'" == "" latex_write_gmm notwelve `lx'
|
| |
|
| |
|
| | foreach param in lambda betatilde b beta {
|
| | loc `param'nocommit12`o' = [`param']_cons
|
| | }
|
| |
|
| | if "`v'" == ""{
|
| |
|
| | nlcom (1-[beta]_cons)*[b]_cons
|
| | latex_write_nlcom aintnotwelve `lx'
|
| |
|
| |
|
| | nlcom (1-[betatilde]_cons)/(1-[beta]_cons)
|
| | latex_write_nlcom naivenotwelve `lx'
|
| |
|
| |
|
| | nlcom 1/[lambda]_cons
|
| | latex_write_nlcom expcostnotwelve `lx'
|
| | }
|
| | }
|
| |
|
| |
|
| |
|
| |
|
| | gmm (eq1:28*(1-exp(-{lambda}*({betatilde}*({b}+prize)`v')))-days)
|
| | (eq2: 28*(1-exp(-{lambda}*({beta}*({b}+incentive)`v')))-visits)
|
| | (eq3: (1-{betatilde})*diffa2*({b}+(1+2)/2)-delta2)
|
| | (eq4: (1-{betatilde})*diffa3*({b}+(2+3)/2)-delta3)
|
| | (eq5: (1-{betatilde})*diffa5*({b}+(3+5)/2)-delta5)
|
| | (eq6: (1-{betatilde})*diffa7*({b}+(5+7)/2)-delta7)
|
| | (eq7: (1-{betatilde})*diffa12*({b}+(7+12)/2)-delta12)
|
| | if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit8==1,
|
| | instruments (eq1: prize prize2) instruments(eq2:incentive incentivesq)
|
| | from (b 8 lambda 0.06 beta 0.5 betatilde 0.8) vce(cluster id) winitial(identity) nolog
|
| | latex_write_gmm eight`o' `lx'
|
| |
|
| |
|
| | foreach param in lambda betatilde b beta {
|
| | loc `param'commit8`o' = [`param']_cons
|
| | }
|
| |
|
| |
|
| | nlcom (1-[beta]_cons)*[b]_cons
|
| | latex_write_nlcom ainteight`o' `lx'
|
| |
|
| |
|
| | nlcom (1-[betatilde]_cons)/(1-[beta]_cons)
|
| | latex_write_nlcom naiveeight`o' `lx'
|
| |
|
| |
|
| | nlcom 1/[lambda]_cons
|
| | latex_write_nlcom expcosteight`o' `lx'
|
| |
|
| |
|
| | sum commit8 if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.
|
| | loc propcommit8`o' = r(mean)
|
| | loc propnocommit8`o' = 1 -r(mean)
|
| |
|
| |
|
| |
|
| | if "`v'" != "+0"{
|
| | gmm (eq1:28*(1-exp(-{lambda}*({betatilde}*({b}+prize)`v')))-days)
|
| | (eq2: 28*(1-exp(-{lambda}*({beta}*({b}+incentive)`v')))-visits)
|
| | (eq3: (1-{betatilde})*diffa2*({b}+(1+2)/2)-delta2)
|
| | (eq4: (1-{betatilde})*diffa3*({b}+(2+3)/2)-delta3)
|
| | (eq5: (1-{betatilde})*diffa5*({b}+(3+5)/2)-delta5)
|
| | (eq6: (1-{betatilde})*diffa7*({b}+(5+7)/2)-delta7)
|
| | (eq7: (1-{betatilde})*diffa12*({b}+(7+12)/2)-delta12)
|
| | if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit8==0,
|
| | instruments (eq1: prize prize2) instruments(eq2:incentive incentivesq)
|
| | from (b 8 lambda 0.06 beta 0.5 betatilde 0.8) vce(cluster id) winitial(identity) nolog
|
| | if "`v'" == "" latex_write_gmm noeight `lx'
|
| |
|
| |
|
| | foreach param in lambda betatilde b beta {
|
| | loc `param'nocommit8`o' = [`param']_cons
|
| | }
|
| |
|
| | if "`v'" == ""{
|
| |
|
| | nlcom (1-[beta]_cons)*[b]_cons
|
| | latex_write_nlcom aintnoeight `lx'
|
| |
|
| |
|
| | nlcom (1-[betatilde]_cons)/(1-[beta]_cons)
|
| | latex_write_nlcom naivenoeight `lx'
|
| |
|
| |
|
| | nlcom 1/[lambda]_cons
|
| | latex_write_nlcom expcostnoeight `lx'
|
| | }
|
| | }
|
| |
|
| |
|
| |
|
| |
|
| | gmm (eq1:28*(1-exp(-{lambda}*({betatilde}*({b}+prize)`v')))-days)
|
| | (eq2: 28*(1-exp(-{lambda}*({beta}*({b}+incentive)`v')))-visits)
|
| | (eq3: (1-{betatilde})*diffa2*({b}+(1+2)/2)-delta2)
|
| | (eq4: (1-{betatilde})*diffa3*({b}+(2+3)/2)-delta3)
|
| | (eq5: (1-{betatilde})*diffa5*({b}+(3+5)/2)-delta5)
|
| | (eq6: (1-{betatilde})*diffa7*({b}+(5+7)/2)-delta7)
|
| | (eq7: (1-{betatilde})*diffa12*({b}+(7+12)/2)-delta12)
|
| | if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit16==1,
|
| | instruments (eq1: prize prize2) instruments(eq2:incentive incentivesq)
|
| | from (b 8 lambda 0.06 beta 0.5 betatilde 0.8) vce(cluster id) winitial(identity) nolog
|
| | latex_write_gmm sixteen`o' `lx'
|
| |
|
| |
|
| | foreach param in lambda betatilde b beta {
|
| | loc `param'commit16`o' = [`param']_cons
|
| | }
|
| |
|
| |
|
| | nlcom (1-[beta]_cons)*[b]_cons
|
| | latex_write_nlcom aintsixteen`o' `lx'
|
| |
|
| |
|
| | nlcom (1-[betatilde]_cons)/(1-[beta]_cons)
|
| | latex_write_nlcom naivesixteen`o' `lx'
|
| |
|
| |
|
| | nlcom 1/[lambda]_cons
|
| | latex_write_nlcom expcostsixteen`o' `lx'
|
| |
|
| |
|
| | sum commit16 if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.
|
| | loc propcommit16`o' = r(mean)
|
| | loc propnocommit16`o' = 1 -r(mean)
|
| |
|
| |
|
| |
|
| | if "`v'" != "+0"{
|
| | gmm (eq1:28*(1-exp(-{lambda}*({betatilde}*({b}+prize)`v')))-days)
|
| | (eq2: 28*(1-exp(-{lambda}*({beta}*({b}+incentive)`v')))-visits)
|
| | (eq3: (1-{betatilde})*diffa2*({b}+(1+2)/2)-delta2)
|
| | (eq4: (1-{betatilde})*diffa3*({b}+(2+3)/2)-delta3)
|
| | (eq5: (1-{betatilde})*diffa5*({b}+(3+5)/2)-delta5)
|
| | (eq6: (1-{betatilde})*diffa7*({b}+(5+7)/2)-delta7)
|
| | (eq7: (1-{betatilde})*diffa12*({b}+(7+12)/2)-delta12)
|
| | if flag_low_wtp==0&flag_exclude_exog==0&incentive!=.&commit16==0,
|
| | instruments (eq1: prize prize2) instruments(eq2:incentive incentivesq)
|
| | from (b 8 lambda 0.06 beta 0.5 betatilde 0.8) vce(cluster id) winitial(identity) nolog
|
| | if "`v'" == "" latex_write_gmm nosixteen `lx'
|
| |
|
| |
|
| | foreach param in lambda betatilde b beta {
|
| | loc `param'nocommit16`o' = [`param']_cons
|
| | }
|
| |
|
| | if "`v'" == ""{
|
| |
|
| | nlcom (1-[beta]_cons)*[b]_cons
|
| | latex_write_nlcom aintnosixteen `lx'
|
| |
|
| |
|
| | nlcom (1-[betatilde]_cons)/(1-[beta]_cons)
|
| | latex_write_nlcom naivenosixteen `lx'
|
| |
|
| |
|
| | nlcom 1/[lambda]_cons
|
| | latex_write_nlcom expcostnosixteen `lx'
|
| | }
|
| | }
|
| |
|
| | }
|
| |
|
| | restore
|
| |
|
| |
|
| |
|
| |
|
| | foreach o in "" "V" "X"{
|
| |
|
| | foreach f in bmcommit`o' amcommit`o' bmnocommit`o' amnocommit`o'
|
| | bmcommite`o' amcommite`o' bmnocommite`o' amnocommite`o'
|
| | bmcommits`o' amcommits`o' bmnocommits`o' amnocommits`o'
|
| | qfstcommit`o' qsndcommit`o' qthdcommit`o' qfthcommit`o'
|
| | qfstnocommit`o' qsndnocommit`o' qthdnocommit`o' qfthnocommit`o'
|
| | qfstcommite`o' qsndcommite`o' qthdcommite`o' qfthcommite`o'
|
| | qfstnocommite`o' qsndnocommite`o' qthdnocommite`o' qfthnocommite`o'
|
| | qfstcommits`o' qsndcommits`o' qthdcommits`o' qfthcommits`o'
|
| | qfstnocommits`o' qsndnocommits`o' qthdnocommits`o' qfthnocommits`o'
|
| | qfstctrlcommit`o' qsndctrlcommit`o' qthdctrlcommit`o' qfthctrlcommit`o'
|
| | qfstinfocommit`o' qsndinfocommit`o' qthdinfocommit`o' qfthinfocommit`o'
|
| | bmctrlcommit`o' bminfocommit`o' amctrlcommit`o' aminfocommit`o'
|
| | bmctrlnocommit`o' bminfonocommit`o' amctrlnocommit`o' aminfonocommit`o'
|
| | bmctrlcommite`o' bminfocommite`o' amctrlcommite`o' aminfocommite`o'
|
| | bmctrlnocommite`o' bminfonocommite`o' amctrlnocommite`o' aminfonocommite`o'
|
| | bmctrlcommits`o' bminfocommits`o' amctrlcommits`o' aminfocommits`o'
|
| | bmctrlnocommits`o' bminfonocommits`o' amctrlnocommits`o' aminfonocommits`o'
|
| | commit12`o' nocommit12`o' commit8`o' nocommit8`o' commit16`o' nocommit16`o'{
|
| |
|
| | preserve
|
| | clear
|
| | set obs 1
|
| | foreach p in lambda beta betatilde b prop{
|
| | gen `p' = ``p'`f''
|
| | }
|
| | outsheet using "parameter_estimates/`f'.csv", comma replace
|
| | restore
|
| | }
|
| |
|
| | }
|
| |
|
| |
|
| |
|
| |
|
| | preserve
|
| |
|
| | keep if flag_low_wtp==0&flag_exclude_exog==0
|
| |
|
| |
|
| | gen got_contract = 1 if treatment == "threshold80_12"
|
| | replace got_contract = 0 if treatment == "control"
|
| | gen success = visits >= 12
|
| |
|
| |
|
| | reg visits got_contract wave? if commit12==1
|
| | matrix temp = r(table)'
|
| | loc b : di %4.2f temp[1,1]
|
| | loc lb : di %4.2f temp[1,5]
|
| | loc ub : di %4.2f temp[1,6]
|
| | loc ci : di "(`lb', `ub')"
|
| | latex_write empirDaC `b' numbers
|
| | latex_write empirDaCCI "`ci'" numbers
|
| |
|
| |
|
| | reg success wave? if commit12==1&treatment=="control"
|
| | matrix temp = r(table)'
|
| | loc b : di %4.2f temp[4,1]
|
| | loc lb : di %4.2f temp[4,5]
|
| | loc ub : di %4.2f temp[4,6]
|
| | loc ci : di "(`lb', `ub')"
|
| | latex_write empirctrlPmeet `b' numbers
|
| | latex_write empirctrlPmeetCI "`ci'" numbers
|
| |
|
| | reg success if commit12==1&treatment=="threshold80_12"
|
| | matrix temp = r(table)'
|
| | loc b : di %4.2f temp[1,1]
|
| | loc lb : di %4.2f temp[1,5]
|
| | loc ub : di %4.2f temp[1,6]
|
| | loc ci : di "(`lb', `ub')"
|
| | latex_write empirtreatPmeet `b' numbers
|
| | latex_write empirtreatPmeetCI "`ci'" numbers
|
| |
|
| |
|
| | reg success got_contract wave? if commit12==1
|
| | matrix temp = r(table)'
|
| | loc b : di %4.2f temp[1,1]
|
| | loc lb : di %4.2f temp[1,5]
|
| | loc ub : di %4.2f temp[1,6]
|
| | loc ci : di "(`lb', `ub')"
|
| | latex_write empirDmeet `b' numbers
|
| | latex_write empirDmeetCI "`ci'" numbers
|
| | restore
|
| |
|