Commit
·
59c198f
1
Parent(s):
a54b2f4
add 18
Browse files- 18/paper.pdf +3 -0
- 18/replication_package/ReadMe.pdf +3 -0
- 18/replication_package/thank_you_replication/data/callog.dta +3 -0
- 18/replication_package/thank_you_replication/data/charity.xlsx +3 -0
- 18/replication_package/thank_you_replication/data/charity_more_questions.csv +3 -0
- 18/replication_package/thank_you_replication/data/demographics.dta +3 -0
- 18/replication_package/thank_you_replication/data/experiment_data.xlsx +3 -0
- 18/replication_package/thank_you_replication/data/gift.dta +3 -0
- 18/replication_package/thank_you_replication/data/spi2019_practitioner.xlsx +3 -0
- 18/replication_package/thank_you_replication/data/spi_mailing_list.csv +3 -0
- 18/replication_package/thank_you_replication/data/transactions.dta +3 -0
- 18/replication_package/thank_you_replication/data/treatments.dta +3 -0
- 18/replication_package/thank_you_replication/dofiles/01_dataprep/main.do +31 -0
- 18/replication_package/thank_you_replication/dofiles/01_dataprep/step1_creating_temp_datasets.do +559 -0
- 18/replication_package/thank_you_replication/dofiles/01_dataprep/step2_creating_exp1_2_3_dataset.do +153 -0
- 18/replication_package/thank_you_replication/dofiles/01_dataprep/step3_creating_charity_dataset.do +108 -0
- 18/replication_package/thank_you_replication/dofiles/01_dataprep/step4_creating_uas_dataset.do +44 -0
- 18/replication_package/thank_you_replication/dofiles/01_dataprep/step5_creating_forecast_sample_figure2.do +152 -0
- 18/replication_package/thank_you_replication/dofiles/01_dataprep/step6_creating_charity_round2.do +145 -0
- 18/replication_package/thank_you_replication/dofiles/02_analysis/Figure1_giving_cumprob.do +50 -0
- 18/replication_package/thank_you_replication/dofiles/02_analysis/Figure2_forecast_graph.do +67 -0
- 18/replication_package/thank_you_replication/dofiles/02_analysis/Figure3_obs_pred_don_rates.do +102 -0
- 18/replication_package/thank_you_replication/dofiles/02_analysis/Table1_balance_table.do +322 -0
- 18/replication_package/thank_you_replication/dofiles/02_analysis/Table2_treatment_effects.do +235 -0
- 18/replication_package/thank_you_replication/dofiles/02_analysis/main.do +45 -0
- 18/replication_package/thank_you_replication/dofiles/03_appendix/FigureA2_kdensity.do +28 -0
- 18/replication_package/thank_you_replication/dofiles/03_appendix/FigureA3_historgram_forecasted.do +106 -0
- 18/replication_package/thank_you_replication/dofiles/03_appendix/FigureA4_histogram_forecasted_conditional.do +111 -0
- 18/replication_package/thank_you_replication/dofiles/03_appendix/FigureA5_charity_characteristics.do +29 -0
- 18/replication_package/thank_you_replication/dofiles/03_appendix/FigureA6_obs_pred_don_behavior.do +243 -0
- 18/replication_package/thank_you_replication/dofiles/03_appendix/TableA1_factors_associated_with_giving.do +109 -0
- 18/replication_package/thank_you_replication/dofiles/03_appendix/TableA2_average_gift_amount_LATE.do +90 -0
- 18/replication_package/thank_you_replication/dofiles/03_appendix/TableA3_treatment_future_years.do +92 -0
- 18/replication_package/thank_you_replication/dofiles/03_appendix/TableA4_unconditional_gift_te_exp1.do +38 -0
- 18/replication_package/thank_you_replication/dofiles/03_appendix/TableA5_experience.do +72 -0
- 18/replication_package/thank_you_replication/dofiles/03_appendix/TableA6_general_interactions_combined.do +53 -0
- 18/replication_package/thank_you_replication/dofiles/03_appendix/main.do +65 -0
- 18/replication_package/thank_you_replication/dofiles/master.do +95 -0
- 18/replication_package/thank_you_replication/dofiles/step0_Install_Packages_One_Time.do +13 -0
- 18/replication_package/thank_you_replication/questionnaires/SPI2019_practitioner_survey.pdf +3 -0
- 18/replication_package/thank_you_replication/questionnaires/charity_more_questions_survey.pdf +3 -0
- 18/replication_package/thank_you_replication/questionnaires/charity_survey.pdf +3 -0
- 18/replication_package/thank_you_replication/questionnaires/uas166_relevant_pg34_37.pdf +3 -0
- 18/replication_package/thank_you_replication/questionnaires/uas24_relevant_pg81.pdf +3 -0
- 18/should_reproduce.txt +3 -0
18/paper.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:bdd3007078e8eb626bd729db26cf517f9f5d7bb1c2a51ffc856bd359b3311a13
|
3 |
+
size 683664
|
18/replication_package/ReadMe.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6e826dafd08357c660f0c7c9cdd850b09de3df8adda54c86cc964b8db416891c
|
3 |
+
size 237955
|
18/replication_package/thank_you_replication/data/callog.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:62493a98a2e9f60c55371851a72a7ae99881eb3b3a13d5c132cb7715b01ec5b0
|
3 |
+
size 42098686
|
18/replication_package/thank_you_replication/data/charity.xlsx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:13c2a5b9df172709e6941fbfa952dc30195a018970fcc42c144a4f341009cd29
|
3 |
+
size 11680
|
18/replication_package/thank_you_replication/data/charity_more_questions.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:45e16117b688c92f5ee70eab11ca8560ac950dcb361d07abd0b9eeb20b9df0d7
|
3 |
+
size 32455
|
18/replication_package/thank_you_replication/data/demographics.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3135e190caf9a1cc2f38c8cf536f40bd7d0acd216c735e190bd6f15c7f44283e
|
3 |
+
size 10576116
|
18/replication_package/thank_you_replication/data/experiment_data.xlsx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:efb3a48203e72c6b57b383e84ff5922a68bdc0c2e9f615466f838f5cc5feeba1
|
3 |
+
size 10829
|
18/replication_package/thank_you_replication/data/gift.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4b9a678b08be536295575dac757eb543ff573555a5731c5674c391c375066111
|
3 |
+
size 4643174
|
18/replication_package/thank_you_replication/data/spi2019_practitioner.xlsx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2febbd3da1e35ee9fc8d475e431cf9733b50aa5501e6ae04238510e5bd59c98e
|
3 |
+
size 4686
|
18/replication_package/thank_you_replication/data/spi_mailing_list.csv
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b2829f4bde21ff5af7be9f1cfcfb2c5b788eaa07d332baec403edc06fe361b80
|
3 |
+
size 6038
|
18/replication_package/thank_you_replication/data/transactions.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:73a37d772dc5bb5dcdb6c5ecc8338a5246a8e480c065086edc6636ca43c9f0d2
|
3 |
+
size 243266366
|
18/replication_package/thank_you_replication/data/treatments.dta
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ae26741917cc36b2f21d9a35761f52612fba3214da18e908b9bffeaa12bd7787
|
3 |
+
size 604879
|
18/replication_package/thank_you_replication/dofiles/01_dataprep/main.do
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**********************************************************************************************
|
2 |
+
* Purpose: Runs all do-files located in the dofiles/dataprep folder
|
3 |
+
* Date modified: 2021
|
4 |
+
|
5 |
+
*Instructions: Uncomment line 22 and 29 after data from UAS has been received and all do files
|
6 |
+
in the dataprep folder have been run
|
7 |
+
**********************************************************************************************/
|
8 |
+
|
9 |
+
*===============================================================================
|
10 |
+
* CREATING DATASETS
|
11 |
+
*===============================================================================
|
12 |
+
|
13 |
+
do "$dofiles/01_dataprep/step1_creating_temp_datasets.do"
|
14 |
+
do "$dofiles/01_dataprep/step2_creating_exp1_2_3_dataset.do"
|
15 |
+
do "$dofiles/01_dataprep/step3_creating_charity_dataset.do"
|
16 |
+
|
17 |
+
/***********************************************************************************************
|
18 |
+
Uncomment below line after data from UAS has been received and all do files in the dataprep folder
|
19 |
+
have been run
|
20 |
+
***********************************************************************************************/
|
21 |
+
|
22 |
+
*do "$dofiles/01_dataprep/step4_creating_uas_dataset.do"
|
23 |
+
|
24 |
+
/***********************************************************************************************
|
25 |
+
Uncomment below line after data from UAS has been received and all do files in the dataprep folder
|
26 |
+
have been run
|
27 |
+
***********************************************************************************************/
|
28 |
+
|
29 |
+
*do "$dofiles/01_dataprep/step5_creating_forecast_sample_figure2.do"
|
30 |
+
|
31 |
+
do "$dofiles/01_dataprep/step6_creating_charity_round2.do"
|
18/replication_package/thank_you_replication/dofiles/01_dataprep/step1_creating_temp_datasets.do
ADDED
@@ -0,0 +1,559 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/********************************************************************************
|
2 |
+
* Purpose: This do file creates, cleans, and merges files to create the datasets
|
3 |
+
out of which final data for experiment 1, 2 and 3 will be extracted for analysis.
|
4 |
+
It also creates the final dataset used for the creation of Figure 1
|
5 |
+
|
6 |
+
*Input Files: transactions.dta, callog.dta, demographics.dta, treatments.dta, gift.dta
|
7 |
+
*Temp Files: transaction_temp.dta, callog_temp.dta, demographics_temp.dta, treatments_temp.dta
|
8 |
+
*Output Files: temp_data_exp1_exp3, reshaped_temp_data_exp1_exp3, gift_exp2temp
|
9 |
+
********************************************************************************/
|
10 |
+
|
11 |
+
cd "$dir/data"
|
12 |
+
|
13 |
+
/////////////////////////////////////////////////////////
|
14 |
+
//// /////
|
15 |
+
//// PREPARE TRANSACTION DATA /////
|
16 |
+
//// /////
|
17 |
+
/////////////////////////////////////////////////////////
|
18 |
+
|
19 |
+
use "transactions", clear //transaction log
|
20 |
+
|
21 |
+
split gift_date, p(" ") //all of the dates have an hour attached
|
22 |
+
drop gift_date2
|
23 |
+
drop gift_date
|
24 |
+
ren gift_date1 gift_date
|
25 |
+
|
26 |
+
gen date=date(gift_date, "YMD")
|
27 |
+
format date %d //format date
|
28 |
+
sort account_id date
|
29 |
+
|
30 |
+
//Create variables for gift type - installment, or one-time
|
31 |
+
|
32 |
+
gen gift_kind1=0 if gift_kind=="IN"
|
33 |
+
replace gift_kind1=1 if gift_kind=="OP"
|
34 |
+
replace gift_kind1=2 if source_category=="SG"
|
35 |
+
replace gift_kind1=3 if gift_kind=="NULL"
|
36 |
+
replace gift_kind1=4 if gift_kind1==. //all other types
|
37 |
+
|
38 |
+
gen pledge=0
|
39 |
+
replace pledge=1 if source_category=="P" //identify pledge gifts
|
40 |
+
|
41 |
+
label define source_definition 0 "Installment" 1 "One time payment" 2 "Sustaining Gift" 3 "Other" 4 "Unknown"
|
42 |
+
label values gift_kind1 source_definition
|
43 |
+
|
44 |
+
//Create variables for solicitation type
|
45 |
+
|
46 |
+
gen technique1=0 if technique=="FF"
|
47 |
+
replace technique1=1 if technique=="IN"
|
48 |
+
replace technique1=2 if technique=="MM"
|
49 |
+
replace technique1=3 if technique=="OT"
|
50 |
+
replace technique1=4 if technique1==. //all other types
|
51 |
+
|
52 |
+
label define technique_definition 0 "Face to Face" 1 "Internet" 2 "Mailing" 3 "Other" 4 "Unknown"
|
53 |
+
label values technique1 technique_definition
|
54 |
+
|
55 |
+
//Create numeric variables for rejoin type - new, renewing
|
56 |
+
|
57 |
+
gen gift_type1=0 if gift_type=="NW"
|
58 |
+
replace gift_type1=1 if gift_type=="RN"
|
59 |
+
replace gift_type1=2 if gift_type=="RJ"
|
60 |
+
replace gift_type1=3 if gift_type=="AD"
|
61 |
+
replace gift_type1=4 if gift_type=="UP"
|
62 |
+
replace gift_type1=5 if gift_type=="OT"
|
63 |
+
replace gift_type1=6 if gift_type1==. //all other types
|
64 |
+
|
65 |
+
label define gift_definition 0 "New" 1 "Renewal" 2 "Rejoin" 3 "Additional" 4 "Upgrade" 5 "Other" 6 "Unknown"
|
66 |
+
label values gift_type1 gift_definition
|
67 |
+
|
68 |
+
|
69 |
+
|
70 |
+
//Rename variables
|
71 |
+
|
72 |
+
drop technique gift_type gift_kind
|
73 |
+
ren technique1 technique
|
74 |
+
ren gift_type1 gift_type
|
75 |
+
ren gift_kind1 gift_kind
|
76 |
+
label var technique "Solicitation type"
|
77 |
+
label var gift_kind "Gift Kind-Onetime or Inst"
|
78 |
+
label var gift_type "Gift Type-New or Renew"
|
79 |
+
label var date "Date of gift (transactions)"
|
80 |
+
label var account_id "Account ID"
|
81 |
+
label var gift_date "Formatted Date of gift (transactions)"
|
82 |
+
label var payment_amount "Donation amount"
|
83 |
+
|
84 |
+
|
85 |
+
replace account=upper(account) //standardize account ID
|
86 |
+
replace station=upper(station)
|
87 |
+
|
88 |
+
//Collapse all so you have only one payment per day
|
89 |
+
|
90 |
+
collapse (sum) payment_amount (mean) gift_kind technique gift_type pledge, by(account_id date station gift_date)
|
91 |
+
|
92 |
+
|
93 |
+
//Format transaction dates
|
94 |
+
|
95 |
+
gen transaction_month=month(date)
|
96 |
+
gen transaction_year=year(date)
|
97 |
+
|
98 |
+
|
99 |
+
//A few IDs give above $10,000 or more at some point. Tag all of them.
|
100 |
+
|
101 |
+
gen big_donor_temp=1 if payment_amount>=10000
|
102 |
+
bysort account: egen big_donor=sum(big_donor_temp)
|
103 |
+
|
104 |
+
|
105 |
+
save transaction_temp, replace
|
106 |
+
|
107 |
+
/////////////////////////////////////////////////////////
|
108 |
+
//// /////
|
109 |
+
//// PREPARE CALL DATA /////
|
110 |
+
//// /////
|
111 |
+
/////////////////////////////////////////////////////////
|
112 |
+
|
113 |
+
use "callog", clear //log of calls
|
114 |
+
|
115 |
+
|
116 |
+
replace account=upper(account) //standardize account ID
|
117 |
+
replace station=upper(station)
|
118 |
+
|
119 |
+
//Drop anyone who was accidentally in the experiment two times
|
120 |
+
|
121 |
+
duplicates tag account, gen(t) //this drops 0.26% of the calls (1,139)
|
122 |
+
drop if t>0
|
123 |
+
|
124 |
+
// Label variables
|
125 |
+
|
126 |
+
gen date_call=date(int_contact_date, "DM20Y")
|
127 |
+
format date_call %d
|
128 |
+
label var date_call "Date of call from call log"
|
129 |
+
|
130 |
+
gen date_gift=date(gift_date, "DM20Y")
|
131 |
+
format date_gift %d
|
132 |
+
label var date_gift "Date of gift from call log"
|
133 |
+
|
134 |
+
ren segment treatment
|
135 |
+
label var treatment "Treatment"
|
136 |
+
gen treat=0 if treatment=="Control"
|
137 |
+
replace treat=1 if treatment=="Active Calls"
|
138 |
+
label var treat "Treatment 0/1"
|
139 |
+
|
140 |
+
gen date=date(gift_date, "MDY")
|
141 |
+
format date %d
|
142 |
+
label var date "Date of gift (call log)"
|
143 |
+
label var account "Account ID"
|
144 |
+
sort account_id date
|
145 |
+
|
146 |
+
label var exec_date "YYMM of TY Group"
|
147 |
+
|
148 |
+
//Generate response type
|
149 |
+
|
150 |
+
gen response_type1=0 if response_type=="LEFTMSG"
|
151 |
+
replace response_type1=1 if response_type=="NEGENG"
|
152 |
+
replace response_type1=2 if response_type=="NOCALL"
|
153 |
+
replace response_type1=3 if response_type=="NOREACH"
|
154 |
+
replace response_type1=4 if response_type=="POSENG"
|
155 |
+
replace response_type1=5 if response_type=="REACHED"
|
156 |
+
replace response_type1=6 if response_type1==.
|
157 |
+
|
158 |
+
label define response_label 0 "Left Message" 1 "Negative Eng" 2 "Control" 3 "Not reached" 4 "Positive Eng" 5 "Neutral Eng" 6 "Unknown"
|
159 |
+
label values response_type1 response_label
|
160 |
+
label var response_type1 "Response Type"
|
161 |
+
|
162 |
+
//Generate engagement dummies
|
163 |
+
|
164 |
+
gen reached=0 if treat==1
|
165 |
+
replace reached=1 if response_type=="POSENG" | response_type=="NEGENG" | response_type=="REACHED" | response_type=="LEFTMSG"
|
166 |
+
label var reached "Reached, 0/1 if treated"
|
167 |
+
|
168 |
+
gen positive_engagement=0 if treat==1
|
169 |
+
replace positive_engagement=1 if response_type=="POSENG"
|
170 |
+
label var positive_engagement "Positive, 0/1 if treated"
|
171 |
+
|
172 |
+
gen neutral_engagement=0 if treat==1
|
173 |
+
replace neutral_engagement=1 if response_type=="REACHED"
|
174 |
+
label var neutral_engagement "Positive, 0/1 if treated"
|
175 |
+
|
176 |
+
gen negative_engagement=0 if treat==1
|
177 |
+
replace negative_engagement=1 if response_type=="NEGENG"
|
178 |
+
label var negative_engagement "Negative, 0/1 if treated"
|
179 |
+
|
180 |
+
gen left_message=0 if treat==1
|
181 |
+
replace left_message=1 if response_type=="LEFTMSG"
|
182 |
+
label var left_message "Left Msg, 0/1 if treated"
|
183 |
+
|
184 |
+
|
185 |
+
sort account date
|
186 |
+
|
187 |
+
|
188 |
+
|
189 |
+
//Available data is through 2018Q1. That means drop exec dates on or after 17/04
|
190 |
+
|
191 |
+
drop if exec_date==1704 | exec_date==1707 | exec_date==1710 | exec_date==1801
|
192 |
+
|
193 |
+
//Prepare exec date data
|
194 |
+
|
195 |
+
tostring exec_date, force replace
|
196 |
+
gen exec_year = substr(exec_date, 1, 2)
|
197 |
+
gen exec_month = substr(exec_date, 3, 2)
|
198 |
+
gen exec_day = 1
|
199 |
+
|
200 |
+
destring exec_year, force replace
|
201 |
+
destring exec_month, force replace
|
202 |
+
|
203 |
+
replace exec_year=exec_year+2000
|
204 |
+
|
205 |
+
gen edate = mdy(exec_month, exec_day, exec_year)
|
206 |
+
|
207 |
+
format edate %td
|
208 |
+
|
209 |
+
gen e_year=year(edate)
|
210 |
+
gen e_month=month(edate)
|
211 |
+
|
212 |
+
//****** THESE VARIABLES ESTABLISH WHEN CALLS ARE MADE RELATIVE TO THE LAST GIFT FOR TREATMENT PEOPLE ONLY
|
213 |
+
|
214 |
+
gen months_to_exec_from_gift_date=.
|
215 |
+
replace months_to_exec_from_gift_date=(edate-date_gift)/30.25 if treat==1
|
216 |
+
|
217 |
+
gen months_to_call_from_edate=.
|
218 |
+
replace months_to_call_from_edate=(date_call-edate)/30.25 if treat==1
|
219 |
+
|
220 |
+
gen months_to_call_from_gift=.
|
221 |
+
replace months_to_call_from_gift=(date_call-date_gift)/30.25 if treat==1
|
222 |
+
|
223 |
+
drop technique // also available in other dataset
|
224 |
+
|
225 |
+
ren date date_initial_gift //only for treatment people
|
226 |
+
|
227 |
+
save callog_temp, replace
|
228 |
+
|
229 |
+
/////////////////////////////////////////////////////////
|
230 |
+
//// /////
|
231 |
+
//// PREPARE DEMOGRAPHIPCS /////
|
232 |
+
//// /////
|
233 |
+
/////////////////////////////////////////////////////////
|
234 |
+
|
235 |
+
use "demographics", clear
|
236 |
+
|
237 |
+
*ren accountid account_id
|
238 |
+
sort account
|
239 |
+
|
240 |
+
replace account=upper(account) //standardize account ID
|
241 |
+
|
242 |
+
drop if account=="NULL" //drop those without an account
|
243 |
+
duplicates drop // we have 0.3% of data that is duplicate account IDs and information
|
244 |
+
|
245 |
+
gen demo_dont_contact=0
|
246 |
+
replace demo_dont_contact=1 if donotphone=="X" | donotthank=="X"
|
247 |
+
|
248 |
+
gen female=.
|
249 |
+
replace female=0 if gender=="M"
|
250 |
+
replace female=1 if gender=="F"
|
251 |
+
|
252 |
+
|
253 |
+
|
254 |
+
//Split into 3 groups
|
255 |
+
gen age_at_gift=""
|
256 |
+
replace age_at_gift="18 to 44 years old" if agecode==1 | agecode==2 | agecode==3
|
257 |
+
replace age_at_gift="45 to 64 years old" if agecode==4 | agecode==5
|
258 |
+
replace age_at_gift="65+ years old" if agecode==6 | agecode==7
|
259 |
+
|
260 |
+
//Split into 4 groups
|
261 |
+
gen income=""
|
262 |
+
replace income="Below $34,000" if hhincomecode=="A" | hhincomecode=="B" | hhincomecode=="C"
|
263 |
+
replace income="$35,000-$$99,999" if hhincomecode=="D" | hhincomecode=="E" | hhincomecode=="F"
|
264 |
+
replace income="$100,000-$174,999" if hhincomecode=="G" | hhincomecode=="H" | hhincomecode=="I"
|
265 |
+
replace income="$175,000+" if hhincomecode=="J" | hhincomecode=="K" | hhincomecode=="L"
|
266 |
+
replace income="" if hhincomecode=="U"
|
267 |
+
|
268 |
+
//Split into 3 groups
|
269 |
+
gen lorgroup=""
|
270 |
+
replace lorgroup="5 years or less" if lor==2 | lor==3 | lor==4
|
271 |
+
replace lorgroup="6-15 years" if lor==5 | lor==6
|
272 |
+
replace lorgroup="16+ years" if lor==7 | lor==8
|
273 |
+
|
274 |
+
//Add indicators for missing data
|
275 |
+
gen age_income_missing=0
|
276 |
+
replace age_income_missing=1 if agecode==.
|
277 |
+
|
278 |
+
gen female_missing=0
|
279 |
+
replace female_missing=1 if female==.
|
280 |
+
|
281 |
+
global var demographics female age_at_gift income lorgroup age_income_missing
|
282 |
+
|
283 |
+
save demographics_temp, replace
|
284 |
+
|
285 |
+
/////////////////////////////////////////////////////////
|
286 |
+
//// /////
|
287 |
+
//// PREPARE TREATMENTS /////
|
288 |
+
//// /////
|
289 |
+
/////////////////////////////////////////////////////////
|
290 |
+
|
291 |
+
//Experiment 3 treatments are exec-date 1610.
|
292 |
+
|
293 |
+
use "treatments", clear
|
294 |
+
|
295 |
+
replace account=upper(account) //standardize account ID
|
296 |
+
|
297 |
+
duplicates drop //1 ID is a duplicate
|
298 |
+
|
299 |
+
save treatments_temp, replace
|
300 |
+
|
301 |
+
|
302 |
+
/////////////////////////////////////////////////////////
|
303 |
+
//// /////
|
304 |
+
//// MERGE DATASETS /////
|
305 |
+
//// /////
|
306 |
+
/////////////////////////////////////////////////////////
|
307 |
+
|
308 |
+
|
309 |
+
|
310 |
+
use "transaction_temp", clear
|
311 |
+
|
312 |
+
//-----------------------------------------
|
313 |
+
// Merge demographics
|
314 |
+
//-----------------------------------------
|
315 |
+
|
316 |
+
merge m:1 account_id using "demographics_temp.dta"
|
317 |
+
|
318 |
+
drop _m
|
319 |
+
|
320 |
+
//-----------------------------------------
|
321 |
+
// Merge the call log and transaction log
|
322 |
+
//-----------------------------------------
|
323 |
+
|
324 |
+
merge m:1 account_id using "callog_temp.dta"
|
325 |
+
|
326 |
+
|
327 |
+
gen in_experiment=0
|
328 |
+
replace in_experiment=1 if _m==3
|
329 |
+
|
330 |
+
keep if _m==3 //these are account numbers that could be matched
|
331 |
+
|
332 |
+
drop _m
|
333 |
+
|
334 |
+
replace date_initial_gift=. if date_initial_gift==td(1jan1900) | treat==0
|
335 |
+
|
336 |
+
//-----------------------------------------
|
337 |
+
// Merge in the treatments
|
338 |
+
//-----------------------------------------
|
339 |
+
|
340 |
+
merge m:1 account_id using "treatments_temp.dta"
|
341 |
+
drop if _merge==2
|
342 |
+
|
343 |
+
//-----------------------------------------------
|
344 |
+
// Drop big donors
|
345 |
+
//-----------------------------------------------
|
346 |
+
|
347 |
+
drop if big_donor>=1
|
348 |
+
|
349 |
+
//-----------------------------------------------
|
350 |
+
//Generate 365.25 days past exec_date
|
351 |
+
//This tags all transactions according to where they fall in the timeline
|
352 |
+
//-----------------------------------------------
|
353 |
+
|
354 |
+
gen timeline=""
|
355 |
+
replace timeline="a_existing_donor" if date<edate-365.25
|
356 |
+
replace timeline="b_year before" if date<=edate & date>edate-365.25
|
357 |
+
replace timeline="c_year after" if date>=edate & date<edate+(365.25)
|
358 |
+
replace timeline="d_two years after" if date>=edate+365.25 & date<edate+365.25+365.25
|
359 |
+
replace timeline="e_three years after" if date>=edate+365.25+365.25 & date<edate+365.25+365.25+365.25
|
360 |
+
replace timeline="f_four years after" if date>=edate+365.25+365.25+365.25 & date<edate+365.25+365.25+365.25+365.25
|
361 |
+
replace timeline="g_five years after" if date>=edate+365.25+365.25+365.25+365.25 & date<edate+365.25+365.25+365.25+365.25+365.25
|
362 |
+
replace timeline="h_six+ years after" if date>=edate+365.25+365.25+365.25+365.25+365.25
|
363 |
+
|
364 |
+
|
365 |
+
|
366 |
+
gen sustaining_donors=0
|
367 |
+
replace sustaining_donors=1 if gift_kind==2 & timeline=="b_year before"
|
368 |
+
bysort account: egen sustaining_donors_temp=max(sustaining_donors)
|
369 |
+
drop if sustaining_donors_temp>=1
|
370 |
+
|
371 |
+
|
372 |
+
//-----------------------------------------------
|
373 |
+
// Get the initial gifts
|
374 |
+
//-----------------------------------------------
|
375 |
+
|
376 |
+
gen difference=edate-date //difference between exec date and date
|
377 |
+
//positive if gift date earlier
|
378 |
+
//negative if gift date later
|
379 |
+
|
380 |
+
gen difference_months=difference/30.25
|
381 |
+
gen difference_months_round=round(difference_months,1)
|
382 |
+
|
383 |
+
gen var1=1
|
384 |
+
|
385 |
+
replace difference=. if difference<0 //don't count future gifts
|
386 |
+
|
387 |
+
bysort account: egen minimum_diff=min(difference) //get the gift closest to exec date
|
388 |
+
gen diff_months=minimum_diff/30.25
|
389 |
+
|
390 |
+
//*** This variable gives the months that pass from the last gift to exec date.
|
391 |
+
|
392 |
+
|
393 |
+
gen months_to_exec_date=round(diff_months, 1)
|
394 |
+
|
395 |
+
//Get the first and last dates in the file
|
396 |
+
|
397 |
+
by account (date), sort: gen firstdate = date[1]
|
398 |
+
by account (date), sort: gen lastdate = date[_N]
|
399 |
+
|
400 |
+
format firstdate %tdd_m_y
|
401 |
+
format lastdate %tdd_m_y
|
402 |
+
gen firstdate_year=year(firstdate)
|
403 |
+
gen firstdate_month=month(firstdate)
|
404 |
+
gen lastdate_year=year(lastdate)
|
405 |
+
gen lastdate_month=month(lastdate)
|
406 |
+
|
407 |
+
save "temp_data_exp1_exp3",replace
|
408 |
+
|
409 |
+
collapse (sum) payment_amount var1 (mean) pledge, by(timeline account_id station exec_date edate treat script response_type female age_at_gift lorgroup income female_missing age_income_missing months_to_exec_date months_to_call_from_edate months_to_exec_from_gift_date months_to_call_from_gift)
|
410 |
+
|
411 |
+
encode timeline, gen(t)
|
412 |
+
replace t=0 if t==.
|
413 |
+
|
414 |
+
drop timeline
|
415 |
+
|
416 |
+
//Reshape wide
|
417 |
+
reshape wide payment_amount var1 pledge, i(account_id) j(t)
|
418 |
+
|
419 |
+
//drop existing donors
|
420 |
+
drop if payment_amount1!=.
|
421 |
+
|
422 |
+
replace payment_amount2=0 if payment_amount2==.
|
423 |
+
replace payment_amount3=0 if payment_amount3==.
|
424 |
+
replace payment_amount4=0 if payment_amount4==. & edate<date("01/01/2016","MDY")
|
425 |
+
replace payment_amount5=0 if payment_amount5==. & edate<date("01/01/2015","MDY")
|
426 |
+
replace payment_amount6=0 if payment_amount6==. & edate<date("01/01/2014","MDY")
|
427 |
+
|
428 |
+
|
429 |
+
replace var12=0 if var12==.
|
430 |
+
replace var13=0 if var13==.
|
431 |
+
replace var14=0 if var14==. & edate<date("01/01/2016","MDY")
|
432 |
+
replace var15=0 if var15==. & edate<date("01/01/2015","MDY")
|
433 |
+
replace var16=0 if var16==. & edate<date("01/01/2014","MDY")
|
434 |
+
|
435 |
+
|
436 |
+
gen retention=payment_amount3/payment_amount2
|
437 |
+
gen retention2=(payment_amount4)/payment_amount2
|
438 |
+
gen retention3=(payment_amount5)/payment_amount2
|
439 |
+
|
440 |
+
gen renewing=0
|
441 |
+
replace renewing=1 if var13!=0 & var13!=.
|
442 |
+
|
443 |
+
gen age_x_treat=age_at_gift*treat
|
444 |
+
gen female_x_treat=female*treat
|
445 |
+
gen payment_pre_x_treat=payment_amount2*treat
|
446 |
+
gen var12_x_treat=var12*treat
|
447 |
+
gen income_x_treat=income*treat
|
448 |
+
|
449 |
+
encode station, gen(station_id)
|
450 |
+
encode exec_date, gen(edate_dummy)
|
451 |
+
|
452 |
+
bysort station_id: egen retention_mean=mean(retention)
|
453 |
+
|
454 |
+
//Generate engagement dummies
|
455 |
+
|
456 |
+
gen reached=0 if treat==1
|
457 |
+
replace reached=1 if response_type=="POSENG" | response_type=="NEGENG" | response_type=="REACHED" | response_type=="LEFTMSG"
|
458 |
+
label var reached "Reached, 0/1 if treated"
|
459 |
+
|
460 |
+
gen positive_engagement=0 if treat==1
|
461 |
+
replace positive_engagement=1 if response_type=="POSENG"
|
462 |
+
label var positive_engagement "Positive, 0/1 if treated"
|
463 |
+
|
464 |
+
gen neutral_engagement=0 if treat==1
|
465 |
+
replace neutral_engagement=1 if response_type=="REACHED"
|
466 |
+
label var neutral_engagement "Positive, 0/1 if treated"
|
467 |
+
|
468 |
+
gen negative_engagement=0 if treat==1
|
469 |
+
replace negative_engagement=1 if response_type=="NEGENG"
|
470 |
+
label var negative_engagement "Negative, 0/1 if treated"
|
471 |
+
|
472 |
+
gen left_message=0 if treat==1
|
473 |
+
replace left_message=1 if response_type=="LEFTMSG"
|
474 |
+
label var left_message "Left Msg, 0/1 if treated"
|
475 |
+
|
476 |
+
|
477 |
+
|
478 |
+
replace script=0 if script==. & treat!=. //script dummy stands for whether new script
|
479 |
+
gen treatment="control" if treat==0
|
480 |
+
replace treatment="call" if treat==1
|
481 |
+
replace treatment="new" if script==1
|
482 |
+
|
483 |
+
|
484 |
+
//The below creates script2 which is equal to 1 for new script and 0 otherwise
|
485 |
+
gen script2=script
|
486 |
+
replace script2=0 if treat==0
|
487 |
+
label var script2 "New Call Script"
|
488 |
+
|
489 |
+
|
490 |
+
tab income, gen(inc_display)
|
491 |
+
tab age_at_gift, gen(age_display)
|
492 |
+
tab lorgroup, gen(lor_display)
|
493 |
+
|
494 |
+
label var age_display1 "18 to 44 years old"
|
495 |
+
label var age_display2 "45 to 64 years old"
|
496 |
+
label var age_display3 "65+ years old"
|
497 |
+
label var inc_display4 "Income below $34,000"
|
498 |
+
label var inc_display3 "Income $35,000-$99,999"
|
499 |
+
label var inc_display1 "Income $100,000-$174,999"
|
500 |
+
label var inc_display2 "Income $175,000+"
|
501 |
+
label var lor_display1 "Residence length 5 years or less"
|
502 |
+
label var lor_display2 "Residence length 6-15 years"
|
503 |
+
label var lor_display3 "Residence length 16+ years"
|
504 |
+
|
505 |
+
egen ii=group(station_id edate_dummy)
|
506 |
+
xtset ii //station_id
|
507 |
+
|
508 |
+
label var payment_amount3 "Gift Amount"
|
509 |
+
label var payment_amount2 "Baseline Gift Amount"
|
510 |
+
label var var12 "Baseline Number of Gifts"
|
511 |
+
label var female "Female"
|
512 |
+
label var script "New Script Treatment"
|
513 |
+
label var treat "Call Treatment"
|
514 |
+
|
515 |
+
order account_id station
|
516 |
+
********
|
517 |
+
save reshaped_temp_data_exp1_exp3, replace
|
518 |
+
********
|
519 |
+
|
520 |
+
*final: 600,390, 71 - variables - verified
|
521 |
+
|
522 |
+
|
523 |
+
|
524 |
+
use "gift.dta",clear
|
525 |
+
|
526 |
+
|
527 |
+
ren treatment response_type
|
528 |
+
ren paymentamounttransactions payment_amount
|
529 |
+
gen var1=1 //counter for number of transactions
|
530 |
+
ren id account_id
|
531 |
+
|
532 |
+
gen treat="Control" if response_type=="Control"
|
533 |
+
replace treat="Call" if response_type=="Called: Contacted" | response_type=="Called: Not Contacted"
|
534 |
+
|
535 |
+
gen date=date(giftdatetransaction,"MD20Y")
|
536 |
+
gen edate=date("4/1/2013","MDY")
|
537 |
+
|
538 |
+
gen year=year(date)
|
539 |
+
gen month=month(date)
|
540 |
+
|
541 |
+
gen diff=edate-date //exec date minus date
|
542 |
+
|
543 |
+
|
544 |
+
//Create timeline just like in the previous data
|
545 |
+
|
546 |
+
gen timeline=""
|
547 |
+
replace timeline="a_existing_donor" if date<edate-365.25
|
548 |
+
replace timeline="b_year before" if date<=edate & date>edate-(365.25)
|
549 |
+
replace timeline="c_year after" if date>=edate & date<edate+(365.25)
|
550 |
+
replace timeline="two years after or more" if date>=edate+365.25+365.25
|
551 |
+
replace timeline="na" if timeline==""
|
552 |
+
|
553 |
+
save gift_exp2temp, replace
|
554 |
+
|
555 |
+
*erasing temp files
|
556 |
+
erase "transaction_temp.dta"
|
557 |
+
erase "callog_temp.dta"
|
558 |
+
erase "demographics_temp.dta"
|
559 |
+
erase "treatments_temp.dta"
|
18/replication_package/thank_you_replication/dofiles/01_dataprep/step2_creating_exp1_2_3_dataset.do
ADDED
@@ -0,0 +1,153 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
********************************************************************************
|
2 |
+
*Purpose: Creating final analysis files for exp1, exp2 and exp3 which are used to create:
|
3 |
+
*Figure 2 and Figure A2.
|
4 |
+
*Table 1, Table 2, Table A1, Table A2, Table A3, Table A4, Table A6
|
5 |
+
|
6 |
+
*Input Files: reshaped_temp_data_exp1_exp3.dta, gift_exp2temp.dta
|
7 |
+
*Output Files: exp1_analysis_data.dta, exp2_analysis_data, exp3_analysis_data
|
8 |
+
********************************************************************************
|
9 |
+
|
10 |
+
cd "$dir/data"
|
11 |
+
use reshaped_temp_data_exp1_exp3,clear
|
12 |
+
|
13 |
+
**DROP MISSING PAYMENT AMOUNT 2
|
14 |
+
drop if payment_amount2==0
|
15 |
+
|
16 |
+
|
17 |
+
*Experiment 1
|
18 |
+
*------------------------------
|
19 |
+
label var inc_display4 "\%Income below \\\$34,000"
|
20 |
+
label var inc_display3 "\%Income \\\$35,000-\\\$99,999"
|
21 |
+
label var inc_display1 "\%Income \\\$100,000-\\\$174,999"
|
22 |
+
label var inc_display2 "\%Income \\\$175,000+"
|
23 |
+
label var female_missing "Gender missing"
|
24 |
+
label var age_income_missing "Age/Income missing"
|
25 |
+
label var female "\%Female"
|
26 |
+
label var age_display1 "\%18 to 44 years old"
|
27 |
+
label var age_display2 "\%45 to 64 years old"
|
28 |
+
label var age_display3 "\%65+ years old"
|
29 |
+
|
30 |
+
*donated and conditional outcome
|
31 |
+
gen donated = 1 if var13>0 & !missing(var13)
|
32 |
+
replace donated=0 if var13==0
|
33 |
+
*generate gift conditional on donating
|
34 |
+
gen gift_cond = payment_amount3 if payment_amount3>0
|
35 |
+
label var donated "Donated"
|
36 |
+
label var gift_cond "Gift Amount Conditional"
|
37 |
+
|
38 |
+
*redo residence length:
|
39 |
+
replace lor_display2=1 if lor_display3==1
|
40 |
+
label var lor_display1 "\%Residence length$<$5 years"
|
41 |
+
label var lor_display2 "\%Residence length$>5$ years"
|
42 |
+
drop lor_display3
|
43 |
+
|
44 |
+
|
45 |
+
keep if exec_date!="1610" & exec_date!="1701"
|
46 |
+
|
47 |
+
|
48 |
+
*This drop is to reconcile the treatment imbalance, we take out three stations with no control observations
|
49 |
+
drop if station=="24" | station=="55" | station=="64" | station=="61"
|
50 |
+
|
51 |
+
|
52 |
+
save exp1_analysis_data, replace
|
53 |
+
|
54 |
+
|
55 |
+
|
56 |
+
*Experiment 2
|
57 |
+
*-----------------------
|
58 |
+
clear
|
59 |
+
use gift_exp2temp
|
60 |
+
collapse (sum) payment_amount var1, by(timeline account_id treat response_type)
|
61 |
+
encode timeline, gen(t)
|
62 |
+
drop timeline
|
63 |
+
|
64 |
+
reshape wide payment_amount var1, i(account_id treat) j(t)
|
65 |
+
|
66 |
+
drop if payment_amount1!=. //drop existing donors
|
67 |
+
|
68 |
+
replace payment_amount2=0 if payment_amount2==.
|
69 |
+
replace payment_amount3=0 if payment_amount3==.
|
70 |
+
replace payment_amount4=0 if payment_amount4==.
|
71 |
+
|
72 |
+
replace var12=0 if var12==.
|
73 |
+
replace var13=0 if var13==.
|
74 |
+
replace var14=0 if var14==.
|
75 |
+
|
76 |
+
gen retention=payment_amount3/payment_amount2
|
77 |
+
gen retention2=payment_amount4/payment_amount2
|
78 |
+
|
79 |
+
gen renewing=0
|
80 |
+
replace renewing=1 if var13!=0
|
81 |
+
|
82 |
+
*donated and conditional outcome
|
83 |
+
gen donated = 1 if var13>0 & !missing(var13)
|
84 |
+
replace donated=0 if var13==0
|
85 |
+
*generate gift conditional on donating
|
86 |
+
gen gift_cond = payment_amount3 if payment_amount3>0
|
87 |
+
label var donated "Donated"
|
88 |
+
label var gift_cond "Gift Amount Conditional"
|
89 |
+
|
90 |
+
rename treat treatment
|
91 |
+
encode treatment, gen(treat)
|
92 |
+
replace treat = 0 if treat==2
|
93 |
+
|
94 |
+
label var payment_amount2 "Baseline Gift Amount"
|
95 |
+
label var var12 "Baseline Number of Gifts"
|
96 |
+
label var renewing "\% Returning Donor"
|
97 |
+
save exp2_analysis_data, replace
|
98 |
+
|
99 |
+
|
100 |
+
*Experiment 3
|
101 |
+
clear
|
102 |
+
use reshaped_temp_data_exp1_exp3
|
103 |
+
|
104 |
+
**DROP MISSING PAYMENT AMOUNT 2
|
105 |
+
drop if payment_amount2==0
|
106 |
+
|
107 |
+
|
108 |
+
*redo residence length:
|
109 |
+
replace lor_display2=1 if lor_display3==1
|
110 |
+
label var lor_display1 "\%Residence length$<$5 years"
|
111 |
+
label var lor_display2 "\%Residence length$>5$ years"
|
112 |
+
drop lor_display3
|
113 |
+
|
114 |
+
*labels for the latex file
|
115 |
+
label var inc_display4 "\%Income below \\\$34,000"
|
116 |
+
label var inc_display3 "\%Income \\\$35,000-\\\$99,999"
|
117 |
+
label var inc_display1 "\%Income \\\$100,000-\\\$174,999"
|
118 |
+
label var inc_display2 "\%Income \\\$175,000+"
|
119 |
+
label var female_missing "Gender missing"
|
120 |
+
label var age_income_missing "Age/Income missing"
|
121 |
+
label var female "\%Female"
|
122 |
+
label var age_display1 "\%18 to 44 years old"
|
123 |
+
label var age_display2 "\%45 to 64 years old"
|
124 |
+
label var age_display3 "\%65+ years old"
|
125 |
+
|
126 |
+
|
127 |
+
*donated and conditional outcome
|
128 |
+
gen donated = 1 if var13>0 & !missing(var13)
|
129 |
+
replace donated=0 if var13==0
|
130 |
+
*generate gift conditional on donating
|
131 |
+
gen gift_cond = payment_amount3 if payment_amount3>0
|
132 |
+
label var donated "Donated"
|
133 |
+
label var gift_cond "Gift Amount Conditional"
|
134 |
+
|
135 |
+
*drop rules for Experiment 3, we only keep 1601
|
136 |
+
gen exp3 = 1 if edate==td(01oct2016)
|
137 |
+
replace exp3=0 if edate!=td(01oct2016)
|
138 |
+
|
139 |
+
|
140 |
+
keep if exp3==1
|
141 |
+
gen exp3_treat = 0 if script2==0 & treat==0
|
142 |
+
replace exp3_treat=1 if script2==0 & treat==1
|
143 |
+
replace exp3_treat=2 if script2==1 & treat==1
|
144 |
+
|
145 |
+
|
146 |
+
*This drop is to reconcile the treatment imbalance, we take out three stations
|
147 |
+
*with no control observations
|
148 |
+
drop if station=="24" | station=="55" | station=="64" | station=="61"
|
149 |
+
|
150 |
+
label define exp3_label 0 "Control" 1 "Old Script" 2 "New Script"
|
151 |
+
label values exp3_treat exp3_label
|
152 |
+
|
153 |
+
save exp3_analysis_data, replace
|
18/replication_package/thank_you_replication/dofiles/01_dataprep/step3_creating_charity_dataset.do
ADDED
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/********************************************************************************
|
2 |
+
* Purpose: This do file creates the dataset used for creation of
|
3 |
+
Figure A3, Figure A4, Figure A5, Table A5
|
4 |
+
|
5 |
+
*Input Files: charity.xlsx
|
6 |
+
*Output Files: charity.dta
|
7 |
+
********************************************************************************/
|
8 |
+
|
9 |
+
|
10 |
+
cd "$dir/data"
|
11 |
+
import excel "charity.xlsx", firstrow clear
|
12 |
+
|
13 |
+
//--------------------------------------------------------
|
14 |
+
*clean outcome variables
|
15 |
+
//--------------------------------------------------------
|
16 |
+
*public tv exp 1
|
17 |
+
rename Q12 exp1_percent
|
18 |
+
rename Q14 exp1_amount
|
19 |
+
*public tv with enhanced script exp3
|
20 |
+
rename Q17 exp3_percent
|
21 |
+
rename Q15 exp3_amount
|
22 |
+
|
23 |
+
*non profit
|
24 |
+
rename Q18 exp2_percent
|
25 |
+
rename Q30 exp2_amount
|
26 |
+
*confidence
|
27 |
+
rename Q20 confidence
|
28 |
+
|
29 |
+
*other variables
|
30 |
+
rename Q7 org_program
|
31 |
+
replace org_program="Other" if org_program=="Other:"
|
32 |
+
encode org_program, gen(org_type)
|
33 |
+
|
34 |
+
foreach var of varlist exp1_percent exp1_amount exp2_percent exp2_amount/*
|
35 |
+
*/ exp3_percent exp3_amount confidence {
|
36 |
+
replace `var'="." if `var'=="-99"
|
37 |
+
destring `var', replace
|
38 |
+
}
|
39 |
+
gen exp1_percentactual=28
|
40 |
+
gen exp1_amountactual=126.24
|
41 |
+
gen exp2_percentactual=31
|
42 |
+
gen exp2_amountactual=116.01
|
43 |
+
gen exp3_percentactual=27
|
44 |
+
gen exp3_amountactual=114.27
|
45 |
+
|
46 |
+
gen num_correct=0
|
47 |
+
foreach x of numlist 1/3 {
|
48 |
+
foreach var in amount percent {
|
49 |
+
label var exp`x'_`var' "Experiment `x' (`var')"
|
50 |
+
replace num_correct=num_correct+1 if exp`x'_`var'> (exp`x'_`var'actual-(0.05*exp`x'_`var'actual))/*
|
51 |
+
*/ & exp`x'_`var'<(exp`x'_`var'actual+(0.05*exp`x'_`var'actual))
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
count if !missing(exp1_percent) & !missing(exp1_amount)
|
56 |
+
local num_1_char=r(N)
|
57 |
+
count if !missing(exp2_percent) & !missing(exp2_amount)
|
58 |
+
local num_2_char=r(N)
|
59 |
+
count if !missing(exp3_percent) & !missing(exp3_amount)
|
60 |
+
local num_3_char=r(N)
|
61 |
+
|
62 |
+
|
63 |
+
//--------------------------------------------------------
|
64 |
+
*cleaning some more variables
|
65 |
+
//--------------------------------------------------------
|
66 |
+
|
67 |
+
label var confidence "Confidence"
|
68 |
+
label var num_correct "Number Correct"
|
69 |
+
|
70 |
+
gen exp_org=1 if Q10=="Less than 1 year"
|
71 |
+
gen exp_industry=1 if Q11=="Less than 1 year"
|
72 |
+
replace exp_org=2 if Q10=="1-5 years"
|
73 |
+
replace exp_industry=2 if Q11=="1-5 years"
|
74 |
+
replace exp_org=3 if Q10=="6 or more years"
|
75 |
+
replace exp_industry=3 if Q11=="6 or more years"
|
76 |
+
label define experience 1 ">1 year" 2 "1-5 years" 3 "6+ years"
|
77 |
+
label values exp_org experience
|
78 |
+
label values exp_industry experience
|
79 |
+
|
80 |
+
gen num_donations=1 if Q6=="100 to 999" | Q6=="Fewer than 100"
|
81 |
+
replace num_donations=2 if Q6=="1,000 to 9,999"
|
82 |
+
replace num_donations=3 if Q6=="10,000 to 99,999"
|
83 |
+
replace num_donations=4 if Q6=="100,000+"
|
84 |
+
|
85 |
+
gen does_calls = 1 if Q21=="Always" | Q21=="Often" | Q21=="Sometimes"
|
86 |
+
replace does_calls=0 if Q21=="Rarely" | Q21=="Never"
|
87 |
+
|
88 |
+
|
89 |
+
|
90 |
+
label var exp_org "Experience (organization)"
|
91 |
+
label var exp_industry "Experience (industry)"
|
92 |
+
label var does_calls "Does Calls"
|
93 |
+
label var num_donations "No. of Donations"
|
94 |
+
|
95 |
+
gen highexp_ind = 1 if exp_industry==3
|
96 |
+
replace highexp_ind=0 if exp_industry==1 | exp_industry==2
|
97 |
+
|
98 |
+
gen highexp_org=1 if exp_org==3
|
99 |
+
replace highexp_org=0 if exp_org==1 | exp_org==2
|
100 |
+
|
101 |
+
gen high_don=1 if num_donations==3 | num_donations==4
|
102 |
+
replace high_don=0 if num_donations==1 | num_donations==2
|
103 |
+
|
104 |
+
label var high_don "10k+ donations/year"
|
105 |
+
label var highexp_org "Experience 5+ years (org.)"
|
106 |
+
label var highexp_ind "Experience 5+ years (industry)"
|
107 |
+
|
108 |
+
save "charity.dta",replace
|
18/replication_package/thank_you_replication/dofiles/01_dataprep/step4_creating_uas_dataset.do
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/********************************************************************************
|
2 |
+
* Purpose: This do file creates the UAS dataset which is used for creation of
|
3 |
+
Figure A3 and Figure A4
|
4 |
+
|
5 |
+
*Input Files: uas166.dta, uas24.dta
|
6 |
+
*Output Files: uas_dataset.dta
|
7 |
+
********************************************************************************/
|
8 |
+
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
cd "$dir/data"
|
13 |
+
use uas166, clear
|
14 |
+
merge 1:1 uasid using uas24, keepusing(q453_ q454_)
|
15 |
+
drop _merge
|
16 |
+
gen donated_charity=1 if q454>=500 & !missing(q454)
|
17 |
+
replace donated_charity=0 if q453==5 | q454<500 & !missing(q454)
|
18 |
+
gen exp1_percentactual=28
|
19 |
+
gen exp1_amountactual=126.24
|
20 |
+
gen exp2_percentactual=31
|
21 |
+
gen exp2_amountactual=116.01
|
22 |
+
gen exp3_percentactual=27
|
23 |
+
gen exp3_amountactual=114.27
|
24 |
+
rename charity_q1cont exp1_percent
|
25 |
+
rename charity_q2cont exp3_percent
|
26 |
+
rename charity_q3cont exp2_percent
|
27 |
+
rename charity_q1_nocall exp1_amount
|
28 |
+
rename charity_q2_yescall exp3_amount
|
29 |
+
rename charity_q3_nocall exp2_amount
|
30 |
+
|
31 |
+
gen expall_percent=exp1_percent if !missing(exp1_percent)
|
32 |
+
replace expall_percent=exp2_percent if !missing(exp2_percent)
|
33 |
+
replace expall_percent=exp3_percent if !missing(exp3_percent)
|
34 |
+
|
35 |
+
count if !missing(exp1_percent) & !missing(exp1_amount)
|
36 |
+
local num_1_uas=r(N)
|
37 |
+
count if !missing(exp2_percent) & !missing(exp2_amount)
|
38 |
+
local num_2_uas=r(N)
|
39 |
+
count if !missing(exp3_percent) & !missing(exp3_amount)
|
40 |
+
local num_3_uas=r(N)
|
41 |
+
|
42 |
+
gen num_correct=0
|
43 |
+
|
44 |
+
save "uas_dataset",replace
|
18/replication_package/thank_you_replication/dofiles/01_dataprep/step5_creating_forecast_sample_figure2.do
ADDED
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/********************************************************************************
|
2 |
+
* Purpose: This do file creates the dataset to be used for creation of Figure 2
|
3 |
+
|
4 |
+
*Input Files: charity.dta, exp1_analysis_data.dta, exp2_analysis_data, exp3_analysis_data,
|
5 |
+
uas_dataset.dta
|
6 |
+
*Temp Files: charity_temp.dta
|
7 |
+
*Output Files: forecast_charity.dta
|
8 |
+
********************************************************************************/
|
9 |
+
|
10 |
+
|
11 |
+
cd "$dir/data"
|
12 |
+
|
13 |
+
***creating charity_temp
|
14 |
+
|
15 |
+
use "charity",clear
|
16 |
+
|
17 |
+
*proportion correct
|
18 |
+
foreach x of numlist 1/3 {
|
19 |
+
summarize exp`x'_percentactual
|
20 |
+
gen exp`x'_percentcorr=1 if exp`x'_percent<=(r(mean) + .05*r(mean)) & exp`x'_percent>=(r(mean) - .05*r(mean))
|
21 |
+
summarize exp`x'_amountactual
|
22 |
+
gen exp`x'_amountcorr=1 if exp`x'_amount<=(r(mean) + .05*r(mean)) & exp`x'_amount>=(r(mean) - .05*r(mean))
|
23 |
+
replace exp`x'_percentcorr=0 if !missing(exp`x'_percent) & missing(exp`x'_percentcorr)
|
24 |
+
replace exp`x'_amountcorr=0 if !missing(exp`x'_amount) & missing(exp`x'_amountcorr)
|
25 |
+
}
|
26 |
+
//--------------------------------------------------------
|
27 |
+
*Charity predicted vs actual gaps
|
28 |
+
//--------------------------------------------------------
|
29 |
+
|
30 |
+
foreach x of numlist 1/3 {
|
31 |
+
gen exp`x'_gapamount = exp`x'_amount - exp`x'_amountactual
|
32 |
+
gen exp`x'_gappercent= exp`x'_percent - exp`x'_percentactual
|
33 |
+
}
|
34 |
+
egen gap_amount= rowmean(exp*_gapamount)
|
35 |
+
egen gap_percent = rowmean(exp*_gappercent)
|
36 |
+
|
37 |
+
label var gap_amount "Overprediction (amount)"
|
38 |
+
label var gap_percent "Overprediction (percent)"
|
39 |
+
|
40 |
+
|
41 |
+
|
42 |
+
collapse (mean) exp1_* exp2_* exp3_* confidence (semean) exp1_percent_se=exp1_percent/*
|
43 |
+
*/ exp1_amount_se=exp1_amount exp2_percent_se=exp2_percent exp3_percent_se=exp3_percent/*
|
44 |
+
*/ exp2_amount_se=exp2_amount exp3_amount_se=exp3_amount
|
45 |
+
|
46 |
+
foreach x of numlist 1/3 {
|
47 |
+
foreach var in amount percent percent_se amount_se {
|
48 |
+
rename exp`x'_`var' `var'`x'
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
|
53 |
+
gen x=1
|
54 |
+
reshape long amount percent percent_se amount_se, i(x) j(exp)
|
55 |
+
|
56 |
+
gen hi_amount=amount+(amount_se*2)
|
57 |
+
gen hi_percent=percent+(percent_se*2)
|
58 |
+
gen lo_amount=amount-(amount_se*2)
|
59 |
+
gen lo_percent=percent-(percent_se*2)
|
60 |
+
gen proj=2
|
61 |
+
|
62 |
+
|
63 |
+
save "charity_temp.dta", replace
|
64 |
+
|
65 |
+
***adding in actual values
|
66 |
+
|
67 |
+
*--------------------------------------------------------
|
68 |
+
*Experimental Sample
|
69 |
+
*--------------------------------------------------------
|
70 |
+
foreach x of numlist 1/3 {
|
71 |
+
use exp`x'_analysis_data, clear
|
72 |
+
gen amount=payment_amount3 if renewing==1
|
73 |
+
|
74 |
+
*grab obsv for table
|
75 |
+
count if !missing(amount)
|
76 |
+
local num_`x'_exp=r(N)
|
77 |
+
|
78 |
+
collapse (mean) amount renewing (semean) percent_se=renewing/*
|
79 |
+
*/ amount_se=payment_amount2, by(treat)
|
80 |
+
rename renewing percent
|
81 |
+
replace percent=100*percent
|
82 |
+
replace percent_se=100*percent_se
|
83 |
+
gen hi_amount=amount+(amount_se*2)
|
84 |
+
gen hi_percent=percent+(percent_se*2)
|
85 |
+
gen lo_amount=amount-(amount_se*2)
|
86 |
+
gen lo_percent=percent-(percent_se*2)
|
87 |
+
gen proj=1 if treat==0
|
88 |
+
replace proj=1.5 if treat==1
|
89 |
+
gen exp=`x'
|
90 |
+
append using charity_temp
|
91 |
+
save charity_temp, replace
|
92 |
+
}
|
93 |
+
|
94 |
+
|
95 |
+
|
96 |
+
*--------------------------------------------------------
|
97 |
+
*Adding to UAS Sample*
|
98 |
+
*--------------------------------------------------------
|
99 |
+
cd "$dir/data"
|
100 |
+
use uas_dataset, clear
|
101 |
+
|
102 |
+
*proportion correct guessing by experiment
|
103 |
+
foreach x of numlist 1/3 {
|
104 |
+
summarize exp`x'_percentactual
|
105 |
+
gen exp`x'_percentcorr=1 if exp`x'_percent<=(r(mean) + .05*r(mean)) & exp`x'_percent>=(r(mean) - .05*r(mean))
|
106 |
+
summarize exp`x'_amountactual
|
107 |
+
gen exp`x'_amountcorr=1 if exp`x'_amount<=(r(mean) + .05*r(mean)) & exp`x'_amount>=(r(mean) - .05*r(mean))
|
108 |
+
replace exp`x'_percentcorr=0 if !missing(exp`x'_percent) & missing(exp`x'_percentcorr)
|
109 |
+
replace exp`x'_amountcorr=0 if !missing(exp`x'_amount) & missing(exp`x'_amountcorr)
|
110 |
+
}
|
111 |
+
|
112 |
+
foreach x of numlist 1/3 {
|
113 |
+
label var exp`x'_percent "Experiment `x' (percent)"
|
114 |
+
label var exp`x'_amount "Experiment `x' (amount)"
|
115 |
+
replace num_correct=num_correct+1 if exp`x'_percent> (exp`x'_percentactual-(0.05*exp`x'_percentactual))/*
|
116 |
+
*/ & exp`x'_percent<(exp`x'_percentactual+(0.05*exp`x'_percentactual))
|
117 |
+
|
118 |
+
}
|
119 |
+
|
120 |
+
label var num_correct "Number Correct"
|
121 |
+
|
122 |
+
drop exp*actual
|
123 |
+
|
124 |
+
|
125 |
+
collapse (mean) exp1_* exp2_* exp3_* (semean) exp1_percent_se=exp1_percent/*
|
126 |
+
*/ exp2_percent_se=exp2_percent exp3_percent_se=exp3_percent exp1_amount_se=exp1_amount/*
|
127 |
+
*/ exp2_amount_se=exp2_amount exp3_amount_se=exp3_amount
|
128 |
+
|
129 |
+
foreach x of numlist 1/3 {
|
130 |
+
foreach var in percent percent_se amount amount_se{
|
131 |
+
rename exp`x'_`var' `var'`x'
|
132 |
+
}
|
133 |
+
}
|
134 |
+
|
135 |
+
gen x=1
|
136 |
+
reshape long percent percent_se amount amount_se, i(x) j(exp)
|
137 |
+
replace exp=1 if exp==4
|
138 |
+
replace exp=2 if exp==5
|
139 |
+
replace exp=3 if exp==6
|
140 |
+
|
141 |
+
gen hi_percent=percent+(percent_se*2)
|
142 |
+
gen lo_percent=percent-(percent_se*2)
|
143 |
+
gen hi_amount=amount+(amount_se*2)
|
144 |
+
gen lo_amount=amount-(amount_se*2)
|
145 |
+
|
146 |
+
gen proj=2.5
|
147 |
+
|
148 |
+
append using charity_temp
|
149 |
+
|
150 |
+
save "forecast_charity",replace
|
151 |
+
|
152 |
+
erase "$dir/data/charity_temp.dta"
|
18/replication_package/thank_you_replication/dofiles/01_dataprep/step6_creating_charity_round2.do
ADDED
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/********************************************************************************
|
2 |
+
* Purpose: This do file creates the charity dataset to be used for analysis of the
|
3 |
+
second round of surveys.
|
4 |
+
|
5 |
+
This dataset is used in the creation of Figure A6
|
6 |
+
|
7 |
+
*Input Files: spi2019_practitioner.xlsx, experiment_data.xlsx, charity_more_questions.csv
|
8 |
+
*Temp Files: spi_2019.dta actual_experiment_data.dta spi_mailinglist.dta charity_morequestions.dta
|
9 |
+
*Output Files: charity_round2.dta
|
10 |
+
********************************************************************************/
|
11 |
+
|
12 |
+
cd "$dir/data"
|
13 |
+
|
14 |
+
**cleaning SPI Practitioner data
|
15 |
+
|
16 |
+
import excel "spi2019_practitioner.xlsx", sheet("Sheet1") firstrow clear
|
17 |
+
gen version="spi2019"
|
18 |
+
rename door_1 volunteer_1
|
19 |
+
rename door_3 volunteer_2
|
20 |
+
rename door_2 volunteer_3
|
21 |
+
rename door_4 volunteer_4
|
22 |
+
rename door_confidence volunteer_confidence
|
23 |
+
foreach x in 1 2 3 confidence {
|
24 |
+
rename announcements_`x' door_`x'
|
25 |
+
rename callingin_`x' calling_`x'
|
26 |
+
}
|
27 |
+
|
28 |
+
gen do_door=1 if inlist(solicitation_activities,"1")
|
29 |
+
gen do_mail =1 if inlist(solicitation_activities,"2")
|
30 |
+
gen do_call=1 if inlist(solicitation_activities,"3")
|
31 |
+
gen do_match=1 if inlist(solicitation_activities,"4")
|
32 |
+
gen do_gift=1 if inlist(solicitation_activities,"5")
|
33 |
+
gen do_premium=1 if inlist(solicitation_activities,"6")
|
34 |
+
gen do_paid=1 if inlist(solicitation_activities,"7")
|
35 |
+
gen do_volunteer =1 if inlist(solicitation_activities,"8")
|
36 |
+
|
37 |
+
save "spi_2019.dta", replace
|
38 |
+
|
39 |
+
**saving actual experiment data
|
40 |
+
|
41 |
+
import excel "experiment_data.xlsx", firstrow clear
|
42 |
+
gen tempid=1
|
43 |
+
save "actual_experiment_data", replace
|
44 |
+
|
45 |
+
**saving SPI data from mailings
|
46 |
+
|
47 |
+
import delimited "spi_mailing_list.csv", varnames(1) clear
|
48 |
+
gen version="spi_mail"
|
49 |
+
save "spi_mailinglist.dta", replace
|
50 |
+
|
51 |
+
**saving Fundraising Professionals Survey
|
52 |
+
|
53 |
+
import delimited "charity_more_questions.csv", varnames(1) clear
|
54 |
+
save charity_morequestions, replace
|
55 |
+
|
56 |
+
//-------------------------
|
57 |
+
*forecast
|
58 |
+
//-------------------------
|
59 |
+
use charity_morequestions,clear
|
60 |
+
local today td(12march2020)
|
61 |
+
local future td(20march2020)
|
62 |
+
|
63 |
+
|
64 |
+
//-------------------------------------
|
65 |
+
*make charts
|
66 |
+
//--------------------------------------
|
67 |
+
gen version="main_run"
|
68 |
+
append using "spi_mailinglist.dta"
|
69 |
+
|
70 |
+
*renaming variables
|
71 |
+
rename q17_3 mail_1
|
72 |
+
rename q17_4 mail_2
|
73 |
+
rename q15_8 mail_3
|
74 |
+
rename q15_6 mail_4
|
75 |
+
rename q59_1 mail_confidence
|
76 |
+
rename q50 mail_read
|
77 |
+
|
78 |
+
rename q54_2 volunteer_1
|
79 |
+
rename q55_1 volunteer_2
|
80 |
+
rename v54 volunteer_3
|
81 |
+
rename q56_1 volunteer_4
|
82 |
+
rename q62_1 volunteer_confidence
|
83 |
+
rename q49 volunteer_read
|
84 |
+
|
85 |
+
rename q18_3 calling_1
|
86 |
+
rename q18_4 calling_2
|
87 |
+
rename q18_5 calling_3
|
88 |
+
rename q60_1 calling_confidence
|
89 |
+
rename q48 calling_read
|
90 |
+
|
91 |
+
rename q51_2 matching_1
|
92 |
+
rename q51_3 matching_2
|
93 |
+
rename q51_4 matching_3
|
94 |
+
rename q52_5 matching_4
|
95 |
+
rename q52_6 matching_5
|
96 |
+
rename q52_7 matching_6
|
97 |
+
rename q61_1 matching_confidence
|
98 |
+
rename q44 matching_read
|
99 |
+
|
100 |
+
rename q12_9 door_1
|
101 |
+
rename q14_3 door_2
|
102 |
+
rename q53_4 door_3
|
103 |
+
rename q58_1 door_confidence
|
104 |
+
rename q46 door_read
|
105 |
+
|
106 |
+
rename v76 agency_1
|
107 |
+
rename v77 agency_2
|
108 |
+
rename v78 agency_3
|
109 |
+
rename q63_1 agency_4
|
110 |
+
rename v80 agency_confidence
|
111 |
+
rename q47 agency_read
|
112 |
+
|
113 |
+
|
114 |
+
foreach var in mail volunteer calling matching door agency {
|
115 |
+
foreach x of numlist 1/6 {
|
116 |
+
capture destring `var'_`x', replace
|
117 |
+
}
|
118 |
+
destring `var'_confidence, replace
|
119 |
+
}
|
120 |
+
|
121 |
+
append using "spi_2019.dta"
|
122 |
+
|
123 |
+
|
124 |
+
replace do_door=1 if !missing(q67_7)
|
125 |
+
replace do_mail =1 if !missing(q67_8)
|
126 |
+
replace do_match=1 if !missing(q67_1)
|
127 |
+
replace do_gift=1 if !missing(q67_5)
|
128 |
+
replace do_premium=1 if !missing(q67_6)
|
129 |
+
replace do_paid=1 if !missing(q67_4)
|
130 |
+
replace do_volunteer =1 if !missing(q67_3)
|
131 |
+
gen do_info=1 if !missing(q67_9)
|
132 |
+
gen do_agency=1 if !missing(q67_12)
|
133 |
+
|
134 |
+
*load in actual values
|
135 |
+
gen tempid=1
|
136 |
+
merge m:1 tempid using "actual_experiment_data"
|
137 |
+
drop _merge tempid
|
138 |
+
save "charity_round2",replace
|
139 |
+
|
140 |
+
*erasing temp files
|
141 |
+
|
142 |
+
erase "spi_2019.dta"
|
143 |
+
erase "spi_mailinglist.dta"
|
144 |
+
erase "charity_morequestions.dta"
|
145 |
+
erase "actual_experiment_data.dta"
|
18/replication_package/thank_you_replication/dofiles/02_analysis/Figure1_giving_cumprob.do
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
********************************************************************************
|
2 |
+
*Purpose: This do file creates Figure 1
|
3 |
+
*Input Files: temp_data_exp1_exp3.dta
|
4 |
+
*Output Files: figure1_giving_cumprob.pdf
|
5 |
+
********************************************************************************
|
6 |
+
|
7 |
+
|
8 |
+
clear
|
9 |
+
cd "$dir/data"
|
10 |
+
|
11 |
+
use temp_data_exp1_exp3, clear
|
12 |
+
|
13 |
+
***cleaning dataset
|
14 |
+
|
15 |
+
keep if date>=td(01jul2011) & date<=td(31oct2017)
|
16 |
+
keep if exec_date!="1610" & exec_date!="1701"
|
17 |
+
drop if station=="24" | station=="55" | station=="64" | station=="61"
|
18 |
+
|
19 |
+
count if treat==1
|
20 |
+
local treat_group = 445641
|
21 |
+
count if treat==0
|
22 |
+
local control_group=55434
|
23 |
+
gen gift=1
|
24 |
+
gen monthyear = mofd(date)
|
25 |
+
format monthyear %tmMonCCYY
|
26 |
+
format date %td
|
27 |
+
gen weeks_since_edate=round((date - edate)/7)
|
28 |
+
|
29 |
+
|
30 |
+
cd "$dir/latex"
|
31 |
+
|
32 |
+
keep if weeks_since_edate>0
|
33 |
+
sort account_id weeks_since_edate
|
34 |
+
by account_id: gen dup=_n
|
35 |
+
drop if dup>1
|
36 |
+
|
37 |
+
collapse(sum) gift if weeks_since_edate<=260, by(weeks_since_edate treat)
|
38 |
+
tsset treat weeks_since_edate
|
39 |
+
sort treat weeks_since_edate
|
40 |
+
by treat: gen cum_gift_amount=sum(gift)
|
41 |
+
replace cum_gift_amount=cum_gift_amount/`treat_group' if treat==1
|
42 |
+
replace cum_gift_amount=cum_gift_amount/`control_group' if treat==0
|
43 |
+
|
44 |
+
***creating figure
|
45 |
+
|
46 |
+
twoway (line cum_gift_amount weeks_since_edate if treat==1 , lcolor(red) lwidth(med))/*
|
47 |
+
*/ (line cum_gift_amount weeks_since_edate if treat==0 , lpattern(shortdash) lcolor(blue) lwidth(med)),/*
|
48 |
+
*/ legend(order(1 "Treatment" 2 "Control")) ytitle("Cum. Prob. Donating") xlabel(0 (25) 260) xtitle("Weeks from Treatment")/*
|
49 |
+
*/ graphregion(color(white)) bgcolor(white)
|
50 |
+
graph export "figure1_giving_cumprob.pdf", as(pdf) font("Times New Roman") replace
|
18/replication_package/thank_you_replication/dofiles/02_analysis/Figure2_forecast_graph.do
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
********************************************************************************
|
2 |
+
*Purpose: This do file creates Figure 1
|
3 |
+
*Input Files: forecast_charity.dta
|
4 |
+
*Temp Files: block11.gph, block21.gph, block31.gph, block12.gph, block22.gph, block32.gph, figure2_forecast_graph.gph
|
5 |
+
*Output Files: figure2_forecast_graph.eps
|
6 |
+
********************************************************************************
|
7 |
+
|
8 |
+
cd "$dir/data"
|
9 |
+
use forecast_charity, clear
|
10 |
+
|
11 |
+
*Saving values
|
12 |
+
foreach x of numlist 1/3 {
|
13 |
+
summarize percent if proj==1.5 & exp==`x'
|
14 |
+
local exp`x'_perc=r(mean)
|
15 |
+
summarize amount if proj==1.5 & exp==`x'
|
16 |
+
local exp`x'_am=r(mean)
|
17 |
+
local lo_perc`x'=`exp`x'_perc' - 0.05*`exp`x'_perc'
|
18 |
+
local hi_perc`x'=`exp`x'_perc' + 0.05*`exp`x'_perc'
|
19 |
+
local lo_am`x'=`exp`x'_am' - 0.05*`exp`x'_am'
|
20 |
+
local hi_am`x'=`exp`x'_am' + 0.05*`exp`x'_am'
|
21 |
+
}
|
22 |
+
|
23 |
+
|
24 |
+
//-----------------------------------
|
25 |
+
* Forecast Graphs
|
26 |
+
//-----------------------------------
|
27 |
+
cd "$dir/latex"
|
28 |
+
foreach x of numlist 1/3 {
|
29 |
+
*percent graph
|
30 |
+
capture erase block`x'1.gph
|
31 |
+
twoway (bar percent proj if exp==`x' & proj==1, barwidth(0.40) fcolor(none)/*
|
32 |
+
*/ lcolor(black))(bar percent proj if exp==`x' & proj==1.5, barwidth(0.40) fcolor(emerald)/*
|
33 |
+
*/ lcolor(black))(bar percent proj if exp==`x' & proj==2, barwidth(0.40) fcolor(ltblue)/*
|
34 |
+
*/ lcolor(black)) (bar percent proj if exp==`x' & proj==2.5, barwidth(0.40) fcolor(blue)/*
|
35 |
+
*/ lcolor(black)) (rcap hi_percent lo_percent proj if exp==`x', lcolor(red)),/*
|
36 |
+
*/ xlabel(1 "Control" 1.5 "Treatment" 2 "Experts" 2.5 "Nonexperts", labsize(small))/*
|
37 |
+
*/ ytitle("Percentage Donating (%)") xtitle("") ysca(axis(1) r(0 55)) ylab(0(20)55, nogrid) /*
|
38 |
+
*/ graphregion(color(white)) legend(off) saving(block`x'1.gph,replace) title("Experiment `x': % Donating", size(small))
|
39 |
+
|
40 |
+
*amount graph
|
41 |
+
capture erase block`x'2.gph
|
42 |
+
twoway (bar amount proj if exp==`x' & proj==1, barwidth(0.40) fcolor(none)/*
|
43 |
+
*/ lcolor(black)) (bar amount proj if exp==`x' & proj==1.5, barwidth(0.40) fcolor(emerald)/*
|
44 |
+
*/ lcolor(black)) (bar amount proj if exp==`x' & proj==2, barwidth(0.40) fcolor(ltblue)/*
|
45 |
+
*/ lcolor(black)) (bar amount proj if exp==`x' & proj==2.5, barwidth(0.40) fcolor(blue)/*
|
46 |
+
*/ lcolor(black)) (rcap hi_amount lo_amount proj if exp==`x', lcolor(red)),/*
|
47 |
+
*/ xlabel(1 "Control" 1.5 "Treatment" 2 "Experts" 2.5 "Nonexperts", labsize(small))/*
|
48 |
+
*/ ysca(axis(1) r(0 175)) ylab(0(40)175, nogrid) ytitle("Gift amount ($)") xtitle("") /*
|
49 |
+
*/ title("Experiment `x': Gift Amount", size(small)) graphregion(color(white)) legend(off) saving(block`x'2.gph,replace)
|
50 |
+
}
|
51 |
+
|
52 |
+
|
53 |
+
capture erase forecast_graph.gph
|
54 |
+
graph combine block11.gph block12.gph/*
|
55 |
+
*/ block21.gph block22.gph block31.gph block32.gph, rows(3) cols(2) graphregion(color(white))/*
|
56 |
+
*/ saving(figure2_forecast_graph.gph, replace) ysize(7)
|
57 |
+
graph export figure2_forecast_graph.eps, as(eps) preview(on) replace
|
58 |
+
|
59 |
+
**erasing temp files
|
60 |
+
|
61 |
+
foreach x of numlist 1/3 {
|
62 |
+
capture erase block`x'1.gph
|
63 |
+
capture erase block`x'2.gph
|
64 |
+
|
65 |
+
}
|
66 |
+
|
67 |
+
capture erase figure2_forecast_graph.gph
|
18/replication_package/thank_you_replication/dofiles/02_analysis/Figure3_obs_pred_don_rates.do
ADDED
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
********************************************************************************
|
2 |
+
*Purpose: This do file creates Figure 3
|
3 |
+
*Input Files: charity_round2.dta
|
4 |
+
*Output Files: figure3_obs_pred_don_rates.pdf
|
5 |
+
********************************************************************************
|
6 |
+
|
7 |
+
|
8 |
+
cd "$dir/data"
|
9 |
+
use "charity_round2", clear
|
10 |
+
|
11 |
+
*creating globals
|
12 |
+
|
13 |
+
global donation_rates mail_1 mail_2 door_1 door_2 door_3 matching_1 matching_2 matching_3 volunteer_1 volunteer_2 agency_1 agency_3
|
14 |
+
global cond_amounts mail_3 mail_4 volunteer_3 volunteer_4 calling_1 calling_2 calling_3 matching_4 matching_5 matching_6 agency_2 agency_4
|
15 |
+
|
16 |
+
*Generating Predicted and Observed Effects
|
17 |
+
|
18 |
+
foreach var of varlist $cond_amounts $donation_rates {
|
19 |
+
gen peffect_`var'=`var' - `var'_control
|
20 |
+
gen aeffect_`var'=`var'_actual - `var'_control
|
21 |
+
gen sepeffect_`var'=`var' - `var'_control
|
22 |
+
}
|
23 |
+
|
24 |
+
|
25 |
+
*gen se for actual obsv, donation rates
|
26 |
+
foreach var of varlist $donation_rates {
|
27 |
+
summarize `var'_actual
|
28 |
+
local success1=r(mean)/100
|
29 |
+
summarize `var'_control
|
30 |
+
local success2=r(mean)/100
|
31 |
+
di `success1'
|
32 |
+
di `success2'
|
33 |
+
di (`success1'*(1-`success1'))*(`success2'^2)
|
34 |
+
gen seaeffect_`var'=sqrt(((`success1'*(1-`success1'))/`var'_nactual) + ((`success2'*(1-`success2'))/`var'_ncontrol))
|
35 |
+
replace seaeffect_`var'=seaeffect_`var'*100
|
36 |
+
|
37 |
+
}
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
+
*gen se for actual obsv, cond amounts
|
42 |
+
foreach var of varlist $cond_amounts {
|
43 |
+
gen seaeffect_`var'=sqrt((`var'_seactual)^2 + (`var'_secontrol)^2)
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
foreach var of varlist $donation_rates $cond_amounts {
|
48 |
+
gen treatment_`var'=`var'_actual
|
49 |
+
}
|
50 |
+
|
51 |
+
|
52 |
+
collapse (mean) aeffect_* peffect_* seaeffect_* treatment_* (semean) sepeffect_*
|
53 |
+
|
54 |
+
|
55 |
+
local count=1
|
56 |
+
foreach var in $donation_rates $cond_amounts {
|
57 |
+
rename peffect_`var' peffect`count'
|
58 |
+
rename sepeffect_`var' sepeffect`count'
|
59 |
+
rename aeffect_`var' aeffect`count'
|
60 |
+
rename seaeffect_`var' seaeffect`count'
|
61 |
+
rename treatment_`var' treatment`count'
|
62 |
+
local count=`count'+1
|
63 |
+
}
|
64 |
+
|
65 |
+
*reshaping for graph
|
66 |
+
|
67 |
+
gen id=1
|
68 |
+
reshape long peffect aeffect sepeffect seaeffect treatment control forecast/*
|
69 |
+
*/ setreatment secontrol seforecast, j(experiment) i(id)
|
70 |
+
drop id
|
71 |
+
|
72 |
+
*generating CI
|
73 |
+
|
74 |
+
gen hi_p = peffect + 1.96*sepeffect
|
75 |
+
gen lo_p = peffect - 1.96*sepeffect
|
76 |
+
gen hi_a = aeffect + 1.96*seaeffect
|
77 |
+
gen lo_a = aeffect - 1.96*seaeffect
|
78 |
+
|
79 |
+
|
80 |
+
|
81 |
+
gen y=0
|
82 |
+
|
83 |
+
keep if experiment<=12 & experiment!=3 & experiment!=5 & experiment!=10 & experiment!=9
|
84 |
+
replace experiment=experiment-3 if experiment>=6 & experiment<=8
|
85 |
+
replace experiment=6 if experiment==4 & treatment==5
|
86 |
+
replace experiment=experiment-4 if experiment>=11
|
87 |
+
|
88 |
+
label define experiment4 1 "(Falk,2007) 1 Gift" 2 "(Falk,2007) 4 Gifts" /*
|
89 |
+
*/ 3 "(Karlan & List, 2007) 1:1 Match" 4 "(Karlan & List, 2007) 2:1 Match" 5 "(Karlan & List, 2007) 3:1 Match" 6 "(DellaVigna et al.,2012) Opt-out" 7 "(Kessler et al., 2019) Overall" 8 "(Kessler et al., 2019) Rich & Powerful"
|
90 |
+
|
91 |
+
|
92 |
+
label values experiment experiment4
|
93 |
+
|
94 |
+
twoway (scatter peffect experiment, msize(small) mfcolor(black) mlcolor(black) )/*
|
95 |
+
*/ (scatter aeffect experiment, msize(small) mfcolor(none) mlcolor(gray)) /*
|
96 |
+
*/ (rcap hi_p lo_p experiment, lcolor(black)) (rcap hi_a lo_a experiment, lcolor(gray)) (line y experiment, lpattern(dash)),/*
|
97 |
+
*/ ytitle("Change in % Donated") xtitle("") legend(order(1 "Predicted Effect" 2 "Observed Effect"))/*
|
98 |
+
*/ graphregion(color(white)) xlabel(#8,valuelabel labsize(vsmall) angle(25))
|
99 |
+
|
100 |
+
cd "$dir/latex"
|
101 |
+
graph export figure3_obs_pred_don_rates.pdf, replace
|
102 |
+
|
18/replication_package/thank_you_replication/dofiles/02_analysis/Table1_balance_table.do
ADDED
@@ -0,0 +1,322 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
********************************************************************************
|
2 |
+
*Purpose: This do file creates Table 1
|
3 |
+
*Input Files: exp1_analysis_data, exp2_analysis_data, exp3_analysis_data
|
4 |
+
*Output Files: table1_balance_table.tex
|
5 |
+
********************************************************************************
|
6 |
+
|
7 |
+
|
8 |
+
cd "$dir/data"
|
9 |
+
use exp1_analysis_data, clear
|
10 |
+
|
11 |
+
foreach var of varlist var12 payment_amount2 {
|
12 |
+
ranksum `var', by(treat) porder
|
13 |
+
*Mann Whitney doesn't save p-value, so have to calculate from z with 2 * normprob(-abs(r(z)))
|
14 |
+
local `var'_p = 2 * normprob(-abs(r(z)))
|
15 |
+
summarize `var' if treat==0
|
16 |
+
local `var'_cntrl_mean = r(mean)
|
17 |
+
local `var'_cntrl_se= (r(sd)/(sqrt(r(N))))
|
18 |
+
summarize `var' if treat==1
|
19 |
+
local `var'_treat_mean = r(mean)
|
20 |
+
local `var'_treat_se=(r(sd)/(sqrt(r(N))))
|
21 |
+
}
|
22 |
+
|
23 |
+
foreach var of varlist female age_display* inc_display* lor_display* female_missing age_income_missing {
|
24 |
+
tabulate `var' treat, chi2
|
25 |
+
local `var'_p = r(p)
|
26 |
+
summarize `var' if treat==0
|
27 |
+
local `var'_cntrl_mean = r(mean)*100
|
28 |
+
local `var'_cntrl_se= (r(sd)/(sqrt(r(N))))*100
|
29 |
+
summarize `var' if treat==1
|
30 |
+
local `var'_treat_mean = r(mean)*100
|
31 |
+
local `var'_treat_se=(r(sd)/(sqrt(r(N))))*100
|
32 |
+
}
|
33 |
+
|
34 |
+
foreach var of varlist var12 payment_amount2 female age_display* inc_display* lor_display* female_missing age_income_missing {
|
35 |
+
*add significance stars
|
36 |
+
if ``var'_p'>.01 {
|
37 |
+
local `var'_star=""
|
38 |
+
}
|
39 |
+
if ``var'_p' <= .1 & ``var'_p' > .05 {
|
40 |
+
local `var'_star="*"
|
41 |
+
}
|
42 |
+
if ``var'_p' <= .05 & ``var'_p' > .01 {
|
43 |
+
local `var'_star="**"
|
44 |
+
}
|
45 |
+
if ``var'_p' <= .01 {
|
46 |
+
local `var'_star="***"
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
label var left_message "\%Left Message"
|
51 |
+
label var positive_engagement "\%Positive Engagement"
|
52 |
+
label var negative_engagement "\%Negative Engagement"
|
53 |
+
label var neutral_engagement "\%Neutral Engagement"
|
54 |
+
|
55 |
+
foreach var of varlist reached left_message positive_engagement neutral_engagement negative_engagement {
|
56 |
+
summarize `var'
|
57 |
+
local `var'_treat_mean = r(mean)*100
|
58 |
+
local `var'_treat_se=(r(sd)/(sqrt(r(N))))*100
|
59 |
+
}
|
60 |
+
label var reached "\% Reached"
|
61 |
+
|
62 |
+
|
63 |
+
count if treat==1
|
64 |
+
local num_treat_mean = r(N)
|
65 |
+
gen num = r(N)
|
66 |
+
label var num "N"
|
67 |
+
count if treat==0
|
68 |
+
local num_cntrl_mean = r(N)
|
69 |
+
|
70 |
+
cd "$dir/latex"
|
71 |
+
file open fh using "table1_balance_table.tex", write replace
|
72 |
+
file write fh "\begin{subtable}[t]{\linewidth}" _n ///
|
73 |
+
"\centering" _n ///
|
74 |
+
"\vspace{0pt}" _n ///
|
75 |
+
"\caption{Experiment 1: Public Television Stations}" _n ///
|
76 |
+
"\begin{tabular}{l c c c}" _n ///
|
77 |
+
"& \multicolumn{1}{c}{Treatment} & \multicolumn{1}{c}{Control} & \multicolumn{1}{c}{p-value}\\" _n ///
|
78 |
+
"\hline" _n ///
|
79 |
+
"\hline" _n
|
80 |
+
|
81 |
+
|
82 |
+
foreach var of varlist payment_amount2 var12 female age_display* inc_display4/*
|
83 |
+
*/ inc_display3 inc_display1 inc_display2 {
|
84 |
+
|
85 |
+
|
86 |
+
|
87 |
+
|
88 |
+
file write fh "\hspace{4mm}"`"`: var label `var''"'" & " %4.2f (``var'_treat_mean') " & " %4.2f (``var'_cntrl_mean') " & " %4.2f (``var'_p') "``var'_star' \\" _n
|
89 |
+
file write fh " & (" %4.2f (``var'_treat_se') ") & (" %4.2f (``var'_cntrl_se') ") & \\" _n
|
90 |
+
|
91 |
+
}
|
92 |
+
|
93 |
+
foreach var of varlist reached left_message positive_engagement neutral_engagement negative_engagement num {
|
94 |
+
|
95 |
+
if `var'== num {
|
96 |
+
file write fh "\hline" _n
|
97 |
+
file write fh "\hspace{4mm}"`"`: var label `var''"'" & " %15.0fc (``var'_treat_mean') " & " %15.0fc (``var'_cntrl_mean') " & \\" _n
|
98 |
+
}
|
99 |
+
|
100 |
+
else{
|
101 |
+
file write fh "\hspace{4mm}"`"`: var label `var''"'" & " %4.2f (``var'_treat_mean') " & & \\" _n
|
102 |
+
file write fh " & (" %4.2f (``var'_treat_se') ") & & \\" _n
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
file write fh "\hline" _n ///
|
107 |
+
"\hline" _n ///
|
108 |
+
"\vspace{0pt}" _n
|
109 |
+
file write fh "\end{tabular}" _n
|
110 |
+
|
111 |
+
*Experiment 2
|
112 |
+
*-----------------------
|
113 |
+
clear
|
114 |
+
cd "$dir/data"
|
115 |
+
use exp2_analysis_data, replace
|
116 |
+
|
117 |
+
|
118 |
+
foreach var of varlist payment_amount2 var12 {
|
119 |
+
ranksum `var', by(treat) porder
|
120 |
+
local `var'_p = 2 * normprob(-abs(r(z)))
|
121 |
+
summarize `var' if treat==0
|
122 |
+
local `var'_cntrl_mean = r(mean)
|
123 |
+
local `var'_cntrl_se= (r(sd)/(sqrt(r(N))))
|
124 |
+
summarize `var' if treat==1
|
125 |
+
local `var'_treat_mean = r(mean)
|
126 |
+
local `var'_treat_se=(r(sd)/(sqrt(r(N))))
|
127 |
+
}
|
128 |
+
|
129 |
+
foreach var of varlist renewing {
|
130 |
+
tabulate `var' treat, chi2
|
131 |
+
local `var'_p = r(p)
|
132 |
+
summarize `var' if treat==0
|
133 |
+
local `var'_cntrl_mean = r(mean)*100
|
134 |
+
local `var'_cntrl_se= (r(sd)/(sqrt(r(N))))*100
|
135 |
+
summarize `var' if treat==1
|
136 |
+
local `var'_treat_mean = r(mean)*100
|
137 |
+
local `var'_treat_se=(r(sd)/(sqrt(r(N))))*100
|
138 |
+
}
|
139 |
+
|
140 |
+
foreach var of varlist var12 payment_amount2 renewing {
|
141 |
+
*add significance stars
|
142 |
+
if ``var'_p'>.1 {
|
143 |
+
local `var'_star=""
|
144 |
+
}
|
145 |
+
if ``var'_p' <= .1 & ``var'_p' > .05 {
|
146 |
+
local `var'_star="*"
|
147 |
+
}
|
148 |
+
if ``var'_p' <= .05 & ``var'_p' > .01 {
|
149 |
+
local `var'_star="**"
|
150 |
+
}
|
151 |
+
if ``var'_p' <= .01 {
|
152 |
+
local `var'_star="***"
|
153 |
+
}
|
154 |
+
}
|
155 |
+
|
156 |
+
count if treat==1
|
157 |
+
local num_treat_mean = r(N)
|
158 |
+
gen num = r(N)
|
159 |
+
label var num "N"
|
160 |
+
count if treat==0
|
161 |
+
local num_cntrl_mean = r(N)
|
162 |
+
|
163 |
+
gen reached = 1 if response_type == "Called: Contacted"
|
164 |
+
replace reached=0 if response_type=="Called: Not Contacted"
|
165 |
+
foreach var of varlist reached {
|
166 |
+
summarize `var'
|
167 |
+
local `var'_treat_mean = r(mean)*100
|
168 |
+
local `var'_treat_se=(r(sd)/(sqrt(r(N))))*100
|
169 |
+
}
|
170 |
+
label var reached "\% Reached"
|
171 |
+
|
172 |
+
file write fh "\caption{Experiment 2: National Non-Profit}" _n ///
|
173 |
+
"\vspace{0pt}" _n ///
|
174 |
+
"\begin{tabular}{l c c c}" _n ///
|
175 |
+
"& \multicolumn{1}{c}{Treatment} & \multicolumn{1}{c}{Control} & \multicolumn{1}{c}{p-value}\\" _n ///
|
176 |
+
"\hline" _n ///
|
177 |
+
"\hline" _n
|
178 |
+
|
179 |
+
foreach var of varlist payment_amount2 var12 {
|
180 |
+
|
181 |
+
|
182 |
+
|
183 |
+
file write fh "\hspace{4mm}"`"`: var label `var''"'" & " %4.2f (``var'_treat_mean') " & " %4.2f (``var'_cntrl_mean') " & " %4.2f (``var'_p') "``var'_star' \\" _n
|
184 |
+
file write fh " & (" %4.2f (``var'_treat_se') ") & (" %4.2f (``var'_cntrl_se') ") & \\" _n
|
185 |
+
|
186 |
+
}
|
187 |
+
|
188 |
+
|
189 |
+
foreach var of varlist reached num{
|
190 |
+
|
191 |
+
if `var'== num {
|
192 |
+
file write fh "\hline" _n
|
193 |
+
file write fh "\hspace{4mm}"`"`: var label `var''"'" & " %15.0fc (``var'_treat_mean') " & " %15.0fc (``var'_cntrl_mean') " & \\" _n
|
194 |
+
}
|
195 |
+
|
196 |
+
else{
|
197 |
+
file write fh "\hspace{4mm}"`"`: var label `var''"'" & " %4.2f (``var'_treat_mean') " \\" _n
|
198 |
+
file write fh " & (" %4.2f (``var'_treat_se') ") \\" _n
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
|
203 |
+
file write fh "\hline" _n ///
|
204 |
+
"\hline" _n ///
|
205 |
+
"\vspace{0pt}" _n
|
206 |
+
file write fh "\end{tabular}" _n
|
207 |
+
file write fh "\end{subtable}" _n
|
208 |
+
file write fh "\end{table}" _n
|
209 |
+
file write fh "\pagebreak" _n
|
210 |
+
file write fh "\begin{table}[t]" _n
|
211 |
+
file write fh "\ContinuedFloat" _n
|
212 |
+
file write fh "\caption{Balance Table, cont.}" _n
|
213 |
+
file write fh "\begin{subtable}[t]{\linewidth}" _n
|
214 |
+
|
215 |
+
*Experiment 3
|
216 |
+
clear
|
217 |
+
cd "$dir/data"
|
218 |
+
use exp3_analysis_data, replace
|
219 |
+
|
220 |
+
file write fh "\caption{Experiment 3: Public Television, New Script}" _n ///
|
221 |
+
"\vspace{0pt}" _n ///
|
222 |
+
"\begin{tabular}{l c c c c}" _n ///
|
223 |
+
"& \multicolumn{1}{c}{New Script} & \multicolumn{1}{c}{Original Script} & \multicolumn{1}{c}{Control} & \multicolumn{1}{c}{p-value}\\" _n ///
|
224 |
+
"\hline" _n ///
|
225 |
+
"\hline" _n
|
226 |
+
|
227 |
+
|
228 |
+
foreach var of varlist var12 payment_amount2 female age_display* inc_display* /*
|
229 |
+
*/lor_display* female_missing age_income_missing{
|
230 |
+
oneway `var' exp3_treat
|
231 |
+
local `var'_p = string(Ftail(r(df_m), r(df_r), r(F)), "%9.2f")
|
232 |
+
|
233 |
+
if `var'==var12 | `var'==payment_amount2 {
|
234 |
+
local scalar=1
|
235 |
+
}
|
236 |
+
else {
|
237 |
+
local scalar=100
|
238 |
+
}
|
239 |
+
summarize `var' if exp3_treat==0
|
240 |
+
local `var'_cntrl_mean = r(mean)*`scalar'
|
241 |
+
local `var'_cntrl_se= (r(sd)/(sqrt(r(N))))*`scalar'
|
242 |
+
summarize `var' if exp3_treat==1
|
243 |
+
local `var'_treat1_mean = r(mean)*`scalar'
|
244 |
+
local `var'_treat1_se=(r(sd)/(sqrt(r(N))))*`scalar'
|
245 |
+
summarize `var' if exp3_treat==2
|
246 |
+
local `var'_treat2_mean = r(mean)*`scalar'
|
247 |
+
local `var'_treat2_se=(r(sd)/(sqrt(r(N))))*`scalar'
|
248 |
+
|
249 |
+
*add significance stars
|
250 |
+
if ``var'_p'>.1 {
|
251 |
+
local `var'_star=""
|
252 |
+
}
|
253 |
+
if ``var'_p' <= .1 & ``var'_p' > .05 {
|
254 |
+
local `var'_star="*"
|
255 |
+
}
|
256 |
+
if ``var'_p' <= .05 & ``var'_p' > .01 {
|
257 |
+
local `var'_star="**"
|
258 |
+
}
|
259 |
+
if ``var'_p' <= .01 {
|
260 |
+
local `var'_star="***"
|
261 |
+
}
|
262 |
+
}
|
263 |
+
|
264 |
+
count if exp3_treat==1
|
265 |
+
local num_treat1_mean = r(N)
|
266 |
+
gen num = r(N)
|
267 |
+
label var num "N"
|
268 |
+
count if treat==0
|
269 |
+
local num_cntrl_mean = r(N)
|
270 |
+
count if exp3_treat==2
|
271 |
+
local num_treat2_mean = r(N)
|
272 |
+
|
273 |
+
label var left_message "\%Left Message"
|
274 |
+
label var positive_engagement "\%Positive Engagement"
|
275 |
+
label var negative_engagement "\%Negative Engagement"
|
276 |
+
label var neutral_engagement "\%Neutral Engagement"
|
277 |
+
|
278 |
+
foreach var of varlist reached left_message positive_engagement neutral_engagement negative_engagement female age_display* inc_display* {
|
279 |
+
summarize `var' if exp3_treat==0
|
280 |
+
local `var'_cntrl_mean = r(mean)*100
|
281 |
+
local `var'_cntrl_se=(r(sd)/(sqrt(r(N))))*100
|
282 |
+
|
283 |
+
summarize `var' if exp3_treat==1
|
284 |
+
local `var'_treat1_mean = r(mean)*100
|
285 |
+
local `var'_treat1_se=(r(sd)/(sqrt(r(N))))*100
|
286 |
+
summarize `var' if exp3_treat==2
|
287 |
+
local `var'_treat2_mean = r(mean)*100
|
288 |
+
local `var'_treat2_se=(r(sd)/(sqrt(r(N))))*100
|
289 |
+
}
|
290 |
+
|
291 |
+
label var reached "\% Reached"
|
292 |
+
|
293 |
+
|
294 |
+
foreach var of varlist payment_amount2 var12 female age_display* inc_display4/*
|
295 |
+
*/ inc_display3 inc_display1 inc_display2 {
|
296 |
+
|
297 |
+
file write fh "\hspace{4mm}"`"`: var label `var''"'" & " %4.2f (``var'_treat2_mean') " & " %4.2f (``var'_treat1_mean') " & " %4.2f (``var'_cntrl_mean') " & " %4.2f (``var'_p') "``var'_star' \\" _n
|
298 |
+
file write fh " & (" %4.3f (``var'_treat2_se') ") & (" %4.2f (``var'_treat1_se') ") & (" %4.2f (``var'_cntrl_se') ") & \\" _n
|
299 |
+
|
300 |
+
}
|
301 |
+
|
302 |
+
foreach var of varlist reached left_message positive_engagement neutral_engagement negative_engagement num {
|
303 |
+
|
304 |
+
if `var'== num {
|
305 |
+
file write fh "\hline" _n
|
306 |
+
file write fh "\hspace{4mm}"`"`: var label `var''"'" & " %15.0fc (``var'_treat2_mean') " & " %15.0fc (``var'_treat1_mean') " & " %15.0fc (``var'_cntrl_mean') " & \\" _n
|
307 |
+
}
|
308 |
+
|
309 |
+
else {
|
310 |
+
file write fh "\hspace{4mm}"`"`: var label `var''"'" & " %4.2f (``var'_treat2_mean') " & " %4.2f (``var'_treat1_mean') " \\" _n
|
311 |
+
file write fh " & (" %4.2f (``var'_treat2_se') ") & (" %4.2f (``var'_treat1_se') ") \\" _n
|
312 |
+
}
|
313 |
+
}
|
314 |
+
|
315 |
+
|
316 |
+
|
317 |
+
file write fh "\hline" _n ///
|
318 |
+
"\hline" _n
|
319 |
+
file write fh "\end{tabular}" _n
|
320 |
+
file write fh "\end{subtable}" _n
|
321 |
+
|
322 |
+
file close fh
|
18/replication_package/thank_you_replication/dofiles/02_analysis/Table2_treatment_effects.do
ADDED
@@ -0,0 +1,235 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
********************************************************************************
|
2 |
+
*Purpose: This do file creates Table 2
|
3 |
+
*Input Files: exp1_analysis_data, exp2_analysis_data, exp3_analysis_data
|
4 |
+
*Output Files: table2_treatment_effects.tex
|
5 |
+
********************************************************************************
|
6 |
+
|
7 |
+
foreach experiment in 1 2 3 {
|
8 |
+
clear
|
9 |
+
cd "$dir/data"
|
10 |
+
use exp`experiment'_analysis_data
|
11 |
+
|
12 |
+
if `experiment'==1 {
|
13 |
+
cd "$dir/latex"
|
14 |
+
file open fh using "table2_treatment_effects.tex", write replace
|
15 |
+
|
16 |
+
file write fh "\begin{subtable}[t]{\linewidth}" _n ///
|
17 |
+
"\centering" _n ///
|
18 |
+
"\vspace{0pt}" _n ///
|
19 |
+
"\caption{Experiment 1: Public Television Stations}" _n ///
|
20 |
+
"\begin{tabular}{l c c c c}" _n ///
|
21 |
+
"& \multicolumn{1}{c}{Treatment} & \multicolumn{1}{c}{Control} & \multicolumn{1}{c}{p-value} & \multicolumn{1}{c}{}\\" _n ///
|
22 |
+
"\hline" _n ///
|
23 |
+
"\hline" _n
|
24 |
+
}
|
25 |
+
|
26 |
+
if `experiment'==2 {
|
27 |
+
file write fh "\caption{Experiment 2: National Non-Profit}" _n ///
|
28 |
+
"\vspace{0pt}" _n ///
|
29 |
+
"\begin{tabular}{l c c c c}" _n ///
|
30 |
+
"& \multicolumn{1}{c}{Treatment} & \multicolumn{1}{c}{Control} & \multicolumn{1}{c}{p-value} & \multicolumn{1}{c}{}\\" _n ///
|
31 |
+
"\hline" _n ///
|
32 |
+
"\hline" _n
|
33 |
+
}
|
34 |
+
|
35 |
+
if `experiment'==3 {
|
36 |
+
file write fh "\caption{Experiment 3: Public Television, New Script}" _n ///
|
37 |
+
"\vspace{0pt}" _n ///
|
38 |
+
"\begin{tabular}{l c c c c}" _n ///
|
39 |
+
"& \multicolumn{1}{c}{New Script} & \multicolumn{1}{c}{Original Script} & \multicolumn{1}{c}{Control} & \multicolumn{1}{c}{p-value}\\" _n ///
|
40 |
+
"\hline" _n ///
|
41 |
+
"\hline" _n
|
42 |
+
}
|
43 |
+
|
44 |
+
|
45 |
+
foreach var of varlist payment_amount3 var13 retention renewing {
|
46 |
+
|
47 |
+
if `experiment'==3 {
|
48 |
+
*Unconditional Gift, includes 0 for no renewers
|
49 |
+
oneway `var' exp3_treat
|
50 |
+
local `var'_p = string(Ftail(r(df_m), r(df_r), r(F)), "%9.2f")
|
51 |
+
summarize `var' if exp3_treat==0
|
52 |
+
|
53 |
+
if "`var'" =="renewing" | "`var'"== "retention" {
|
54 |
+
local `var'_cntrl_mean = r(mean) * 100
|
55 |
+
local `var'_cntrl_se= (r(sd)/(sqrt(r(N)))) * 100
|
56 |
+
summarize `var' if exp3_treat==1
|
57 |
+
local `var'_treat1_mean = r(mean) * 100
|
58 |
+
local `var'_treat1_se=(r(sd)/(sqrt(r(N)))) * 100
|
59 |
+
summarize `var' if exp3_treat==2
|
60 |
+
local `var'_treat2_mean = r(mean) * 100
|
61 |
+
local `var'_treat2_se=(r(sd)/(sqrt(r(N)))) * 100
|
62 |
+
}
|
63 |
+
else {
|
64 |
+
local `var'_cntrl_mean = r(mean)
|
65 |
+
local `var'_cntrl_se= (r(sd)/(sqrt(r(N))))
|
66 |
+
summarize `var' if exp3_treat==1
|
67 |
+
local `var'_treat1_mean = r(mean)
|
68 |
+
local `var'_treat1_se=(r(sd)/(sqrt(r(N))))
|
69 |
+
summarize `var' if exp3_treat==2
|
70 |
+
local `var'_treat2_mean = r(mean)
|
71 |
+
local `var'_treat2_se=(r(sd)/(sqrt(r(N))))
|
72 |
+
}
|
73 |
+
|
74 |
+
*Conditional on Donating aka renewing==1
|
75 |
+
oneway `var' exp3_treat if renewing==1
|
76 |
+
local `var'_p_con = string(Ftail(r(df_m), r(df_r), r(F)), "%9.2f")
|
77 |
+
summarize `var' if exp3_treat==0 & renewing==1
|
78 |
+
local `var'_cntrl_mean_con = r(mean)
|
79 |
+
local `var'_cntrl_se_con = (r(sd)/(sqrt(r(N))))
|
80 |
+
summarize `var' if exp3_treat==1 & renewing==1
|
81 |
+
local `var'_treat1_mean_con = r(mean)
|
82 |
+
local `var'_treat1_se_con=(r(sd)/(sqrt(r(N))))
|
83 |
+
summarize `var' if exp3_treat==2 & renewing==1
|
84 |
+
local `var'_treat2_mean_con = r(mean)
|
85 |
+
local `var'_treat2_se_con =(r(sd)/(sqrt(r(N))))
|
86 |
+
}
|
87 |
+
|
88 |
+
else {
|
89 |
+
*Unconditional Gift, includes 0 for no renewers
|
90 |
+
if "`var'" == "renewing" {
|
91 |
+
tabulate `var' treat, chi2
|
92 |
+
local `var'_p = r(p)
|
93 |
+
}
|
94 |
+
else {
|
95 |
+
ranksum `var', by(treat) porder
|
96 |
+
local `var'_p = 2 * normprob(-abs(r(z)))
|
97 |
+
}
|
98 |
+
|
99 |
+
if "`var'" =="renewing" | "`var'"== "retention" {
|
100 |
+
summarize `var' if treat==0
|
101 |
+
local `var'_cntrl_mean = r(mean) * 100
|
102 |
+
local `var'_cntrl_se= (r(sd)/(sqrt(r(N)))) * 100
|
103 |
+
summarize `var' if treat==1
|
104 |
+
local `var'_treat_mean = r(mean) * 100
|
105 |
+
local `var'_treat_se=(r(sd)/(sqrt(r(N)))) * 100
|
106 |
+
}
|
107 |
+
|
108 |
+
else {
|
109 |
+
summarize `var' if treat==0
|
110 |
+
local `var'_cntrl_mean = r(mean)
|
111 |
+
local `var'_cntrl_se= (r(sd)/(sqrt(r(N))))
|
112 |
+
summarize `var' if treat==1
|
113 |
+
local `var'_treat_mean = r(mean)
|
114 |
+
local `var'_treat_se=(r(sd)/(sqrt(r(N))))
|
115 |
+
}
|
116 |
+
|
117 |
+
*Conditional on Donating aka renewing==1
|
118 |
+
ranksum `var' if renewing==1, by(treat) porder
|
119 |
+
local `var'_p_con = 2 * normprob(-abs(r(z)))
|
120 |
+
summarize `var' if treat==0 & renewing==1
|
121 |
+
local `var'_cntrl_mean_con = r(mean)
|
122 |
+
local `var'_cntrl_se_con = (r(sd)/(sqrt(r(N))))
|
123 |
+
summarize `var' if treat==1 & renewing==1
|
124 |
+
local `var'_treat_mean_con = r(mean)
|
125 |
+
local `var'_treat_se_con =(r(sd)/(sqrt(r(N))))
|
126 |
+
}
|
127 |
+
|
128 |
+
|
129 |
+
*add significance stars
|
130 |
+
if ``var'_p'>.1 {
|
131 |
+
local `var'_star=""
|
132 |
+
}
|
133 |
+
if ``var'_p' <= .1 & ``var'_p' > .05 {
|
134 |
+
local `var'_star="*"
|
135 |
+
}
|
136 |
+
if ``var'_p' <= .05 & ``var'_p' > .01 {
|
137 |
+
local `var'_star="**"
|
138 |
+
}
|
139 |
+
if ``var'_p' <= .01 {
|
140 |
+
local `var'_star="***"
|
141 |
+
}
|
142 |
+
|
143 |
+
|
144 |
+
if ``var'_p_con'>.1 {
|
145 |
+
local `var'_star_con=""
|
146 |
+
}
|
147 |
+
if ``var'_p_con' <= .1 & ``var'_p' > .05 {
|
148 |
+
local `var'_star_con="*"
|
149 |
+
}
|
150 |
+
if ``var'_p_con' <= .05 & ``var'_p' > .01 {
|
151 |
+
local `var'_star_con="**"
|
152 |
+
}
|
153 |
+
if ``var'_p_con' <= .01 {
|
154 |
+
local `var'_star_con="***"
|
155 |
+
}
|
156 |
+
}
|
157 |
+
|
158 |
+
*num observations
|
159 |
+
if `experiment'==3 {
|
160 |
+
count if exp3_treat==1
|
161 |
+
local num_treat1_mean = r(N)
|
162 |
+
count if exp3_treat==2
|
163 |
+
local num_treat2_mean = r(N)
|
164 |
+
gen num = r(N)
|
165 |
+
label var num "N"
|
166 |
+
count if exp3_treat==0
|
167 |
+
local num_cntrl_mean = r(N)
|
168 |
+
}
|
169 |
+
else {
|
170 |
+
count if treat==1
|
171 |
+
local num_treat_mean = r(N)
|
172 |
+
gen num = r(N)
|
173 |
+
label var num "N"
|
174 |
+
count if treat==0
|
175 |
+
local num_cntrl_mean = r(N)
|
176 |
+
}
|
177 |
+
|
178 |
+
label var payment_amount3 "Amount Donated"
|
179 |
+
label var var13 "Number of Gifts"
|
180 |
+
label var retention "Retention rate"
|
181 |
+
label var renewing "Percent Donating"
|
182 |
+
|
183 |
+
if `experiment'==1 | `experiment'==2 {
|
184 |
+
foreach var of varlist renewing {
|
185 |
+
file write fh "\hspace{4mm}"`"`: var label `var''"'" & " %4.2f (``var'_treat_mean') " & " %4.2f (``var'_cntrl_mean') " & " %4.2f (``var'_p') "``var'_star' \\" _n
|
186 |
+
}
|
187 |
+
foreach var of varlist payment_amount3 var13 {
|
188 |
+
file write fh "\hspace{4mm}"`"`: var label `var''"'" & " %4.2f (``var'_treat_mean') " & " %4.2f (``var'_cntrl_mean') " & " %4.2f (``var'_p') "``var'_star' \\" _n
|
189 |
+
file write fh " & (" %4.2f (``var'_treat_se') ") & (" %4.2f (``var'_cntrl_se') ") & & \\" _n
|
190 |
+
}
|
191 |
+
|
192 |
+
foreach var of varlist payment_amount3 {
|
193 |
+
label var payment_amount3 "Amount \\$\mid\\$ Donated"
|
194 |
+
file write fh "\hspace{4mm}"`"`: var label `var''"'" & " %4.2f (``var'_treat_mean_con') " & " %4.2f (``var'_cntrl_mean_con') " & " %4.2f (``var'_p_con') "``var'_star_con' &\\" _n
|
195 |
+
file write fh " & (" %4.2f (``var'_treat_se_con') ") & (" %4.2f (``var'_cntrl_se_con') ") & & \\" _n
|
196 |
+
}
|
197 |
+
foreach var of varlist retention {
|
198 |
+
file write fh "\hspace{4mm}"`"`: var label `var''"'" & " %4.2f (``var'_treat_mean') " & " %4.2f (``var'_cntrl_mean') " & " %4.2f (``var'_p') "``var'_star' &\\" _n
|
199 |
+
}
|
200 |
+
file write fh "\hline" _n
|
201 |
+
file write fh "\hspace{4mm}"`"`: var label num'"'" & " %15.0fc (`num_treat_mean') " & " %15.0fc (`num_cntrl_mean') " & & \\"
|
202 |
+
file write fh "\hline \hline" _n
|
203 |
+
file write fh "\vspace{0pt}" _n
|
204 |
+
}
|
205 |
+
else {
|
206 |
+
|
207 |
+
foreach var of varlist renewing {
|
208 |
+
file write fh "\hspace{4mm}"`"`: var label `var''"'" & " %4.2f (``var'_treat2_mean') " & " %4.2f (``var'_treat1_mean') " & " %4.2f (``var'_cntrl_mean') " & " %4.2f (``var'_p') "``var'_star' \\" _n
|
209 |
+
}
|
210 |
+
foreach var of varlist payment_amount3 var13 {
|
211 |
+
file write fh "\hspace{4mm}"`"`: var label `var''"'" & " %4.2f (``var'_treat2_mean') " & " %4.2f (``var'_treat1_mean') " & " %4.2f (``var'_cntrl_mean') " & " %4.2f (``var'_p') "``var'_star' \\" _n
|
212 |
+
file write fh " & (" %4.2f (``var'_treat2_se') ") & (" %4.2f (``var'_treat1_se') ") & (" %4.2f (``var'_cntrl_se') ") & \\" _n
|
213 |
+
}
|
214 |
+
|
215 |
+
foreach var of varlist payment_amount3 {
|
216 |
+
label var payment_amount3 "Amount \\$\mid\\$ Donated"
|
217 |
+
*local payment_amount3lab="\em{unconditional on donating}"
|
218 |
+
|
219 |
+
file write fh "\hspace{4mm}"`"`: var label `var''"'" & " %4.2f (``var'_treat2_mean_con') " & " %4.2f (``var'_treat1_mean_con') " & " %4.2f (``var'_cntrl_mean_con') " & " %4.2f (``var'_p_con') "``var'_star_con' \\" _n
|
220 |
+
file write fh " & (" %4.2f (``var'_treat2_se_con') ") & (" %4.2f (``var'_treat1_se_con') ") & (" %4.2f (``var'_cntrl_se_con') ") & \\" _n
|
221 |
+
foreach var of varlist retention {
|
222 |
+
file write fh "\hspace{4mm}"`"`: var label `var''"'" & " %4.2f (``var'_treat2_mean') " & " %4.2f (``var'_treat1_mean') " & " %4.2f (``var'_cntrl_mean') " & " %4.2f (``var'_p') "``var'_star' \\" _n
|
223 |
+
}
|
224 |
+
|
225 |
+
}
|
226 |
+
file write fh "\hline" _n
|
227 |
+
file write fh "\hspace{4mm}"`"`: var label num'"'" & " %15.0fc (`num_treat2_mean') " & " %15.0fc (`num_treat1_mean') " & " %15.0fc (`num_cntrl_mean') " & \\"
|
228 |
+
file write fh "\hline \hline" _n
|
229 |
+
}
|
230 |
+
|
231 |
+
file write fh "\end{tabular}" _n
|
232 |
+
}
|
233 |
+
file write fh "\end{subtable}" _n
|
234 |
+
|
235 |
+
file close fh
|
18/replication_package/thank_you_replication/dofiles/02_analysis/main.do
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**********************************************************************************************
|
2 |
+
*This dofile can only be run after the running all dofiles located in the dofiles/dataprep folder
|
3 |
+
* Purpose: Runs all do-files located in the dofiles/analysis folder
|
4 |
+
* Date modified: 2021
|
5 |
+
|
6 |
+
*Instructions: Uncomment line 32 after data from UAS has been received and all do files
|
7 |
+
in the dataprep folder have been run
|
8 |
+
**********************************************************************************************/
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
|
13 |
+
|
14 |
+
*===============================================================================
|
15 |
+
* CREATING MAIN FIGURES AND TABLES
|
16 |
+
*===============================================================================
|
17 |
+
|
18 |
+
*MAIN FIGURES
|
19 |
+
|
20 |
+
*Figure 1 - Cumulative Probability of Donating in Experiment
|
21 |
+
do "$dofiles/02_analysis/Figure1_giving_cumprob.do"
|
22 |
+
|
23 |
+
|
24 |
+
|
25 |
+
*Figure 2 - Forecasts of Treatment Effects
|
26 |
+
|
27 |
+
/***********************************************************************************************
|
28 |
+
Uncomment below line after data from UAS has been received and all do files in the dataprep folder
|
29 |
+
have been run
|
30 |
+
***********************************************************************************************/
|
31 |
+
|
32 |
+
*do "$dofiles/02_analysis/Figure2_forecast_graph.do"
|
33 |
+
|
34 |
+
*Figure 3 - Treatment Effect (in % Change): Observed Versus Predicted
|
35 |
+
do "$dofiles/02_analysis/Figure3_obs_pred_don_rates.do"
|
36 |
+
|
37 |
+
*MAIN TABLES
|
38 |
+
|
39 |
+
*Table 1 - Balance Table
|
40 |
+
do "$dofiles/02_analysis/Table1_balance_table.do"
|
41 |
+
|
42 |
+
*Table 2 - Treatment Effect
|
43 |
+
do "$dofiles/02_analysis/Table2_treatment_effects.do"
|
44 |
+
|
45 |
+
|
18/replication_package/thank_you_replication/dofiles/03_appendix/FigureA2_kdensity.do
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
********************************************************************************
|
2 |
+
*Purpose: This do file creates Figure A2
|
3 |
+
*Input Files: exp1_analysis_data.dta, exp2_analysis_data.dta, exp3_analysis_data.dta
|
4 |
+
*Output Files: figureA2_kdensity_exp1.png, figureA2_kdensity_exp2.png, figureA2_kdensity_exp3.png
|
5 |
+
********************************************************************************
|
6 |
+
|
7 |
+
|
8 |
+
foreach x of numlist 1/3 {
|
9 |
+
cd "$dir/data"
|
10 |
+
use exp`x'_analysis_data, clear
|
11 |
+
|
12 |
+
if `x'==1 | `x'==2 {
|
13 |
+
|
14 |
+
|
15 |
+
twoway (kdensity payment_amount3 if treat==1 & payment_amount3>0 & payment_amount3<500, bwidth(3) lcolor(red))/*
|
16 |
+
*/ (kdensity payment_amount3 if treat==0 & payment_amount3>0 & payment_amount3<500, bwidth(3) lcolor(blue) lpattern(dash))/*
|
17 |
+
*/ , xlabel(0 (50) 500) legend(order (1 "Treatment" 2 "Control")) xtitle("Amount | Donated") ytitle("Kernel Density") graphregion(color(white))
|
18 |
+
}
|
19 |
+
else {
|
20 |
+
|
21 |
+
twoway (kdensity payment_amount3 if treat==1 & script==1 & payment_amount3>0 & payment_amount3<500, bwidth(3) lcolor(red))/*
|
22 |
+
*/ (kdensity payment_amount3 if treat==1 & script==0 & payment_amount3>0 & payment_amount3<500, bwidth(3) lcolor(green) lpattern(dash) )/*
|
23 |
+
*/ (kdensity payment_amount3 if treat==0 & script==0 & payment_amount3>0 & payment_amount3<500, bwidth(3) lcolor(blue) lpattern(dash))/*
|
24 |
+
*/, legend(order (1 "New Script" 2 "Old Script" 3 "Control")) xlabel(0 (50) 500) xtitle("Amount | Donated") ytitle("Kernel Density") graphregion(color(white))/*
|
25 |
+
*/
|
26 |
+
}
|
27 |
+
graph export "$dir/latex/figureA2_kdensity_exp`x'.png", replace
|
28 |
+
}
|
18/replication_package/thank_you_replication/dofiles/03_appendix/FigureA3_historgram_forecasted.do
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
********************************************************************************
|
2 |
+
*Purpose: This do file creates Figure A3
|
3 |
+
*Input Files: charity.dta, uas_dataset.dta
|
4 |
+
*Temp Files: exp1_hist_charityperc.gph, exp2_hist_charityperc.gph, exp3_hist_charityperc.gph
|
5 |
+
*exp1_hist_uasperc.gph, exp2_hist_uasperc.gph, exp3_hist_uasperc.gph
|
6 |
+
*Output Files: figureA3_all_hist_perc.eps
|
7 |
+
********************************************************************************
|
8 |
+
|
9 |
+
|
10 |
+
|
11 |
+
cd "$dir/data"
|
12 |
+
use "charity.dta",clear
|
13 |
+
|
14 |
+
|
15 |
+
|
16 |
+
gen y=20
|
17 |
+
gen w=40
|
18 |
+
label var y "Treatment"
|
19 |
+
|
20 |
+
//--------------------------------------------------------
|
21 |
+
*Charity predicted vs actual gaps
|
22 |
+
//--------------------------------------------------------
|
23 |
+
|
24 |
+
foreach x of numlist 1/3 {
|
25 |
+
gen exp`x'_gapamount = exp`x'_amount - exp`x'_amountactual
|
26 |
+
gen exp`x'_gappercent= exp`x'_percent - exp`x'_percentactual
|
27 |
+
}
|
28 |
+
egen gap_amount= rowmean(exp*_gapamount)
|
29 |
+
egen gap_percent = rowmean(exp*_gappercent)
|
30 |
+
|
31 |
+
label var gap_amount "Overprediction (amount)"
|
32 |
+
label var gap_percent "Overprediction (percent)"
|
33 |
+
|
34 |
+
|
35 |
+
|
36 |
+
//--------------------------------------------------------
|
37 |
+
*histograms
|
38 |
+
//--------------------------------------------------------
|
39 |
+
replace y=0 in 5
|
40 |
+
replace w=0 in 5
|
41 |
+
cd "$dir/latex"
|
42 |
+
foreach x of numlist 1/3 {
|
43 |
+
summarize exp`x'_percentactual
|
44 |
+
gen exp`x'_conf_perchi=(r(mean) + .05*r(mean))
|
45 |
+
gen exp`x'_conf_perclow=(r(mean) - .05*r(mean))
|
46 |
+
summarize exp`x'_amountactual
|
47 |
+
gen exp`x'_conf_amhi=(r(mean) + .05*r(mean))
|
48 |
+
gen exp`x'_conf_amlow=(r(mean) - .05*r(mean))
|
49 |
+
|
50 |
+
capture erase exp`x'_hist_charityperc.gph
|
51 |
+
twoway (histogram exp`x'_percent, fcolor(none) lcolor(gray) width(5) percent) (line y exp`x'_conf_perchi, /*
|
52 |
+
*/ lcolor(black) lpattern(dot)) (line y exp`x'_conf_perclow, lcolor(black) lpattern(dot)), saving(exp`x'_hist_charityperc,replace)/*
|
53 |
+
*/ graphregion(color(white)) legend(off) ylabel(,nogrid) title("Exp `x': Experts", size(medium))
|
54 |
+
|
55 |
+
}
|
56 |
+
|
57 |
+
cd "$dir/data"
|
58 |
+
|
59 |
+
use "uas_dataset",clear
|
60 |
+
|
61 |
+
*make histogram fragments for forecast histograms
|
62 |
+
gen y=20
|
63 |
+
gen w=40
|
64 |
+
replace y=0 in 788
|
65 |
+
replace w=0 in 788
|
66 |
+
label var y "Treatment"
|
67 |
+
cd "$dir/latex"
|
68 |
+
|
69 |
+
foreach x of numlist 1/3 {
|
70 |
+
label var exp`x'_percent "Experiment `x' (percent)"
|
71 |
+
label var exp`x'_amount "Experiment `x' (amount)"
|
72 |
+
replace num_correct=num_correct+1 if exp`x'_percent> (exp`x'_percentactual-(0.05*exp`x'_percentactual))/*
|
73 |
+
*/ & exp`x'_percent<(exp`x'_percentactual+(0.05*exp`x'_percentactual))
|
74 |
+
|
75 |
+
*histograms
|
76 |
+
summarize exp`x'_percentactual
|
77 |
+
gen exp`x'_conf_perchi=(r(mean) + .05*r(mean))
|
78 |
+
gen exp`x'_conf_perclow=(r(mean) - .05*r(mean))
|
79 |
+
summarize exp`x'_amountactual
|
80 |
+
gen exp`x'_conf_amhi=(r(mean) + .05*r(mean))
|
81 |
+
gen exp`x'_conf_amlow=(r(mean) - .05*r(mean))
|
82 |
+
di "``x'_conf_perc'"
|
83 |
+
di "``x'_conf_am'"
|
84 |
+
|
85 |
+
capture erase exp`x'_hist_uasperc.gph
|
86 |
+
twoway (histogram exp`x'_percent, fcolor(none) lcolor(gray) width(5) percent) (line y exp`x'_conf_perchi, /*
|
87 |
+
*/ lcolor(black) lpattern(dot)) (line y exp`x'_conf_perclow, lcolor(black) lpattern(dot)), saving(exp`x'_hist_uasperc,replace)/*
|
88 |
+
*/ graphregion(color(white)) legend(off) ylabel(,nogrid) title("Exp. `x': Nonexperts", size(medium))
|
89 |
+
|
90 |
+
}
|
91 |
+
|
92 |
+
*combining graphs for final figure
|
93 |
+
|
94 |
+
set graphics on
|
95 |
+
graph combine exp1_hist_charityperc.gph exp2_hist_charityperc.gph exp3_hist_charityperc.gph/*
|
96 |
+
*/ exp1_hist_uasperc.gph exp2_hist_uasperc.gph exp3_hist_uasperc.gph,/*
|
97 |
+
*/ ycommon xcommon graphregion(color(white)) l1title("Percent of Sample", size(small)) b1title("Percent Donating", size(small))
|
98 |
+
graph export figureA3_all_hist_perc.eps, replace
|
99 |
+
|
100 |
+
*erasing temp files
|
101 |
+
|
102 |
+
foreach x of numlist 1/3 {
|
103 |
+
capture erase exp`x'_hist_charityperc.gph
|
104 |
+
capture erase exp`x'_hist_uasperc.gph
|
105 |
+
}
|
106 |
+
|
18/replication_package/thank_you_replication/dofiles/03_appendix/FigureA4_histogram_forecasted_conditional.do
ADDED
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
********************************************************************************
|
2 |
+
*Purpose: This do file creates Figure A3
|
3 |
+
*Input Files: charity.dta, uas_dataset.dta
|
4 |
+
*Temp Files: exp1_hist_charityam.gph, exp2_hist_charityam.gph, exp3_hist_charityam.gph
|
5 |
+
*exp1_hist_uasam.gph, exp2_hist_uasam.gph, exp3_hist_uasam.gph
|
6 |
+
*Output Files: figureA4_all_hist_am.eps
|
7 |
+
********************************************************************************
|
8 |
+
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
cd "$dir/data"
|
13 |
+
use "charity.dta",clear
|
14 |
+
|
15 |
+
|
16 |
+
|
17 |
+
gen y=20
|
18 |
+
gen w=40
|
19 |
+
label var y "Treatment"
|
20 |
+
|
21 |
+
//--------------------------------------------------------
|
22 |
+
*Charity predicted vs actual gaps
|
23 |
+
//--------------------------------------------------------
|
24 |
+
|
25 |
+
foreach x of numlist 1/3 {
|
26 |
+
gen exp`x'_gapamount = exp`x'_amount - exp`x'_amountactual
|
27 |
+
gen exp`x'_gappercent= exp`x'_percent - exp`x'_percentactual
|
28 |
+
}
|
29 |
+
egen gap_amount= rowmean(exp*_gapamount)
|
30 |
+
egen gap_percent = rowmean(exp*_gappercent)
|
31 |
+
|
32 |
+
label var gap_amount "Overprediction (amount)"
|
33 |
+
label var gap_percent "Overprediction (percent)"
|
34 |
+
|
35 |
+
|
36 |
+
|
37 |
+
//--------------------------------------------------------
|
38 |
+
*histograms
|
39 |
+
//--------------------------------------------------------
|
40 |
+
replace y=0 in 5
|
41 |
+
replace w=0 in 5
|
42 |
+
cd "$dir/latex"
|
43 |
+
foreach x of numlist 1/3 {
|
44 |
+
summarize exp`x'_percentactual
|
45 |
+
gen exp`x'_conf_perchi=(r(mean) + .05*r(mean))
|
46 |
+
gen exp`x'_conf_perclow=(r(mean) - .05*r(mean))
|
47 |
+
summarize exp`x'_amountactual
|
48 |
+
gen exp`x'_conf_amhi=(r(mean) + .05*r(mean))
|
49 |
+
gen exp`x'_conf_amlow=(r(mean) - .05*r(mean))
|
50 |
+
|
51 |
+
|
52 |
+
capture erase exp`x'_hist_charityam.gph
|
53 |
+
twoway (histogram exp`x'_amount, fcolor(none) lcolor(gray) width(30) percent) (line w exp`x'_conf_amhi, /*
|
54 |
+
*/ lcolor(black) lpattern(dot)) (line w exp`x'_conf_amlow, lcolor(black) lpattern(dot))if exp`x'_amount!=1000, saving(exp`x'_hist_charityam,replace)/*
|
55 |
+
*/ graphregion(color(white)) legend(off) ylabel(,nogrid) title("Exp `x': Experts", size(medium))
|
56 |
+
}
|
57 |
+
|
58 |
+
|
59 |
+
|
60 |
+
cd "$dir/data"
|
61 |
+
|
62 |
+
use "uas_dataset",clear
|
63 |
+
|
64 |
+
*make histogram fragments for forecast histograms
|
65 |
+
gen y=20
|
66 |
+
gen w=40
|
67 |
+
replace y=0 in 788
|
68 |
+
replace w=0 in 788
|
69 |
+
label var y "Treatment"
|
70 |
+
cd "$dir/latex"
|
71 |
+
|
72 |
+
foreach x of numlist 1/3 {
|
73 |
+
label var exp`x'_percent "Experiment `x' (percent)"
|
74 |
+
label var exp`x'_amount "Experiment `x' (amount)"
|
75 |
+
replace num_correct=num_correct+1 if exp`x'_percent> (exp`x'_percentactual-(0.05*exp`x'_percentactual))/*
|
76 |
+
*/ & exp`x'_percent<(exp`x'_percentactual+(0.05*exp`x'_percentactual))
|
77 |
+
|
78 |
+
*histograms
|
79 |
+
summarize exp`x'_percentactual
|
80 |
+
gen exp`x'_conf_perchi=(r(mean) + .05*r(mean))
|
81 |
+
gen exp`x'_conf_perclow=(r(mean) - .05*r(mean))
|
82 |
+
summarize exp`x'_amountactual
|
83 |
+
gen exp`x'_conf_amhi=(r(mean) + .05*r(mean))
|
84 |
+
gen exp`x'_conf_amlow=(r(mean) - .05*r(mean))
|
85 |
+
di "``x'_conf_perc'"
|
86 |
+
di "``x'_conf_am'"
|
87 |
+
|
88 |
+
capture erase exp`x'_hist_uasam.gph
|
89 |
+
twoway (histogram exp`x'_amount, fcolor(none) lcolor(gray) width(30) percent) (line w exp`x'_conf_amhi, /*
|
90 |
+
*/ lcolor(black) lpattern(dot)) (line w exp`x'_conf_amlow, lcolor(black) lpattern(dot)) if exp`x'_amount!=1000, saving(exp`x'_hist_uasam,replace)/*
|
91 |
+
*/ graphregion(color(white)) legend(off) ylabel(,nogrid) title("Exp. `x': Nonexperts", size(medium))
|
92 |
+
}
|
93 |
+
|
94 |
+
|
95 |
+
**combining the graphs
|
96 |
+
|
97 |
+
graph combine exp1_hist_charityam.gph exp2_hist_charityam.gph exp3_hist_charityam.gph/*
|
98 |
+
*/ exp1_hist_uasam.gph exp2_hist_uasam.gph exp3_hist_uasam.gph,/*
|
99 |
+
*/ ycommon xcommon graphregion(color(white)) l1title("Percent of Sample", size(small)) b1title("Amount | Donated", size(small))
|
100 |
+
graph export figureA4_all_hist_am.eps, replace
|
101 |
+
|
102 |
+
|
103 |
+
*erasing temp files
|
104 |
+
|
105 |
+
foreach x of numlist 1/3 {
|
106 |
+
capture erase exp`x'_hist_charityam.gph
|
107 |
+
capture erase exp`x'_hist_uasam.gph
|
108 |
+
}
|
109 |
+
|
110 |
+
|
111 |
+
|
18/replication_package/thank_you_replication/dofiles/03_appendix/FigureA5_charity_characteristics.do
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
********************************************************************************
|
2 |
+
*Purpose: This do file creates Figure A5
|
3 |
+
*Input Files: charity.dta
|
4 |
+
*Temp Files: num_donations_hist.gph, org_type_pie.gph
|
5 |
+
*Output Files: figureA5_charity_characteristics.pdf
|
6 |
+
********************************************************************************
|
7 |
+
|
8 |
+
|
9 |
+
|
10 |
+
cd "$dir/data"
|
11 |
+
use "charity.dta",clear
|
12 |
+
|
13 |
+
cd "$dir/latex"
|
14 |
+
histogram num_donations, discrete percent fcolor(none) lcolor(black) /*
|
15 |
+
*/ saving(num_donations_hist.gph,replace) xlabel(1 "100-999" 2 "1,000-9,999" 3 "10,000-99,999" 4 "100,000+")/*
|
16 |
+
*/ graphregion(color(white)) legend(off) xtitle("") ylabel(,nogrid)/*
|
17 |
+
*/ title("Number of Individual Donations per Year", size(medium))
|
18 |
+
|
19 |
+
graph pie, over(org_type) saving(org_type_pie.gph,replace) title("Charities by Field", size(medium))/*
|
20 |
+
*/ graphregion(color(white)) legend(order( 1 2 3 4 5 6 8 9 7) size(vsmall)) pie(_all, explode(0.25))
|
21 |
+
|
22 |
+
graph combine num_donations_hist.gph org_type_pie.gph/*
|
23 |
+
*/, iscale(0.8) graphregion(color(white)) xsize(9.0)
|
24 |
+
graph export figureA5_charity_characteristics.pdf, replace
|
25 |
+
|
26 |
+
*erasing temp files
|
27 |
+
|
28 |
+
capture erase num_donations_hist.gph
|
29 |
+
capture erase org_type_pie.gph
|
18/replication_package/thank_you_replication/dofiles/03_appendix/FigureA6_obs_pred_don_behavior.do
ADDED
@@ -0,0 +1,243 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
********************************************************************************
|
2 |
+
*Purpose: This do file creates Figure A6
|
3 |
+
*Input Files: charity_round2.dta
|
4 |
+
|
5 |
+
*Temp Files:
|
6 |
+
*In .gph and .png form
|
7 |
+
*gifts_1, gifts_2, calling_1, calling_2, agency_1,agency_2
|
8 |
+
|
9 |
+
*Output Files:
|
10 |
+
*figureA6_agency.png, figureA6_calling.png, figureA6_gifts.png, figureA6_info_1.png, figureA6_door_1.png
|
11 |
+
********************************************************************************
|
12 |
+
|
13 |
+
|
14 |
+
cd "$dir/data"
|
15 |
+
use "charity_round2", clear
|
16 |
+
|
17 |
+
|
18 |
+
**creating globals
|
19 |
+
|
20 |
+
global donation_rates mail_1 mail_2 door_1 door_2 door_3 matching_1 matching_2 matching_3 volunteer_1 volunteer_2 agency_1 agency_3
|
21 |
+
global cond_amounts mail_3 mail_4 volunteer_3 volunteer_4 calling_1 calling_2 calling_3 matching_4 matching_5 matching_6 agency_2 agency_4
|
22 |
+
|
23 |
+
|
24 |
+
foreach var of varlist $cond_amounts $donation_rates {
|
25 |
+
gen peffect_`var'=`var' - `var'_control
|
26 |
+
gen aeffect_`var'=`var'_actual - `var'_control
|
27 |
+
gen sepeffect_`var'=`var' - `var'_control
|
28 |
+
}
|
29 |
+
|
30 |
+
*gen se for actual obsv, donation rates
|
31 |
+
foreach var of varlist $donation_rates {
|
32 |
+
summarize `var'_actual
|
33 |
+
local success1=r(mean)/100
|
34 |
+
summarize `var'_control
|
35 |
+
local success2=r(mean)/100
|
36 |
+
di `success1'
|
37 |
+
di `success2'
|
38 |
+
di (`success1'*(1-`success1'))*(`success2'^2)
|
39 |
+
gen seaeffect_`var'=sqrt(((`success1'*(1-`success1'))/`var'_nactual) + ((`success2'*(1-`success2'))/`var'_ncontrol))
|
40 |
+
replace seaeffect_`var'=seaeffect_`var'*100
|
41 |
+
|
42 |
+
gen setreatment_`var'=(sqrt((`success1'*(1-`success1'))/`var'_nactual))*100
|
43 |
+
gen secontrol_`var'=(sqrt((`success2'*(1-`success2'))/`var'_ncontrol))*100
|
44 |
+
}
|
45 |
+
|
46 |
+
|
47 |
+
|
48 |
+
*gen se for actual obsv, cond amounts
|
49 |
+
foreach var of varlist $cond_amounts {
|
50 |
+
gen seaeffect_`var'=sqrt((`var'_seactual)^2 + (`var'_secontrol)^2)
|
51 |
+
gen setreatment_`var'=`var'_seactual
|
52 |
+
gen secontrol_`var'=`var'_secontrol
|
53 |
+
}
|
54 |
+
|
55 |
+
count if !missing(peffect_mail_1) | !missing(finished)
|
56 |
+
local obsv=r(N)
|
57 |
+
|
58 |
+
foreach var of varlist $donation_rates $cond_amounts {
|
59 |
+
gen treatment_`var'=`var'_actual
|
60 |
+
gen control_`var'=`var'_control
|
61 |
+
gen forecast_`var'=`var'
|
62 |
+
gen seforecast_`var'=forecast_`var'
|
63 |
+
}
|
64 |
+
|
65 |
+
|
66 |
+
collapse (mean) aeffect_* peffect_* seaeffect_* treatment_* control_* forecast_* setreatment_* secontrol_* /*
|
67 |
+
*/ *_confidence (semean) sepeffect_* seforecast_*
|
68 |
+
|
69 |
+
|
70 |
+
local count=1
|
71 |
+
foreach var in $donation_rates $cond_amounts {
|
72 |
+
rename peffect_`var' peffect`count'
|
73 |
+
rename sepeffect_`var' sepeffect`count'
|
74 |
+
rename aeffect_`var' aeffect`count'
|
75 |
+
rename seaeffect_`var' seaeffect`count'
|
76 |
+
rename treatment_`var' treatment`count'
|
77 |
+
rename control_`var' control`count'
|
78 |
+
rename forecast_`var' forecast`count'
|
79 |
+
rename setreatment_`var' setreatment`count'
|
80 |
+
rename secontrol_`var' secontrol`count'
|
81 |
+
rename seforecast_`var' seforecast`count'
|
82 |
+
local count=`count'+1
|
83 |
+
}
|
84 |
+
|
85 |
+
gen id=1
|
86 |
+
reshape long peffect aeffect sepeffect seaeffect treatment control forecast/*
|
87 |
+
*/ setreatment secontrol seforecast, j(experiment) i(id)
|
88 |
+
drop id
|
89 |
+
|
90 |
+
label define experiment 1 "Gifts 1" 2 "Gifts 2" 3 "Opt out 1" 4 "Opt out 2" 5 "Opt out 3" /*
|
91 |
+
*/ 6 "Matching 1" 7 "Matching 2" 8 "Matching 3" 9 "Paid info" 10 "Volunteer info" 11 "Agency 1" 12 "Agency 2"/*
|
92 |
+
*/ 13 "Gifts 1" 14 "Gifts 2" 15 "Paid info" 16 "Volunteer info" 17 "Info 1" 18 "Info 2" 19 "Info 3"/*
|
93 |
+
*/ 20 "Matching 1" 21 "Matching 2" 22 "Matching 3" 23 "Agency 1" 24 "Agency 2"
|
94 |
+
|
95 |
+
label values experiment experiment
|
96 |
+
|
97 |
+
|
98 |
+
gen hi_p = peffect + 1.96*sepeffect
|
99 |
+
gen lo_p = peffect - 1.96*sepeffect
|
100 |
+
gen hi_a = aeffect + 1.96*seaeffect
|
101 |
+
gen lo_a = aeffect - 1.96*seaeffect
|
102 |
+
|
103 |
+
|
104 |
+
|
105 |
+
//----------------------
|
106 |
+
* Mail Graph
|
107 |
+
//--------------------
|
108 |
+
gen control_location=1 if inlist(experiment, 1, 13, 9,15,17,6,20,3,11,23)
|
109 |
+
replace control_location=4 if inlist(experiment, 10, 16,4,12,24)
|
110 |
+
replace control_location=7 if inlist(experiment, 5)
|
111 |
+
gen treat_location=2 if inlist(experiment, 1, 13, 9,15,17,6,20,3,11,22,23)
|
112 |
+
replace treat_location=3 if inlist(experiment, 2, 14)
|
113 |
+
replace treat_location=5 if inlist(experiment,10,16,4,12,24)
|
114 |
+
replace treat_location=4 if inlist(experiment,18,7,21)
|
115 |
+
replace treat_location=6 if inlist(experiment,19,8,22)
|
116 |
+
replace treat_location=8 if inlist(experiment,5)
|
117 |
+
gen forecast_location=4 if inlist(experiment, 1, 13)
|
118 |
+
replace forecast_location=5 if inlist(experiment, 2, 14,18,7,21)
|
119 |
+
replace forecast_location=3 if inlist(experiment,9,15,17,6,20,3,11,23)
|
120 |
+
replace forecast_location=6 if inlist(experiment,10,16,4,12,24)
|
121 |
+
replace forecast_location=7 if inlist(experiment,19,8,22)
|
122 |
+
replace forecast_location=9 if inlist(experiment,5)
|
123 |
+
|
124 |
+
foreach type in control treatment forecast {
|
125 |
+
gen hi_`type'=`type'+1.96*se`type'
|
126 |
+
gen lo_`type'=`type'-1.96*se`type'
|
127 |
+
}
|
128 |
+
|
129 |
+
|
130 |
+
|
131 |
+
cd "$dir/latex"
|
132 |
+
|
133 |
+
|
134 |
+
*Mailing Postcard gifts
|
135 |
+
|
136 |
+
twoway (bar control control_location if experiment==1, fcolor(midblue) lcolor(black) barwidth(.9)) (bar treatment treat_location if experiment==1, barwidth(.9) fcolor(cranberry) lcolor(black))/*
|
137 |
+
*/ (bar treatment treat_location if experiment==2, fcolor(green) lcolor(black) barwidth(.9)) (bar forecast forecast_location if experiment==1, fcolor(cranberry*.5) lcolor(black) barwidth(.9)) /*
|
138 |
+
*/ (bar forecast forecast_location if experiment==2, fcolor(green*.5) lcolor(black) barwidth(.9)) (rcap hi_control lo_control control_location if experiment==1, lcolor(red))/*
|
139 |
+
*/ (rcap hi_treatment lo_treatment treat_location if experiment==1 | experiment==2, lcolor(red)) /*
|
140 |
+
*/ (rcap hi_forecast lo_forecast forecast_location if experiment==1 | experiment==2, lcolor(red)), graphregion(color(white)) ylabel(0(10)40,nogrid) ytitle("Proportion Donating (%)") /*
|
141 |
+
*/ legend(off) xlabel(1 "control" 2 `""treatment" "1 postcard""' 3 `""treatment" "4 postcards""' 4 `""forecast" "1 postcard""' 5 `""forecast" "4 postcards""', labsize(small)) saving(gifts_1.gph,replace)
|
142 |
+
graph export gifts_1.png, replace
|
143 |
+
|
144 |
+
|
145 |
+
twoway (bar control control_location if experiment==13, fcolor(midblue) lcolor(black) barwidth(.9)) (bar treatment treat_location if experiment==13, fcolor(cranberry) lcolor(black) barwidth(.9))/*
|
146 |
+
*/ (bar treatment treat_location if experiment==14, barwidth(.9) fcolor(green) lcolor(black)) (bar forecast forecast_location if experiment==13, barwidth(.9) fcolor(cranberry*.5) lcolor(black)) /*
|
147 |
+
*/ (bar forecast forecast_location if experiment==14, fcolor(green*.5) lcolor(black) barwidth(.9)) /*
|
148 |
+
*/ (rcap hi_control lo_control control_location if experiment==13, lcolor(red))/*
|
149 |
+
*/ (rcap hi_treatment lo_treatment treat_location if experiment==13 | experiment==14, lcolor(red)) /*
|
150 |
+
*/ (rcap hi_forecast lo_forecast forecast_location if experiment==13 | experiment==14, lcolor(red)), graphregion(color(white)) ylabel(,nogrid) ytitle("Giving Amount ($)") /*
|
151 |
+
*/ legend(off) ylabel(50 (10) 80) yscale(range( 50 80)) xlabel(1 "control" 2 `""treatment" "1 postcard""' 3 `""treatment" "4 postcards""' 4 `""forecast" "1 postcard""' 5 `""forecast" "4 postcards""', labsize(small)) saving(gifts_2.gph,replace)
|
152 |
+
graph export gifts_2.png, replace
|
153 |
+
|
154 |
+
|
155 |
+
|
156 |
+
|
157 |
+
*Calling graphs
|
158 |
+
twoway (bar control control_location if experiment==6, fcolor(midblue) lcolor(black) barwidth(.9) )/*
|
159 |
+
*/ (bar treatment treat_location if experiment==6 | experiment==7 | experiment==8, fcolor(cranberry) lcolor(black) barwidth(.9))/*
|
160 |
+
*/ (bar forecast forecast_location if experiment==6 | experiment==7 | experiment==8, fcolor(cranberry*.5) lcolor(black) barwidth(.9)) /*
|
161 |
+
*/ (rcap hi_control lo_control control_location if experiment==6 | experiment==7 | experiment==8, lcolor(red))/*
|
162 |
+
*/ (rcap hi_treatment lo_treatment treat_location if experiment==6 | experiment==7 | experiment==8, lcolor(red)) /*
|
163 |
+
*/ (rcap hi_forecast lo_forecast forecast_location if experiment==6 | experiment==7 | experiment==8, lcolor(red)), graphregion(color(white)) ylabel(,nogrid) ytitle("Proportion Donating (%)") /*
|
164 |
+
*/ legend(off) xlabel(1 "control" 2 `""treatment" "1:1""' 3 `""forecast" "1:1""'/*
|
165 |
+
*/ 4 `""treatment" "2:1""' 5 `""forecast" "2:1""' 6 `""treatment" "3:1""' 7 `""forecast" "3:1""', labsize(small)) saving(calling_1.gph,replace)
|
166 |
+
graph export calling_1.png, replace
|
167 |
+
|
168 |
+
twoway (bar control control_location if experiment==20, fcolor(midblue) lcolor(black) barwidth(.9) )/*
|
169 |
+
*/ (bar treatment treat_location if experiment==20 | experiment==21 | experiment==22, fcolor(cranberry) lcolor(black) barwidth(.9))/*
|
170 |
+
*/ (bar forecast forecast_location if experiment==20 | experiment==21 | experiment==22, fcolor(cranberry*.5) lcolor(black) barwidth(.9)) /*
|
171 |
+
*/ (rcap hi_control lo_control control_location if experiment==20 | experiment==21 | experiment==22, lcolor(red))/*
|
172 |
+
*/ (rcap hi_treatment lo_treatment treat_location if experiment==20 | experiment==21 | experiment==22, lcolor(red)) /*
|
173 |
+
*/ (rcap hi_forecast lo_forecast forecast_location if experiment==20 | experiment==21 | experiment==22, lcolor(red)), graphregion(color(white)) ylabel(,nogrid) ytitle("Giving Amount ($)") /*
|
174 |
+
*/ legend(off) xlabel(1 "control" 2 `""treatment" "1:1""' 3 `""forecast" "1:1""'/*
|
175 |
+
*/ 4 `""treatment" "2:1""' 5 `""forecast" "2:1""' 6 `""treatment" "3:1""' 7 `""forecast" "3:1""', labsize(small)) saving(calling_2.gph,replace)
|
176 |
+
graph export calling_2.png, replace
|
177 |
+
|
178 |
+
|
179 |
+
|
180 |
+
*Agency graphs
|
181 |
+
twoway (bar control control_location if experiment==11 | experiment==12, fcolor(midblue) lcolor(black) barwidth(.9))/*
|
182 |
+
*/ (bar treatment treat_location if experiment==11 | experiment==12, fcolor(cranberry) lcolor(black) barwidth(.9))/*
|
183 |
+
*/ (bar forecast forecast_location if experiment==11 | experiment==12, fcolor(cranberry*.5) lcolor(black) barwidth(.9)) /*
|
184 |
+
*/ (rcap hi_control lo_control control_location if experiment==11 | experiment==12, lcolor(red))/*
|
185 |
+
*/ (rcap hi_treatment lo_treatment treat_location if experiment==11 | experiment==12, lcolor(red)) /*
|
186 |
+
*/ (rcap hi_forecast lo_forecast forecast_location if experiment==11 | experiment==12, lcolor(red)), graphregion(color(white)) ylabel(,nogrid) ytitle("Proportion Donating (%)") /*
|
187 |
+
*/ legend(off) xlabel(1 "control" 2 `""treatment" "overall""' 3 "forecast" 4 "control" 5 `""treatment" "top 5%""'/*
|
188 |
+
*/ 6 "forecast") saving(agency_1.gph,replace)
|
189 |
+
graph export agency_1.png, replace
|
190 |
+
|
191 |
+
twoway (bar control control_location if experiment==23 | experiment==24, fcolor(midblue) lcolor(black) barwidth(.9)) /*
|
192 |
+
*/ (bar treatment treat_location if experiment==23 | experiment==24, fcolor(cranberry) lcolor(black) barwidth(.9))/*
|
193 |
+
*/(bar forecast forecast_location if experiment==23 | experiment==24, fcolor(cranberry*.5) lcolor(black) barwidth(.9)) /*
|
194 |
+
*/ (rcap hi_control lo_control control_location if experiment==23 | experiment==24, lcolor(red))/*
|
195 |
+
*/ (rcap hi_treatment lo_treatment treat_location if experiment==23 | experiment==24, lcolor(red)) /*
|
196 |
+
*/ (rcap hi_forecast lo_forecast forecast_location if experiment==23 | experiment==24, lcolor(red)), /*
|
197 |
+
*/ graphregion(color(white)) ytitle("Giving amount ($)") ylabel(,nogrid) /*
|
198 |
+
*/ legend(off) xlabel(1 "control" 2 `""treatment" "overall""' 3 "forecast" 4 "control" 5 `""treatment" "top 5%""'/*
|
199 |
+
*/ 6 "forecast") saving(agency_2.gph,replace)
|
200 |
+
graph export agency_2.png, replace
|
201 |
+
|
202 |
+
*Combining
|
203 |
+
foreach x in agency calling gifts {
|
204 |
+
graph combine `x'_1.gph `x'_2.gph, graphregion(color(white)) xsize(7)
|
205 |
+
graph export figureA6_`x'_ppt.png, replace
|
206 |
+
}
|
207 |
+
|
208 |
+
|
209 |
+
*Calling in (info)
|
210 |
+
twoway (bar control control_location if experiment==17, fcolor(midblue) barwidth(.9) lcolor(black) )/*
|
211 |
+
*/ (bar treatment treat_location if experiment==17 | experiment==18 | experiment==19, fcolor(cranberry) barwidth(.9) lcolor(black))/*
|
212 |
+
*/ (bar forecast forecast_location if experiment==17 | experiment==18 | experiment==19, fcolor(cranberry*.5) barwidth(.9) lcolor(black)) /*
|
213 |
+
*/ (rcap hi_control lo_control control_location if experiment==17 | experiment==18 | experiment==19, lcolor(red))/*
|
214 |
+
*/ (rcap hi_treatment lo_treatment treat_location if experiment==17 | experiment==18 | experiment==19, lcolor(red)) /*
|
215 |
+
*/ (rcap hi_forecast lo_forecast forecast_location if experiment==17 | experiment==18 | experiment==19, lcolor(red)), graphregion(color(white)) ylabel(,nogrid) ytitle("Giving Amount ($)") /*
|
216 |
+
*/ legend(off) xlabel(1 "control" 2 `""treatment" "$75""' 3 `""forecast" "$75""'/*
|
217 |
+
*/ 4 `""treatment" "$180""' 5 `""forecast" "$180""' 6 `""treatment" "$300""' 7 `""forecast" "$300""')
|
218 |
+
graph export figureA6_info_1.png, replace
|
219 |
+
|
220 |
+
|
221 |
+
|
222 |
+
*Door to door graphs
|
223 |
+
twoway (bar control control_location if experiment==3 | experiment==4 | experiment==5, fcolor(midblue) lcolor(black) barwidth(.9) )/*
|
224 |
+
*/ (bar treatment treat_location if experiment==3 | experiment==4 | experiment==5, fcolor(cranberry) lcolor(black) barwidth(.9))/*
|
225 |
+
*/ (bar forecast forecast_location if experiment==3 | experiment==4 | experiment==5, fcolor(cranberry*.5) lcolor(black) barwidth(.9)) /*
|
226 |
+
*/ (rcap hi_control lo_control control_location if experiment==3 | experiment==4 | experiment==5, lcolor(red))/*
|
227 |
+
*/ (rcap hi_treatment lo_treatment treat_location if experiment==3 | experiment==4 | experiment==5, lcolor(red)) /*
|
228 |
+
*/ (rcap hi_forecast lo_forecast forecast_location if experiment==3 | experiment==4 | experiment==5, lcolor(red)), graphregion(color(white)) ylabel(,nogrid) ytitle("Proportion (%)") /*
|
229 |
+
*/ legend(off) xlabel(1 "control" 2 `""treat" "door opening""' 3 "forecast" 4 "control" 5 `""treat" "donating""' 6 "forecast" /*
|
230 |
+
*/ 7 "control" 8 `""treat" "small donor""' 9 "forecast")
|
231 |
+
graph export figureA6_door_1.png, replace
|
232 |
+
|
233 |
+
|
234 |
+
*erasing temp files
|
235 |
+
|
236 |
+
foreach var in .png .gph{
|
237 |
+
cap erase gifts_1`var'
|
238 |
+
cap erase gifts_2`var'
|
239 |
+
cap erase calling_1`var'
|
240 |
+
cap erase calling_2`var'
|
241 |
+
cap erase agency_1`var'
|
242 |
+
cap erase agency_2`var'
|
243 |
+
}
|
18/replication_package/thank_you_replication/dofiles/03_appendix/TableA1_factors_associated_with_giving.do
ADDED
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
********************************************************************************
|
2 |
+
*Purpose: This do file creates Table A1
|
3 |
+
*Input Files: exp1_analysis_data, exp2_analysis_data, exp3_analysis_data
|
4 |
+
*Output Files: tableA1_factors_associated_with_giving.tex
|
5 |
+
********************************************************************************
|
6 |
+
|
7 |
+
|
8 |
+
foreach experiment in 1 2 3 {
|
9 |
+
clear
|
10 |
+
cd "$dir/data"
|
11 |
+
use exp`experiment'_analysis_data
|
12 |
+
|
13 |
+
if `experiment'==2 {
|
14 |
+
global controls
|
15 |
+
*reached var specific for LATE estimates
|
16 |
+
gen reached = 1 if response_type == "Called: Contacted"
|
17 |
+
replace reached=0 if response_type=="Called: Not Contacted" | response_type=="Control"
|
18 |
+
}
|
19 |
+
else {
|
20 |
+
global controls female age_display2 age_display3 inc_display3/*
|
21 |
+
*/ inc_display1 inc_display2 lor_display2
|
22 |
+
label var inc_display4 "Income below \\$34,000"
|
23 |
+
label var inc_display3 "Income \\$35,000-\\$99,999"
|
24 |
+
label var inc_display1 "Income \\$100,000-\\$174,999"
|
25 |
+
label var inc_display2 "Income \\$175,000+"
|
26 |
+
label var female "Female"
|
27 |
+
label var age_display1 "18 to 44 years old"
|
28 |
+
label var age_display2 "45 to 64 years old"
|
29 |
+
label var age_display3 "65+ years old"
|
30 |
+
label var lor_display1 "Residence length$<$5 years"
|
31 |
+
label var lor_display2 "Residence length$>$5 years"
|
32 |
+
|
33 |
+
*reached var specifc LATE estimates
|
34 |
+
replace reached = 0 if treat==0
|
35 |
+
}
|
36 |
+
|
37 |
+
if `experiment'==3 {
|
38 |
+
gen new_script=1 if exp3_treat==2
|
39 |
+
replace new_script=0 if exp3_treat!=2
|
40 |
+
label var new_script "New Call Script"
|
41 |
+
}
|
42 |
+
|
43 |
+
label var treat "Call Treatment"
|
44 |
+
label var reached "Reached"
|
45 |
+
|
46 |
+
*Table 3: OLS Regression
|
47 |
+
if `experiment'==3 {
|
48 |
+
*set station id for fixed effects
|
49 |
+
xtset ii
|
50 |
+
*donated Reg
|
51 |
+
xtreg donated treat new_script payment_amount2 var12 $controls, fe
|
52 |
+
estimates store exp`experiment'_reg_prob
|
53 |
+
*cond. gift amount Reg
|
54 |
+
xtreg gift_cond treat new_script payment_amount2 var12 $controls, fe
|
55 |
+
estimates store exp`experiment'_reg_amount
|
56 |
+
}
|
57 |
+
|
58 |
+
else {
|
59 |
+
if `experiment'==1 {
|
60 |
+
xtset ii
|
61 |
+
*donated Reg
|
62 |
+
xtreg donated treat payment_amount2 var12 $controls, fe
|
63 |
+
estimates store exp`experiment'_reg_prob
|
64 |
+
*cond. gift amount Reg
|
65 |
+
xtreg gift_cond treat payment_amount2 var12 $controls, fe
|
66 |
+
estimates store exp`experiment'_reg_amount
|
67 |
+
}
|
68 |
+
else{
|
69 |
+
* no fixed effets in exp 2
|
70 |
+
*donated Reg
|
71 |
+
reg donated treat payment_amount2 var12 $controls
|
72 |
+
estimates store exp`experiment'_reg_prob
|
73 |
+
*cond. gift amount Reg
|
74 |
+
reg gift_cond treat payment_amount2 var12 $controls
|
75 |
+
estimates store exp`experiment'_reg_amount
|
76 |
+
}
|
77 |
+
}
|
78 |
+
|
79 |
+
|
80 |
+
if `experiment'==1 {
|
81 |
+
*No Control Reg
|
82 |
+
xtset ii
|
83 |
+
xtreg `outcome' treat payment_amount2 var12, fe
|
84 |
+
estimates store exp`experiment'_`outcome'_nocontrol
|
85 |
+
*With Control Reg
|
86 |
+
xtreg `outcome' treat payment_amount2 var12 $controls, fe
|
87 |
+
estimates store exp`experiment'_`outcome'_control
|
88 |
+
}
|
89 |
+
if `experiment'==2 {
|
90 |
+
*No Control Reg
|
91 |
+
reg `outcome' treat payment_amount2 var12
|
92 |
+
estimates store exp`experiment'_`outcome'_nocontrol
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
|
97 |
+
|
98 |
+
|
99 |
+
cd "$dir/latex"
|
100 |
+
|
101 |
+
esttab exp1_reg_prob exp2_reg_prob exp3_reg_prob exp1_reg_amount exp2_reg_amount exp3_reg_amount/*
|
102 |
+
*/ using tableA1_factors_associated_with_giving.tex, nonotes cells(b(star fmt(2)) se(par))/*
|
103 |
+
*/ stats(r2 N, fmt(2 %15.0fc) label (R2 N)) label collabels(none) varlabels(_cons Constant)/*
|
104 |
+
*/ starlevels( * 0.10 ** 0.05 *** 0.010) mgroups("\em{Donated}" "\em{Amount \$\mid\$ Donated}", pattern(1 0 0 1 0 0)/*
|
105 |
+
*/ prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span})) /*
|
106 |
+
*/ nonumbers mtitles("Experiment 1" "Experiment 2" "Experiment 3" "Experiment 1" "Experiment 2" "Experiment 3")/*
|
107 |
+
*/ order(treat new_script) replace
|
108 |
+
|
109 |
+
|
18/replication_package/thank_you_replication/dofiles/03_appendix/TableA2_average_gift_amount_LATE.do
ADDED
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*******************************************************************************
|
2 |
+
*Purpose: This do file creates Table A2
|
3 |
+
*Input Files: exp1_analysis_data, exp2_analysis_data, exp3_analysis_data
|
4 |
+
*Output Files: tableA2_average_gift_amount_LATE.tex
|
5 |
+
********************************************************************************
|
6 |
+
|
7 |
+
|
8 |
+
foreach experiment in 1 2 3 {
|
9 |
+
clear
|
10 |
+
cd "$dir/data"
|
11 |
+
use exp`experiment'_analysis_data
|
12 |
+
|
13 |
+
if `experiment'==2 {
|
14 |
+
global controls
|
15 |
+
*reached var specific for LATE estimates
|
16 |
+
gen reached = 1 if response_type == "Called: Contacted"
|
17 |
+
replace reached=0 if response_type=="Called: Not Contacted" | response_type=="Control"
|
18 |
+
}
|
19 |
+
else {
|
20 |
+
global controls female age_display2 age_display3 inc_display3/*
|
21 |
+
*/ inc_display1 inc_display2 lor_display2
|
22 |
+
label var inc_display4 "Income below \\$34,000"
|
23 |
+
label var inc_display3 "Income \\$35,000-\\$99,999"
|
24 |
+
label var inc_display1 "Income \\$100,000-\\$174,999"
|
25 |
+
label var inc_display2 "Income \\$175,000+"
|
26 |
+
label var female "Female"
|
27 |
+
label var age_display1 "18 to 44 years old"
|
28 |
+
label var age_display2 "45 to 64 years old"
|
29 |
+
label var age_display3 "65+ years old"
|
30 |
+
label var lor_display1 "Residence length$<$5 years"
|
31 |
+
label var lor_display2 "Residence length$>$5 years"
|
32 |
+
|
33 |
+
*reached var specifc LATE estimates
|
34 |
+
replace reached = 0 if treat==0
|
35 |
+
}
|
36 |
+
|
37 |
+
if `experiment'==3 {
|
38 |
+
gen new_script=1 if exp3_treat==2
|
39 |
+
replace new_script=0 if exp3_treat!=2
|
40 |
+
label var new_script "New Call Script"
|
41 |
+
}
|
42 |
+
|
43 |
+
label var treat "Call Treatment"
|
44 |
+
label var reached "Reached"
|
45 |
+
|
46 |
+
|
47 |
+
*Table 4: LATE, 2SLS Regression
|
48 |
+
|
49 |
+
if `experiment'==3 {
|
50 |
+
tab ii, gen(ii)
|
51 |
+
drop ii
|
52 |
+
ivreg donated new_script payment_amount2 var12 ii* $controls (reached=treat)
|
53 |
+
estimates store exp`experiment'_reg_prob
|
54 |
+
|
55 |
+
ivreg gift_cond new_script payment_amount2 var12 $controls ii* (reached=treat)
|
56 |
+
estimates store exp`experiment'_reg_amount
|
57 |
+
}
|
58 |
+
|
59 |
+
if `experiment'==1 {
|
60 |
+
tab ii, gen(ii)
|
61 |
+
drop ii
|
62 |
+
ivreg donated payment_amount2 var12 ii* $controls (reached=treat)
|
63 |
+
estimates store exp`experiment'_reg_prob
|
64 |
+
|
65 |
+
ivreg gift_cond payment_amount2 var12 $controls ii* (reached=treat)
|
66 |
+
estimates store exp`experiment'_reg_amount
|
67 |
+
}
|
68 |
+
|
69 |
+
if `experiment'==2 {
|
70 |
+
ivreg donated payment_amount2 var12 $controls (reached=treat)
|
71 |
+
estimates store exp`experiment'_reg_prob
|
72 |
+
|
73 |
+
ivreg gift_cond payment_amount2 var12 $controls (reached=treat)
|
74 |
+
estimates store exp`experiment'_reg_amount
|
75 |
+
}
|
76 |
+
|
77 |
+
}
|
78 |
+
|
79 |
+
|
80 |
+
cd "$dir/latex"
|
81 |
+
|
82 |
+
|
83 |
+
esttab exp1_reg_prob exp2_reg_prob exp3_reg_prob exp1_reg_amount exp2_reg_amount exp3_reg_amount/*
|
84 |
+
*/ using tableA2_average_gift_amount_LATE.tex, nonotes cells(b(star fmt(2)) se(par))/*
|
85 |
+
*/ stats(r2 N, fmt(2 %15.0fc) label (R2 N)) label collabels(none) varlabels(_cons Constant)/*
|
86 |
+
*/ starlevels( * 0.10 ** 0.05 *** 0.010) drop(ii*) mgroups("\em{Donated}" "\em{Amount \$\mid\$ Donated}", pattern(1 0 0 1 0 0)/*
|
87 |
+
*/ prefix(\multicolumn{@span}{c}{) suffix(}) span erepeat(\cmidrule(lr){@span}))/*
|
88 |
+
*/ nonumbers mtitles("Experiment 1" "Experiment 2" "Experiment 3" "Experiment 1" "Experiment 2" "Experiment 3")/*
|
89 |
+
*/ order(reached new_script) replace
|
90 |
+
|
18/replication_package/thank_you_replication/dofiles/03_appendix/TableA3_treatment_future_years.do
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*******************************************************************************
|
2 |
+
*Purpose: This do file creates Table A3
|
3 |
+
*Input Files: exp1_analysis_data
|
4 |
+
*Output Files: tableA3_treatment_future_years.tex
|
5 |
+
********************************************************************************
|
6 |
+
|
7 |
+
|
8 |
+
|
9 |
+
cd "$dir/data"
|
10 |
+
use exp1_analysis_data, clear
|
11 |
+
|
12 |
+
cd "$dir/latex"
|
13 |
+
file open fh using "tableA3_treatment_future_years.tex", write replace
|
14 |
+
|
15 |
+
file write fh "\begin{subtable}[t]{\linewidth}" _n ///
|
16 |
+
"\centering" _n ///
|
17 |
+
"\vspace{0pt}" _n ///
|
18 |
+
|
19 |
+
foreach x of numlist 4/7 {
|
20 |
+
gen renewing`x'=0
|
21 |
+
replace renewing`x' =1 if var1`x'!=0 & var1`x'!=.
|
22 |
+
gen gift_cond`x'=payment_amount`x' if !missing(payment_amount`x') & payment_amount`x'>0
|
23 |
+
label var renewing`x' "Percent Donating"
|
24 |
+
label var payment_amount`x' "Amount Donated"
|
25 |
+
label var var1`x' "Number of Gifts"
|
26 |
+
label var gift_cond`x' "Amount \\$\mid\\$ Donated"
|
27 |
+
foreach var of varlist payment_amount`x' /*
|
28 |
+
*/ var1`x' renewing`x' gift_cond`x' {
|
29 |
+
|
30 |
+
if `var'==renewing`x' {
|
31 |
+
tabulate `var' treat, chi2
|
32 |
+
local `var'_p = r(p)
|
33 |
+
summarize `var' if treat==0
|
34 |
+
local `var'_cntrl_mean = r(mean)*100
|
35 |
+
local `var'_cntrl_se= (r(sd)/(sqrt(r(N))))*100
|
36 |
+
summarize `var' if treat==1
|
37 |
+
local `var'_treat_mean = r(mean)*100
|
38 |
+
local `var'_treat_se=(r(sd)/(sqrt(r(N))))*100
|
39 |
+
}
|
40 |
+
else {
|
41 |
+
ranksum `var', by(treat) porder
|
42 |
+
local `var'_p = 2 * normprob(-abs(r(z)))
|
43 |
+
summarize `var' if treat==0
|
44 |
+
local `var'_cntrl_mean = r(mean)
|
45 |
+
local `var'_cntrl_se= (r(sd)/(sqrt(r(N))))
|
46 |
+
summarize `var' if treat==1
|
47 |
+
local `var'_treat_mean = r(mean)
|
48 |
+
local `var'_treat_se=(r(sd)/(sqrt(r(N))))
|
49 |
+
}
|
50 |
+
|
51 |
+
*add significance stars
|
52 |
+
if ``var'_p'>.1 {
|
53 |
+
local `var'_star=""
|
54 |
+
}
|
55 |
+
if ``var'_p' <= .1 & ``var'_p' > .05 {
|
56 |
+
local `var'_star="*"
|
57 |
+
}
|
58 |
+
if ``var'_p' <= .05 & ``var'_p' > .01 {
|
59 |
+
local `var'_star="**"
|
60 |
+
}
|
61 |
+
if ``var'_p' <= .01 {
|
62 |
+
local `var'_star="***"
|
63 |
+
}
|
64 |
+
}
|
65 |
+
count if treat==1 & !missing(payment_amount`x')
|
66 |
+
local num_treat`x'=r(N)
|
67 |
+
count if treat==0 & !missing(payment_amount`x')
|
68 |
+
local num_control`x'=r(N)
|
69 |
+
}
|
70 |
+
|
71 |
+
|
72 |
+
foreach x of numlist 4/7 {
|
73 |
+
local year=`x'-2
|
74 |
+
file write fh "\caption{`year' Years Following Randomization}" _n ///
|
75 |
+
"\vspace{0pt}" _n ///
|
76 |
+
"\begin{tabular}{l c c c}" _n ///
|
77 |
+
"& \multicolumn{1}{c}{Treatment} & \multicolumn{1}{c}{Control} & \multicolumn{1}{c}{p-value}\\" _n ///
|
78 |
+
"\hline" _n ///
|
79 |
+
"\hline" _n
|
80 |
+
foreach var of varlist renewing`x' gift_cond`x' {
|
81 |
+
file write fh "\hspace{4mm}"`"`: var label `var''"'" & " %4.2f (``var'_treat_mean') " & " %4.2f (``var'_cntrl_mean') " & " %4.2f (``var'_p') "``var'_star' \\" _n
|
82 |
+
file write fh " & (" %4.2f (``var'_treat_se') ") & (" %4.2f (``var'_cntrl_se') ") & \\" _n
|
83 |
+
}
|
84 |
+
file write fh "\hline" _n
|
85 |
+
file write fh "\hspace{4mm} N & " %15.0fc (`num_treat`x'') " & " %15.0fc (`num_control`x'') " & \\" _n
|
86 |
+
file write fh "\hline" _n ///
|
87 |
+
"\hline" _n
|
88 |
+
file write fh "\end{tabular}" _n
|
89 |
+
}
|
90 |
+
|
91 |
+
file write fh "\end{subtable}" _n
|
92 |
+
file close fh
|
18/replication_package/thank_you_replication/dofiles/03_appendix/TableA4_unconditional_gift_te_exp1.do
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*******************************************************************************
|
2 |
+
*Purpose: This do file creates Table A4
|
3 |
+
*Input Files: exp1_analysis_data
|
4 |
+
*Output Files: tableA4_unconditional_gift_te_exp1.tex
|
5 |
+
********************************************************************************
|
6 |
+
|
7 |
+
|
8 |
+
cd "$dir/data"
|
9 |
+
clear
|
10 |
+
use exp1_analysis_data
|
11 |
+
|
12 |
+
global controls female age_display2 age_display3 inc_display3/*
|
13 |
+
*/ inc_display1 inc_display2 lor_display2
|
14 |
+
label var inc_display4 "Income below \\$34,000"
|
15 |
+
label var inc_display3 "Income \\$35,000-\\$99,999"
|
16 |
+
label var inc_display1 "Income \\$100,000-\\$174,999"
|
17 |
+
label var inc_display2 "Income \\$175,000+"
|
18 |
+
label var female "Female"
|
19 |
+
label var age_display1 "18 to 44 years old"
|
20 |
+
label var age_display2 "45 to 64 years old"
|
21 |
+
label var age_display3 "65+ years old"
|
22 |
+
label var lor_display1 "Residence length$<$5 years"
|
23 |
+
label var lor_display2 "Residence length$>$5 years"
|
24 |
+
label var treat "Call Treatment"
|
25 |
+
|
26 |
+
xtset ii
|
27 |
+
|
28 |
+
xtreg payment_amount3 treat payment_amount2 var12 $controls , fe
|
29 |
+
estimates store exp1_reg_prob
|
30 |
+
|
31 |
+
cd "$dir/latex"
|
32 |
+
|
33 |
+
esttab exp1_reg_prob /*
|
34 |
+
*/ using tableA4_unconditional_gift_te_exp1.tex, nonotes cells(b(star fmt(2)) se(par))/*
|
35 |
+
*/ stats(r2 N, fmt(2 %15.0fc) label (R2 N)) label collabels(none) varlabels(_cons Constant)/*
|
36 |
+
*/ starlevels( * 0.10 ** 0.05 *** 0.010)/*
|
37 |
+
*/ nonumbers mtitles("Unconditional Gift Amount")/*
|
38 |
+
*/ replace
|
18/replication_package/thank_you_replication/dofiles/03_appendix/TableA5_experience.do
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*******************************************************************************
|
2 |
+
*Purpose: This do file creates Table A5
|
3 |
+
*Input Files: charity.dta
|
4 |
+
*Output Files: tableA5_experience.tex
|
5 |
+
********************************************************************************
|
6 |
+
|
7 |
+
|
8 |
+
cd "$dir/data"
|
9 |
+
use "charity.dta",clear
|
10 |
+
|
11 |
+
|
12 |
+
//--------------------------------------------------------
|
13 |
+
*Charity predicted vs actual gaps
|
14 |
+
//--------------------------------------------------------
|
15 |
+
|
16 |
+
foreach x of numlist 1/3 {
|
17 |
+
gen exp`x'_gapamount = exp`x'_amount - exp`x'_amountactual
|
18 |
+
gen exp`x'_gappercent= exp`x'_percent - exp`x'_percentactual
|
19 |
+
}
|
20 |
+
egen gap_amount= rowmean(exp*_gapamount)
|
21 |
+
egen gap_percent = rowmean(exp*_gappercent)
|
22 |
+
|
23 |
+
label var gap_amount "Overprediction (amount)"
|
24 |
+
label var gap_percent "Overprediction (percent)"
|
25 |
+
|
26 |
+
|
27 |
+
|
28 |
+
//--------------------------------------------------------
|
29 |
+
*prediction by experience regression
|
30 |
+
//--------------------------------------------------------
|
31 |
+
|
32 |
+
foreach var of varlist highexp_org highexp_ind high_don does_calls {
|
33 |
+
reg gap_amount `var'
|
34 |
+
local t = _b[`var']/_se[`var']
|
35 |
+
local `var'_p1 = 2*ttail(e(df_r),abs(`t'))
|
36 |
+
local `var'_b1=_b[`var']
|
37 |
+
local `var'_s1=_se[`var']
|
38 |
+
reg gap_percent `var'
|
39 |
+
local t = _b[`var']/_se[`var']
|
40 |
+
local `var'_p2 = 2*ttail(e(df_r),abs(`t'))
|
41 |
+
local `var'_b2=_b[`var']
|
42 |
+
local `var'_s2=_se[`var']
|
43 |
+
|
44 |
+
foreach y of numlist 1/2 {
|
45 |
+
if ``var'_p`y'' > .1 local `var'_p`y'1 =""
|
46 |
+
if ``var'_p`y'' > .05 & ``var'_p`y'' <=.1 local `var'_p`y'1="*"
|
47 |
+
if ``var'_p`y'' > .01 & ``var'_p`y'' <=.05 local `var'_p`y'1="**"
|
48 |
+
if ``var'_p`y'' <=.01 local `var'_p`y'1="***"
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
count if !missing(gap_amount)
|
53 |
+
local n1=r(N)
|
54 |
+
count if !missing(gap_percent)
|
55 |
+
local n2=r(N)
|
56 |
+
cd "$dir/latex"
|
57 |
+
file open fh using "tableA5_experience.tex", write replace
|
58 |
+
file write fh "\begin{tabular}{l*{7}{c}}" _n ///
|
59 |
+
"\hline" _n ///
|
60 |
+
"\hline" _n ///
|
61 |
+
"& \multicolumn{1}{c}{Overprediction (\\$ per donation)} & \multicolumn{1}{c}{Overprediction (\% donated)} \\" _n ///
|
62 |
+
"\hline" _n
|
63 |
+
foreach var of varlist highexp_org highexp_ind high_don does_calls {
|
64 |
+
file write fh "\hspace{4mm}"`"`: var label `var''"'" & " %4.2f (``var'_b1') "``var'_p11' & " %4.2f (``var'_b2') "``var'_p21' \\ " _n
|
65 |
+
file write fh "& (" %4.2f (``var'_s1') ") & (" %4.2f (``var'_s2') ") \\ " _n
|
66 |
+
}
|
67 |
+
|
68 |
+
file write fh "\hline" _n
|
69 |
+
file write fh "\hspace{4mm} N & " %4.0f (`n1') " & " %4.0f (`n2') " \\ " _n
|
70 |
+
file write fh "\hline\hline" _n
|
71 |
+
file write fh "\end{tabular}" _n
|
72 |
+
file close fh
|
18/replication_package/thank_you_replication/dofiles/03_appendix/TableA6_general_interactions_combined.do
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*******************************************************************************
|
2 |
+
*Purpose: This do file creates Table A6
|
3 |
+
*Input Files: exp1_analysis_data.dta
|
4 |
+
*Output Files: tableA6_general_interactions_combined.tex
|
5 |
+
********************************************************************************
|
6 |
+
|
7 |
+
|
8 |
+
|
9 |
+
cd "$dir/data"
|
10 |
+
|
11 |
+
use exp1_analysis_data, clear
|
12 |
+
|
13 |
+
replace pledge2=1 if pledge2>0 & !missing(pledge2)
|
14 |
+
*replace category_p2=1 if category_p2>0 & !missing(category_p2)
|
15 |
+
|
16 |
+
*make interaction terms
|
17 |
+
foreach x of numlist 1/3 {
|
18 |
+
gen treat_age`x'=age_display`x'*treat
|
19 |
+
}
|
20 |
+
foreach x of numlist 1/4 {
|
21 |
+
gen treat_inc`x'=inc_display`x'*treat
|
22 |
+
}
|
23 |
+
gen treat_female=female*treat
|
24 |
+
gen treat_payment_amount2=payment_amount2*treat
|
25 |
+
gen treat_var12=var12*treat
|
26 |
+
gen treat_p=pledge2*treat
|
27 |
+
gen treat_residence=treat*lor_display2
|
28 |
+
label var gift_cond "Exp. 1"
|
29 |
+
label var donated "Exp. 1"
|
30 |
+
label var treat_female "Treatment*Female"
|
31 |
+
label var treat_payment_amount2 "Treatment*Baseline Donation"
|
32 |
+
label var treat_var12 "Treatment*Baseline Gifts"
|
33 |
+
label var treat_p "Treatment*Pledge Drive"
|
34 |
+
label var treat_age2 "Treatment*45-64 years old"
|
35 |
+
label var treat_age3 "Treatment*65+ years old"
|
36 |
+
label var treat_inc1 "Treatment*\\$100k-175k+"
|
37 |
+
label var treat_inc2 "Treatment*\\$175k+"
|
38 |
+
label var treat_inc3 "Treatment*\\$35k-99k"
|
39 |
+
label var treat_residence "Treatment*Residence length 5+ years"
|
40 |
+
label var treat "Treatment"
|
41 |
+
label var pledge2 "Pledge Drive"
|
42 |
+
label var donated "Prop. Donating"
|
43 |
+
label var gift_cond "Amount Donated"
|
44 |
+
|
45 |
+
xtset ii
|
46 |
+
cd "$dir/latex"
|
47 |
+
eststo clear
|
48 |
+
eststo: quietly xtreg donated treat pledge2 treat_p , fe
|
49 |
+
eststo: quietly xtreg gift_cond treat pledge2 treat_p , fe
|
50 |
+
esttab using tableA6_general_interactions_combined.tex, keep(treat pledge2 treat_p) cells(b(star fmt(2)) se(par))/*
|
51 |
+
*/ stats(r2 N, fmt(2 %15.0fc) label(R2 N)) /*
|
52 |
+
*/ label collabels(none) /*
|
53 |
+
*/ star(* 0.10 ** 0.05 *** 0.01) nonotes replace
|
18/replication_package/thank_you_replication/dofiles/03_appendix/main.do
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/***********************************************************************************************
|
2 |
+
*This dofile can only be run after the running all dofiles located in the dofiles/dataprep folder
|
3 |
+
* Purpose: Runs all do-files located in the dofiles/appendix folder
|
4 |
+
* Date modified: 2021
|
5 |
+
|
6 |
+
*Instructions: Uncomment lines 27 and 36 after data from UAS has been received and all do files
|
7 |
+
in the dataprep folder have been run
|
8 |
+
**********************************************************************************************/
|
9 |
+
|
10 |
+
*===============================================================================
|
11 |
+
* CREATING APPENDIX FIGURES AND TABLES
|
12 |
+
*===============================================================================
|
13 |
+
|
14 |
+
*APPENDIX FIGURES
|
15 |
+
|
16 |
+
*Figure A1 - Flow Diagram: Experiments 1 and 3 created manually
|
17 |
+
|
18 |
+
*Figure A2 - Distribution of Gift Amounts by Experiment
|
19 |
+
do "$dofiles/03_appendix/FigureA2_kdensity.do"
|
20 |
+
|
21 |
+
*Figure A3 - Histograms of Forecasted Treatment Effects: Percent Donating
|
22 |
+
|
23 |
+
/***********************************************************************************************
|
24 |
+
Uncomment below line after data from UAS has been received and all do files in the dataprep folder
|
25 |
+
have been run
|
26 |
+
***********************************************************************************************/
|
27 |
+
*do "$dofiles/03_appendix/FigureA3_historgram_forecasted.do"
|
28 |
+
|
29 |
+
*Figure A4 - Histograms of Forecasted Treatment Effects: Amount|Donated
|
30 |
+
|
31 |
+
/***********************************************************************************************
|
32 |
+
Uncomment below line after data from UAS has been received and all do files in the dataprep folder
|
33 |
+
have been run
|
34 |
+
***********************************************************************************************/
|
35 |
+
|
36 |
+
*do "$dofiles/03_appendix/FigureA4_histogram_forecasted_conditional.do"
|
37 |
+
|
38 |
+
*Figure A5 - Characteristics of Charity Sample
|
39 |
+
do "$dofiles/03_appendix/FigureA5_charity_characteristics.do"
|
40 |
+
|
41 |
+
*Figure A6 - Observed and Predicted Donation Behavior, All Studies
|
42 |
+
do "$dofiles/03_appendix/FigureA6_obs_pred_don_behavior.do"
|
43 |
+
|
44 |
+
*APPENDIX TABLES
|
45 |
+
|
46 |
+
*Table A1 - Factors Associated with Giving in the next Year
|
47 |
+
do "$dofiles/03_appendix/TableA1_factors_associated_with_giving.do"
|
48 |
+
|
49 |
+
*Table A2 - Average Gift Amount on Treatment, LATE Estimates
|
50 |
+
do "$dofiles/03_appendix/TableA2_average_gift_amount_LATE.do"
|
51 |
+
|
52 |
+
*Table A3 - Treatment Effects in Future Years in Experiment 1
|
53 |
+
do "$dofiles/03_appendix/TableA3_treatment_future_years.do"
|
54 |
+
|
55 |
+
*Table A4 - Effect of Treatment on Unconditional Gift Amount in Experiment 1
|
56 |
+
do "$dofiles/03_appendix/TableA4_unconditional_gift_te_exp1.do"
|
57 |
+
|
58 |
+
*Table A5 - Average Overprediction by Experience and Charity Size
|
59 |
+
do "$dofiles/03_appendix/TableA5_experience.do"
|
60 |
+
|
61 |
+
*Table A6 - Robustness Test: Proportion Donating and ConditionalGift Card Amount in Experiment 1
|
62 |
+
do "$dofiles/03_appendix/TableA6_general_interactions_combined.do"
|
63 |
+
|
64 |
+
|
65 |
+
|
18/replication_package/thank_you_replication/dofiles/master.do
ADDED
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**********************************************************************************************
|
2 |
+
* Purpose: Master do-file runs all do-files for "Do Thank-You Calls Increase Charitable Giving?
|
3 |
+
Expert Forecasts and Field Experimental Evidence"
|
4 |
+
* Date modified: 2021
|
5 |
+
|
6 |
+
|
7 |
+
|
8 |
+
|
9 |
+
BEFORE RUNNING: *Edit global dir to directory of master file if different than below
|
10 |
+
|
11 |
+
**********************************************************************************************/
|
12 |
+
|
13 |
+
|
14 |
+
*-------------------------------------------------------------------------------
|
15 |
+
* DIRECTORY
|
16 |
+
*
|
17 |
+
*-------------------------------------------------------------------------------
|
18 |
+
|
19 |
+
clear all
|
20 |
+
set more off
|
21 |
+
|
22 |
+
*Enter directory of master file here
|
23 |
+
global dir "/Users/`c(username)'/Dropbox/thank_you_replication"
|
24 |
+
|
25 |
+
* Do-files directory
|
26 |
+
global dofiles "$dir/dofiles"
|
27 |
+
|
28 |
+
*===============================================================================
|
29 |
+
* A. CREATING DATASETS
|
30 |
+
*===============================================================================
|
31 |
+
|
32 |
+
do "$dofiles/01_dataprep/main.do"
|
33 |
+
|
34 |
+
*===============================================================================
|
35 |
+
* B. CREATING MAIN FIGURES AND TABLES
|
36 |
+
*===============================================================================
|
37 |
+
|
38 |
+
do "$dofiles/02_analysis/main.do"
|
39 |
+
|
40 |
+
|
41 |
+
*MAIN FIGURES
|
42 |
+
|
43 |
+
*Figure 1 - Cumulative Probability of Donating in Experiment
|
44 |
+
|
45 |
+
*Figure 2 - Forecasts of Treatment Effects (CAN'T BE CREATED WITHOUT UAS DATA)
|
46 |
+
|
47 |
+
*Figure 3 - Treatment Effect (in % Change): Observed Versus Predicted
|
48 |
+
|
49 |
+
*MAIN TABLES
|
50 |
+
|
51 |
+
*Table 1 - Balance Table
|
52 |
+
|
53 |
+
*Table 2 - Treatment Effect
|
54 |
+
|
55 |
+
|
56 |
+
|
57 |
+
*===============================================================================
|
58 |
+
* C. CREATING APPENDIX FIGURES AND TABLES
|
59 |
+
*===============================================================================
|
60 |
+
|
61 |
+
do "$dofiles/03_appendix/main.do"
|
62 |
+
|
63 |
+
|
64 |
+
*APPENDIX FIGURES
|
65 |
+
|
66 |
+
*Figure A1 - Flow Diagram: Experiments 1 and 3 created manually
|
67 |
+
|
68 |
+
*Figure A2 - Distribution of Gift Amounts by Experiment
|
69 |
+
|
70 |
+
*Figure A3 - Histograms of Forecasted Treatment Effects: Percent Donating (CAN'T BE CREATED WITHOUT UAS DATA)
|
71 |
+
|
72 |
+
*Figure A4 - Histograms of Forecasted Treatment Effects: Amount|Donated (CAN'T BE CREATED WITHOUT UAS DATA)
|
73 |
+
|
74 |
+
*Figure A5 - Characteristics of Charity Sample
|
75 |
+
|
76 |
+
*Figure A6 - Observed and Predicted Donation Behavior, All Studies
|
77 |
+
|
78 |
+
*APPENDIX TABLES
|
79 |
+
|
80 |
+
*Table A1 - Factors Associated with Giving in the next Year
|
81 |
+
|
82 |
+
*Table A2 - Average Gift Amount on Treatment, LATE Estimates
|
83 |
+
|
84 |
+
*Table A3 - Treatment Effects in Future Years in Experiment 1
|
85 |
+
|
86 |
+
*Table A4 - Effect of Treatment on Unconditional Gift Amount in Experiment 1
|
87 |
+
|
88 |
+
*Table A5 - Average Overprediction by Experience and Charity Size
|
89 |
+
|
90 |
+
*Table A6 - Robustness Test: Proportion Donating and Conditional Gift Card Amount in Experiment 1
|
91 |
+
|
92 |
+
|
93 |
+
|
94 |
+
|
95 |
+
|
18/replication_package/thank_you_replication/dofiles/step0_Install_Packages_One_Time.do
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
clear all
|
2 |
+
set more off
|
3 |
+
|
4 |
+
program packages
|
5 |
+
foreach pkg in estout {
|
6 |
+
dis "Installing `pkg'"
|
7 |
+
ssc install `pkg', replace
|
8 |
+
}
|
9 |
+
end
|
10 |
+
|
11 |
+
packages
|
12 |
+
|
13 |
+
|
18/replication_package/thank_you_replication/questionnaires/SPI2019_practitioner_survey.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:92c1eb9b7b9176d72790f5f9f8100b1f862731bf60c435f2dfb9d8c41338e79c
|
3 |
+
size 256375
|
18/replication_package/thank_you_replication/questionnaires/charity_more_questions_survey.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:485f424cf9932d79a685fe8daf0b0fbe0e8313dbf670bbbd22baddc96bf6b5f2
|
3 |
+
size 203026
|
18/replication_package/thank_you_replication/questionnaires/charity_survey.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3b990c12f4847c81e8e81e77ebbfc1c5421c5b73c7c392f67c85cd2bbb7f0b36
|
3 |
+
size 225388
|
18/replication_package/thank_you_replication/questionnaires/uas166_relevant_pg34_37.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ba7b8a06b21093a41d0b8665e852af3ca14f321adf123e735370caf259657a2e
|
3 |
+
size 301396
|
18/replication_package/thank_you_replication/questionnaires/uas24_relevant_pg81.pdf
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5d2adc72449a0a3432100d9056e27ee7b60680768a8bfd6f6830eefe38d07dc0
|
3 |
+
size 221226
|
18/should_reproduce.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f4398f9ed99c05fbdc1866e3f8ece9f68c69e6329b64702527503241e706a28e
|
3 |
+
size 42
|