# Load the four data files and only keep the useful columns
prolific_export = read_csv(paste0(exp1_datapath, "prolific_export.csv")) %>%
select(participant_id,
entered_code,
time_taken,
age,
country = `Current Country of Residence`,
sex = Sex)
results = read_csv(paste0(exp1_datapath, "results.csv")) %>%
select(participant_id,
fund_allocation_southeast_asia = fundAllocation_UNHCR,
fund_allocation_middle_east = fundAllocation_IOM,
donation_allocation_southeast_asia = donationAllocation) %>%
mutate(fund_allocation_difference = fund_allocation_southeast_asia - fund_allocation_middle_east)
excluded = read_csv(paste0(exp1_datapath, "excluded.csv")) %>%
select(participant_id,
failed_attention_check,
reloaded) %>%
mutate(participant_id = as.character(participant_id)) # necessary if all are NAs
agreed = read_csv(paste0(exp1_datapath, "all_who_agreed.csv")) %>%
select(participant_id,
condition)
# Join the four datasets and clean up a bit
data_all = agreed %>%
left_join(excluded, by = "participant_id") %>%
left_join(prolific_export, by = "participant_id") %>%
full_join(results, by = "participant_id") %>%
subset(!participant_id %in% exclude_participant_ids) %>%
mutate(failed_attention_check = coalesce(failed_attention_check, 0), # replace NAs with zeros
reloaded = coalesce(reloaded, 0))
# Clean up possibly serious anomalies in the data and issue warnings if necessary
data_all_original = data_all
data_all = data_all %>%
drop_na(participant_id, condition) %>%
distinct(participant_id, .keep_all= TRUE)
# if (nrow(data_all) != nrow(data_all_original)) {
# cat("WARNING -- Data has duplicate participants, missing participant IDs, or missing conditions:")
# anti_join(data_all_original, data_all)
# }
# Create another dataset with completed submissions only
exp1_data = data_all %>%
filter(entered_code == exp1_completion_code)
# Split datasets according to the condition
data_all_rich_first = data_all %>% filter(condition == "richFirst")
data_all_poor_first = data_all %>% filter(condition == "poorFirst")
data_rich_first = exp1_data %>% filter(condition == "richFirst")
data_poor_first = exp1_data %>% filter(condition == "poorFirst")
# Load the four data files and only keep the useful columns
prolific_export = read_csv(paste0(exp2_datapath, "prolific_export.csv")) %>%
dplyr::select(participant_id,
entered_code,
time_taken,
age,
country = `Current Country of Residence`,
sex = Sex)
results = read_csv(paste0(exp2_datapath, "results.csv")) %>%
dplyr::select(participant_id,
donation,
valence,
arousal
) %>%
mutate(donation = 100 - donation) # Donation for cause B
excluded = read_csv(paste0(exp2_datapath, "excluded.csv")) %>%
dplyr::select(participant_id,
failed_attention_check,
reloaded) %>%
mutate(participant_id = as.character(participant_id)) # necessary if all are NAs
agreed = read_csv(paste0(exp2_datapath, "all_who_agreed.csv")) %>%
dplyr::select(participant_id,
condition,
design,
identity)
# Join the four datasets and clean up a bit
data_all = agreed %>%
left_join(excluded, by = "participant_id") %>%
left_join(prolific_export, by = "participant_id") %>%
full_join(results, by = "participant_id") %>%
subset(!participant_id %in% exclude_participant_ids) %>%
mutate(failed_attention_check = coalesce(failed_attention_check, 0), # replace NAs with zeros
reloaded = coalesce(reloaded, 0)) %>%
mutate(
identity = case_when(
identity == "NonAnonymous" ~ "Named",
identity == "Anonymous" ~ identity
),
design = case_when(
design == "Anthropographic" ~ "Rich",
design == "NonAnthropographic" ~ "Poor"
),
condition = paste(identity, design, sep = "_")
)
# Clean up possibly serious anomalies in the data and issue warnings if necessary
data_all_original = data_all
data_all = data_all %>%
drop_na(participant_id, condition) %>%
distinct(participant_id, .keep_all= TRUE)
if (nrow(data_all) != nrow(data_all_original)) {
cat("WARNING -- Found duplicate participant IDs or data with missing participant ID or missing condition. This data was discarded:")
anti_join(data_all_original, data_all)
}
# Create another dataset with completed submissions only
exp2_data = data_all %>% dplyr::filter(entered_code == exp2_completion_code)
# Clean up possibly serious anomalies in the data and issue warnings if necessary
data_original = exp2_data
exp2_data = exp2_data %>%
drop_na(donation, valence, arousal)
if (nrow(exp2_data) != nrow(data_original)) {
cat("WARNING -- Found completed submissions with missing DVs (donation, valence or arousal). This data was discarded:")
anti_join(data_original, exp2_data)
}
# Split datasets according to the condition
data_all_ar = data_all %>% dplyr::filter(condition == "Anonymous_Rich")
data_all_ap = data_all %>% dplyr::filter(condition == "Anonymous_Poor")
data_all_nr = data_all %>% dplyr::filter(condition == "Named_Rich")
data_all_np = data_all %>% dplyr::filter(condition == "Named_Poor")
data_ar = exp2_data %>% dplyr::filter(condition == "Anonymous_Rich")
data_ap = exp2_data %>% dplyr::filter(condition == "Anonymous_Poor")
data_nr = exp2_data %>% dplyr::filter(condition == "Named_Rich")
data_np = exp2_data %>% dplyr::filter(condition == "Named_Poor")
## WARNING -- Found duplicate participant IDs or data with missing participant ID or missing condition. This data was discarded:
## WARNING -- Found completed submissions with missing DVs (donation, valence or arousal). This data was discarded:
Data
The experiment had 4 conditions:
exp2_data %>%
count(condition)
We use Cohen’s d and probability of superiority as standardized effect sizes. We interpret the effect sizes based on the work of Lakens (2013).
- Lakens, D. (2013). Calculating and reporting effect sizes to facilitate cumulative science: a practical primer for t-tests and ANOVAs. Frontiers in psychology, 4, 863.
Primary effect of experiment 2
DV1 = mean donation allocation to cause B (migrants in need helped by UNHCR) [Range: 0, 100]
effect 1 = Cohen’s d between DV1 in information-rich conditions (both anonymous and named) and DV1 in information-poor conditions (both anonymous and named)
# DV1 in Rich conditions
exp2_DV1_r = exp2_data %>%
dplyr::filter(design == "Rich") %>%
dplyr::pull(donation)
# DV1 in Poor conditions
exp2_DV1_p = exp2_data %>%
dplyr::filter(design == "Poor") %>%
dplyr::pull(donation)
exp2_effect1.d = cohen.d(exp2_DV1_r, exp2_DV1_p)
exp2_effect1.ps = ps(exp2_effect1.d)
print_effect("Cohen's d", exp2_effect1.d)
print_effect("Probability of superiority", exp2_effect1.ps, plot = F)
## Cohen's d : 0.14, 95% CI [-0.0011, 0.28]
## Probability of superiority : 0.54, 95% CI [0.5, 0.58]
There is a 53.92% probability that an individual allocated more funds when s/he saw the information-rich visualization than the poor one.
Experiment 2 vs. Experiment 1
In the following, we show standardized effect sizes from experiment 1.
DV1 = standardized mean difference between funds allocated to the rich visualization and the poor visualization
DV1_rich = c(data_rich_first %>% pull(fund_allocation_southeast_asia),
data_poor_first %>% pull(fund_allocation_middle_east))
DV1_poor = c(data_rich_first %>% pull(fund_allocation_middle_east),
data_poor_first %>% pull(fund_allocation_southeast_asia))
effect1.d = cohen.d(DV1_rich, DV1_poor)
effect1.ps = ps(effect1.d)
print_effect("Cohen's d", effect1.d)
print_effect("Probability of superiority", effect1.ps, plot = F)
## Cohen's d : 0.12, 95% CI [-0.13, 0.37]
## Probability of superiority : 0.53, 95% CI [0.46, 0.6]
DV2 = Percentage of global UNHCR funds allocated to SouthEast Asia (the rest being allocated to other parts of the world)
DV2_rich = data_rich_first %>% pull(fund_allocation_southeast_asia)
DV2_poor = data_poor_first %>% pull(fund_allocation_southeast_asia)
effect2.d = cohen.d(DV2_rich, DV2_poor)
effect2.ps = ps(effect2.d)
print_effect("Cohen's d", effect2.d)
print_effect("Probability of superiority", effect2.ps, plot = F)
## Cohen's d : 0.18, 95% CI [-0.17, 0.53]
## Probability of superiority : 0.55, 95% CI [0.45, 0.65]
DV3 = Percentage of personal money donated to the rich visualization compared to the amount donated to the poor visualization scenario
DV3_rich = c(data_rich_first %>% pull(donation_allocation_southeast_asia),
data_poor_first %>%
mutate(donation_allocation_middle_east = 100 - donation_allocation_southeast_asia) %>%
pull(donation_allocation_middle_east))
DV3_poor = c(data_rich_first %>%
mutate(donation_allocation_middle_east = 100 - donation_allocation_southeast_asia) %>%
pull(donation_allocation_middle_east),
data_poor_first %>% pull(donation_allocation_southeast_asia))
effect3.d = cohen.d(DV3_rich, DV3_poor)
effect3.ps = ps(effect3.d)
print_effect("Cohen's d", effect3.d)
print_effect("Probability of superiority", effect3.ps, plot = F)
## Cohen's d : -0.12, 95% CI [-0.37, 0.13]
## Probability of superiority : 0.47, 95% CI [0.4, 0.54]
The following chat corresponds to the primary effect of experiment 2 and the three effects of experiment 1, respectively.
plotAllCIs(lim = c(-1, 1), xlabel = "Percent increase in donations for information-rich visualizations", ylabel = NULL, yreorder = c(2,3,4,1), ylabels = c("EXP1 - DV1","EXP1 - DV2","EXP1 - DV3","EXP2 - DV1"))
ggsave(filename = "../../../paper-figures/standardized-effects.pdf", dpi = 300, width = 6, height = 2)