diff --git a/Grafics/FlowChart.tif b/Grafics/FlowChart.tif new file mode 100644 index 0000000000000000000000000000000000000000..862796905c9fb82ea0aed9db48ebe2e7ab3bd35b Binary files /dev/null and b/Grafics/FlowChart.tif differ diff --git a/Scripts/create_tables.R b/Scripts/create_tables.R new file mode 100644 index 0000000000000000000000000000000000000000..1ab224dedd53a575c7c7a5a9c2bae82bfe88d2aa --- /dev/null +++ b/Scripts/create_tables.R @@ -0,0 +1,64 @@ +dir.create("Tables/mxl") + +# Manipulation check +texreg(l=list(ols_percentage_correct_A, ols_percentage_correct_control_A, ols_percentage_correct_C, ols_percentage_correct_control_C), + custom.model.names = c("Case A", "with Controls", "Case C", "with Controls"), + custom.coef.map = list("(Intercept)" = "Intercept", "as.factor(Treatment_A)Treated" = "Treated", "as.factor(Treatment_A)Vol_Treated" = "Vol. Treated", + "as.factor(Treatment_C)No Info 2" = "No Info 2", "as.factor(Treatment_C)No Video 1" = "No Video 1", + "as.factor(Treatment_C)No Video 2" = "No Video 2", "as.factor(Treatment_C)Video 1" = "Video 1", + "as.factor(Treatment_C)Video 2" = "Video 2", "Z_Mean_NR" = "NR-Index", "as.factor(Gender)2" = "Female", + "Age_mean" = "Age", "QFIncome" = "Income"), stars = c(0.01, 0.05, 0.1), + file="Tables/ols/manipulation.tex") + + +# Net interview time +texreg(l=list(ols_time_spent_A, ols_time_spent_control_A, ols_time_spent_C, ols_time_spent_control_C), + custom.model.names = c("Case A", "with Controls", "Case C", "with Controls"), + custom.coef.map = list("(Intercept)" = "Intercept", "as.factor(Treatment_A)Treated" = "Treated", "as.factor(Treatment_A)Vol_Treated" = "Vol. Treated", + "as.factor(Treatment_C)No Info 2" = "No Info 2", "as.factor(Treatment_C)No Video 1" = "No Video 1", + "as.factor(Treatment_C)No Video 2" = "No Video 2", "as.factor(Treatment_C)Video 1" = "Video 1", + "as.factor(Treatment_C)Video 2" = "Video 2", "Z_Mean_NR" = "NR-Index", "as.factor(Gender)2" = "Female", + "Age_mean" = "Age", "QFIncome" = "Income"), stars = c(0.01, 0.05, 0.1), + file="Tables/ols/interviewtime.tex") + + +# CC Time +texreg(l=list(ols_time_cc_A, ols_time_cc_control_A, ols_time_cc_C, ols_time_cc_control_C), + custom.model.names = c("Case A", "with Controls", "Case C", "with Controls"), + custom.coef.map = list("(Intercept)" = "Intercept", "as.factor(Treatment_A)Treated" = "Treated", "as.factor(Treatment_A)Vol_Treated" = "Vol. Treated", + "as.factor(Treatment_C)No Info 2" = "No Info 2", "as.factor(Treatment_C)No Video 1" = "No Video 1", + "as.factor(Treatment_C)No Video 2" = "No Video 2", "as.factor(Treatment_C)Video 1" = "Video 1", + "as.factor(Treatment_C)Video 2" = "Video 2", "Z_Mean_NR" = "NR-Index", "as.factor(Gender)2" = "Female", + "Age_mean" = "Age", "QFIncome" = "Income"), stars = c(0.01, 0.05, 0.1), + file="Tables/ols/cctime.tex") + +# Consequentiality +texreg(l=list(conseq_model_A, conseq_model_control_A, conseq_model_C, conseq_model_control_C), + custom.model.names = c("Case A", "with Controls", "Case C", "with Controls"), + custom.coef.map = list("(Intercept)" = "Intercept", "as.factor(Treatment_A)Treated" = "Treated", "as.factor(Treatment_A)Vol_Treated" = "Vol. Treated", + "as.factor(Treatment_C)No Info 2" = "No Info 2", "as.factor(Treatment_C)No Video 1" = "No Video 1", + "as.factor(Treatment_C)No Video 2" = "No Video 2", "as.factor(Treatment_C)Video 1" = "Video 1", + "as.factor(Treatment_C)Video 2" = "Video 2", "Z_Mean_NR" = "NR-Index", "as.factor(Gender)2" = "Female", + "Age_mean" = "Age", "QFIncome" = "Income"), stars = c(0.01, 0.05, 0.1), + file="Tables/ols/consequentiality.tex") + +# Opt Out +texreg(l=list(ols_opt_out_A, ols_opt_out_control_A, ols_opt_out_C, ols_opt_out_control_C), + custom.model.names = c("Case A", "with Controls", "Case C", "with Controls"), + custom.coef.map = list("(Intercept)" = "Intercept", "as.factor(Treatment_A)Treated" = "Treated", "as.factor(Treatment_A)Vol_Treated" = "Vol. Treated", + "as.factor(Treatment_C)No Info 2" = "No Info 2", "as.factor(Treatment_C)No Video 1" = "No Video 1", + "as.factor(Treatment_C)No Video 2" = "No Video 2", "as.factor(Treatment_C)Video 1" = "Video 1", + "as.factor(Treatment_C)Video 2" = "Video 2", "Z_Mean_NR" = "NR-Index", "as.factor(Gender)2" = "Female", + "Age_mean" = "Age", "QFIncome" = "Income"), stars = c(0.01, 0.05, 0.1), + file="Tables/ols/optout.tex") + + +# Main model +texreg(l=list(mxl_wtp_case_a_rentINT), + custom.coef.map = list("mu_natural" = "Naturalness", "mu_walking" = "Walking Distance", "mu_rent" = "Rent", + "ASC_sq" = "ASC SQ", "sig_natural" = "Naturalness SD", "sig_walking" = "Walking Distance SD", + "sig_rent" = "Rent SD", "sig_ASC_sq" = "ASC SD", + "mu_nat_T" = "Naturalness X Treated", "mu_wd_T" = "Walking Distance X Treated", "mu_rent_T" = "Rent X Treated", + "mu_asc_T" = "ASC X Treated", "mu_nat_VT" = "Naturalness X Vol. Treated", "mu_wd_VT" = "Walking Distance X Vol. Treated", + "mu_rent_VT" = "Rent X Vol. Treated", "mu_asc_VT" = "ASC X Vol. Treated"), + stars = c(0.01, 0.05, 0.1), override.se = mxl_wtp_case_a_rentINT$robse, file="Tables/mxl/case_A_rent_INT.tex") diff --git a/Scripts/data_prep.R b/Scripts/data_prep.R index 92173bb46678247e5d0ae65114829a1aee0814a8..6261dcaa760d8ce911a871eb9ad95e4bfa971b77 100644 --- a/Scripts/data_prep.R +++ b/Scripts/data_prep.R @@ -6,12 +6,12 @@ database_full <- database_full %>% rename(Gender = "Q03W123", Education = "Q06W1 Conseq_Money = "Q29W3") -database_full <- database_full %>% mutate(Gender = recode(Gender, "A1" = 1, "A2" = 2, "A3"=3), - Education = recode(Education, "A1" = 1, "A2" = 2, "A3"=3, "A4" = 4, "A5" = 5), - Employment_type = recode(Employment_type, "A1" = 1, "A2" = 2, "A3"=3, "A4" = 4, +database_full <- database_full %>% mutate(Gender = dplyr::recode(Gender, "A1" = 1, "A2" = 2, "A3"=3), + Education = dplyr::recode(Education, "A1" = 1, "A2" = 2, "A3"=3, "A4" = 4, "A5" = 5), + Employment_type = dplyr::recode(Employment_type, "A1" = 1, "A2" = 2, "A3"=3, "A4" = 4, "A5" = 5, "A6" = 6), - Conseq_UGS = recode(Conseq_UGS, "A1" = 5, "A2" = 4, "A3"=3, "A4" = 2, "A5" = 1, "A6" = NA_real_), - Conseq_Money = recode(Conseq_Money, "A1" = 5, "A2" = 4, "A3"=3, "A4" = 2, "A5" = 1, "A6" = NA_real_)) + Conseq_UGS = dplyr::recode(Conseq_UGS, "A1" = 5, "A2" = 4, "A3"=3, "A4" = 2, "A5" = 1, "A6" = NA_real_), + Conseq_Money = dplyr::recode(Conseq_Money, "A1" = 5, "A2" = 4, "A3"=3, "A4" = 2, "A5" = 1, "A6" = NA_real_)) database_full <- database_full %>% mutate(Gender_female = case_when(Gender == 2 ~1, TRUE~0), Age = 2023-Birthyear,