# ABNORMAL EXPLANATION: STATISTICAL NORM
df.stat_abnormal_data = read.csv(file = "../../data/statistical_abnormal.csv",
stringsAsFactors = F) %>%
filter(row_number() > 2) %>% # additional rows in qualtrics csv
clean_names() %>%
filter(!status == "Survey Preview", # exclude preview trials,
!ethnicity == "") # exclude people who did not make until it demographics
# Reference clip Learning Trial and Judgment: Darkrm Motion Block is top, Ball A
# is abnormal (Recode values of DB condition)
# Reference Slider: Conjunctive on the right side (100 - Definitely Conjunctive,
# 0 - Definitely Disjunctive) (Recode Conj_Left Condition)
df.stat_abnormal_judgments = df.stat_abnormal_data %>%
mutate(participant = 1:n()) %>%
select(conj_a_db_1,
conj_b_db_1,
conj_db_1,
conj_a_dt_1,
conj_b_dt_1,
conj_dt_1,
disj_a_db_1,
disj_b_db_1,
disj_db_1,
disj_a_dt_1,
disj_b_dt_1,
disj_dt_1,
exp_conj_db,
exp_conj_dt,
exp_disj_db,
exp_disj_dt,
abnormal_b_conj_left_1,
abnormal_b_con_right_1,
abnormal_a_conj_left_1,
abnormal_b_con_righ_1,
condition,
structure,
participant) %>%
pivot_longer(cols = -c(participant, condition, structure),
names_to = "index",
values_to = "value") %>%
filter(value != "") %>%
mutate(index = ifelse(str_detect(index, "abnormal"),
"judgment",
index))%>%
mutate(index = ifelse(str_detect(index, "conj_a_db_1|conj_a_dt_1"),
"conjunctive_ball_a",
index))%>%
mutate(index = ifelse(str_detect(index, "conj_b_db_1|conj_b_dt_1"),
"conjunctive_ball_b",
index))%>%
mutate(index = ifelse(str_detect(index, "conj_db_1|conj_dt_1"),
"conjunctive",
index))%>%
mutate(index = ifelse(str_detect(index, "disj_a_db_1|disj_a_dt_1"),
"disjunctive_ball_a",
index))%>%
mutate(index = ifelse(str_detect(index, "disj_b_db_1|disj_b_dt_1"),
"disjunctive_ball_b",
index))%>%
mutate(index = ifelse(str_detect(index, "disj_db_1|disj_dt_1"),
"disjunctive",
index))%>%
mutate(index = ifelse(str_detect(index, "exp_conj_db|exp_conj_dt"),
"conjunctive_selection",
index))%>%
mutate(index = ifelse(str_detect(index, "exp_disj_db|exp_disj_dt"),
"disjunctive_selection",
index))%>%
mutate(value = as.numeric(value),
value = ifelse(test = (condition == "DB" & str_detect(index, "ball")),
yes = 100 - value,
no = value),
value = ifelse((condition == "DB" & str_detect(index, "selection")),
3 - value,
value)) %>%
pivot_wider(names_from = index,
values_from = value) %>%
mutate(conjunctive_selection = factor(conjunctive_selection,
levels = 1:2,
labels = c("abnormal", "normal")))%>%
mutate(disjunctive_selection = factor(disjunctive_selection,
levels = 1:2,
labels = c("abnormal", "normal")))%>%
mutate(judgment = ifelse(structure =="Conj_Left",
100 - judgment,
judgment)) %>%
rename(conjunctive_ball_abnormal = conjunctive_ball_a,
conjunctive_ball_normal = conjunctive_ball_b,
disjunctive_ball_abnormal = disjunctive_ball_a,
disjunctive_ball_normal = disjunctive_ball_b) %>%
arrange(participant) %>%
# define exclusion criteria
mutate(exclude = ifelse((conjunctive_ball_abnormal < conjunctive_ball_normal) &
(disjunctive_ball_abnormal < disjunctive_ball_normal) &
(conjunctive < 50) &
(disjunctive > 50), 0, 1))
# ABNORMAL EXPLANATION: PRESCRIPTIVE NORM
df.pres_abnormal_data = read.csv(file = "../../data/prescriptive_abnormal.csv",
stringsAsFactors = F) %>%
filter(row_number() > 2) %>% # additional rows in qualtrics csv
clean_names() %>%
filter(!status == "Survey Preview", #exclude preview trials,
!ethnicity == "") # exclude people who did not make until demographics
# reference clip:
# Billy is the abnormal agent (Recode Norm Condition ="2")
# Cojunctive Structure is at the top scale (100) (Recode ConjLeft Condition)
df.pres_abnormal_judgments = df.pres_abnormal_data %>%
mutate(participant = 1:n()) %>%
select(b_abnorm_conj_billy1_1:s_selected_conj_right_1,
structure,
norm_condition,
participant,
-starts_with("x45"),
-starts_with("s89"),
-starts_with("q"),
-starts_with("check"),
-starts_with("timing")) %>%
pivot_longer(cols = -c(participant, structure, norm_condition),
names_to = "index",
values_to = "value") %>%
filter(value != "") %>%
mutate(index = ifelse(str_detect(index, "selected"),
"judgment",
index))%>%
mutate(index = ifelse(str_detect(index, "b_abnorm_conj_billy|s_abnorm_conj_billy"),
"conjunctive_agreement_billy",
index))%>%
mutate(index = ifelse(str_detect(index, "b_abnorm_conj_suzy|s_abnorm_conj_suzy"),
"conjunctive_agreement_suzy",
index))%>%
mutate(index = ifelse(str_detect(index, "b_abnorm_conjunctive|s_abnorm_conjunctive"),
"conjunctive",
index))%>%
mutate(index = ifelse(str_detect(index, "b_abnorm_conj_exp|s_abnorm_conj_exp"),
"conjunctive_selection",
index))%>%
mutate(index = ifelse(str_detect(index, "b_abnorm_disj_billy|s_abnorm_disj_billy"),
"disjunctive_agreement_billy",
index))%>%
mutate(index = ifelse(str_detect(index, "b_abnorm_disj_suzy|s_abnorm_disj_suzy"),
"disjunctive_agreement_suzy",
index))%>%
mutate(index = ifelse(str_detect(index, "b_abnorm_disjunctive|s_abnorm_disjunctive"),
"disjunctive",
index))%>%
mutate(index = ifelse(str_detect(index, "b_abnorm_disj_exp|s_abnorm_disj_exp"),
"disjunctive_selection",
index))%>%
mutate(value = as.numeric(value),
value = ifelse(test = (norm_condition == "2" & str_detect(index, "agreement")),
yes = 100 - value,
no = value),
value = ifelse((norm_condition == "2" & str_detect(index, "selection")),
3 - value,
value))%>%
pivot_wider(names_from = index,
values_from = value) %>%
mutate(conjunctive_selection = factor(conjunctive_selection,
levels = 1:2,
labels = c("abnormal", "normal"))) %>%
mutate(disjunctive_selection = factor(disjunctive_selection,
levels = 1:2,
labels = c("abnormal", "normal")))%>%
mutate(judgment = ifelse(structure =="ConjLeft",
100 - judgment,
judgment)) %>%
rename(conjunctive_agent_abnormal = conjunctive_agreement_billy,
conjunctive_agent_normal = conjunctive_agreement_suzy,
disjunctive_agent_abnormal = disjunctive_agreement_billy,
disjunctive_agent_normal = disjunctive_agreement_suzy) %>%
arrange(participant) %>%
# define exclusion criteria
mutate(exclude = ifelse(
test = (conjunctive_agent_abnormal < conjunctive_agent_normal) &
(disjunctive_agent_abnormal < disjunctive_agent_normal) &
(conjunctive < 50) &
(disjunctive > 50),
yes = 0,
no = 1))
# NORMAL EXPLANATION: STATISTICAL NORMS
df.stat_normal_data = read.csv(file = "../../data/statistical_normal.csv",
stringsAsFactors = F) %>%
filter(row_number() > 2) %>% # additional rows in qualtrics csv
clean_names() %>%
filter(!status == "Survey Preview", # exclude preview trials,
!ethnicity == "") # exclude people who did not make until it demographics, i.e. incomplete data
# Reference clip Learning Trial and Judgment: Dark Motion Block is top, Ball A is abnormal
# (Recode values of DB condition)
# Reference Slider: Conjunctive on the right side (100 - Definitely Conjunctive,
# 0 - Definitely Disjunctive) (Recode Conj_Left Condition)
df.stat_normal_judgments = df.stat_normal_data %>%
mutate(participant = 1:n()) %>%
select(conj_a_db_1,
conj_b_db_1,
conj_db_1,
conj_a_dt_1,
conj_b_dt_1,
conj_dt_1,
disj_a_db_1,
disj_b_db_1,
disj_db_1,
disj_a_dt_1,
disj_b_dt_1,
disj_dt_1,
exp_conj_db,
exp_conj_dt,
exp_disj_db,
exp_disj_dt,
normal_a_conj_left_1,
normal_a_con_right_1,
normal_b_conj_left_1,
normal_b_con_right_1,
condition,
structure,
participant) %>%
pivot_longer(cols = -c(participant, condition, structure),
names_to = "index",
values_to = "value") %>%
filter(value != "") %>%
mutate(index = ifelse(str_detect(index, "normal"),
"judgment",
index))%>%
mutate(index = ifelse(str_detect(index, "conj_a_db_1|conj_a_dt_1"),
"conjunctive_ball_a",
index))%>%
mutate(index = ifelse(str_detect(index, "conj_b_db_1|conj_b_dt_1"),
"conjunctive_ball_b",
index))%>%
mutate(index = ifelse(str_detect(index, "conj_db_1|conj_dt_1"),
"conjunctive",
index))%>%
mutate(index = ifelse(str_detect(index, "disj_a_db_1|disj_a_dt_1"),
"disjunctive_ball_a",
index))%>%
mutate(index = ifelse(str_detect(index, "disj_b_db_1|disj_b_dt_1"),
"disjunctive_ball_b",
index))%>%
mutate(index = ifelse(str_detect(index, "disj_db_1|disj_dt_1"),
"disjunctive",
index))%>%
mutate(index = ifelse(str_detect(index, "exp_conj_db|exp_conj_dt"),
"conjunctive_selection",
index))%>%
mutate(index = ifelse(str_detect(index, "exp_disj_db|exp_disj_dt"),
"disjunctive_selection",
index))%>%
mutate(value = as.numeric(value),
value = ifelse(test = (condition == "DB" & str_detect(index, "ball")),
yes = 100 - value,
no = value),
value = ifelse((condition == "DB" & str_detect(index, "selection")),
3 - value,
value)) %>%
pivot_wider(names_from = index,
values_from = value) %>%
mutate(conjunctive_selection = factor(conjunctive_selection,
levels = 1:2,
labels = c("abnormal", "normal")))%>%
mutate(disjunctive_selection = factor(disjunctive_selection,
levels = 1:2,
labels = c("abnormal", "normal")))%>%
mutate(judgment = ifelse(structure =="Conj_Left",
100 - judgment,
judgment)) %>%
rename(conjunctive_ball_abnormal = conjunctive_ball_a,
conjunctive_ball_normal = conjunctive_ball_b,
disjunctive_ball_abnormal = disjunctive_ball_a,
disjunctive_ball_normal = disjunctive_ball_b) %>%
arrange(participant) %>%
# define exclusion criteria
mutate(exclude = ifelse((conjunctive_ball_abnormal < conjunctive_ball_normal) &
(disjunctive_ball_abnormal < disjunctive_ball_normal) &
(conjunctive < 50) &
(disjunctive > 50), 0, 1))
# NORMAL EXPLANATION: PRESCRIPTIVE NORMS
df.pres_normal_data = read.csv(file = "../../data/prescriptive_normal.csv",
stringsAsFactors = F) %>%
filter(row_number() > 2) %>% # additional rows in qualtrics csv
clean_names() %>%
filter(!status == "Survey Preview", # exclude preview trials,
!ethnicity == "") # exclude people who did not make until demographics
# reference clip:
# Billy is the abnormal agent, Suzy the normal agent (recode Norm Condition 2)
# Cojunctive Structure is at the top scale (100) (Recode Structure Condition 'ConjLeft')
df.pres_normal_judgments = df.pres_normal_data %>%
mutate(participant = 1:n()) %>%
select(s_norm_conj_billy1_1:b_selected_conj_right_1,
structure,
norm_condition,
participant,
-starts_with("x45"),
-starts_with("s89"),
-starts_with("q"),
-starts_with("check"),
-starts_with("timing")) %>%
pivot_longer(cols = -c(participant, structure, norm_condition),
names_to = "index",
values_to = "value") %>%
filter(value != "") %>%
mutate(index = ifelse(str_detect(index, "selected"),
"judgment",
index))%>%
mutate(index = ifelse(str_detect(index, "s_norm_conj_billy|b_norm_conj_billy"),
"conjunctive_agreement_billy",
index))%>%
mutate(index = ifelse(str_detect(index, "s_norm_conj_suzy|b_norm_conj_suzy"),
"conjunctive_agreement_suzy",
index))%>%
mutate(index = ifelse(str_detect(index, "s_norm_conjunctive|b_norm_conjunctive"),
"conjunctive",
index))%>%
mutate(index = ifelse(str_detect(index, "s_norm_conj_exp|b_norm_conj_exp"),
"conjunctive_selection",
index))%>%
mutate(index = ifelse(str_detect(index, "s_norm_disj_billy|b_norm_disj_billy"),
"disjunctive_agreement_billy",
index))%>%
mutate(index = ifelse(str_detect(index, "s_norm_disj_suzy|b_norm_disj_suzy"),
"disjunctive_agreement_suzy",
index))%>%
mutate(index = ifelse(str_detect(index, "s_norm_disjunctive|b_norm_disjunctive"),
"disjunctive",
index))%>%
mutate(index = ifelse(str_detect(index, "s_norm_disj_exp|b_norm_disj_exp"),
"disjunctive_selection",
index))%>%
mutate(value = as.numeric(value),
value = ifelse(test = (norm_condition == "2" & str_detect(index, "agreement")),
yes = 100 - value,
no = value),
value = ifelse(test = (norm_condition == "2" & str_detect(index, "selection")),
yes = 3 - value,
no = value))%>%
pivot_wider(names_from = index,
values_from = value) %>%
mutate(conjunctive_selection = factor(conjunctive_selection,
levels = 1:2,
labels = c("abnormal", "normal"))) %>%
mutate(disjunctive_selection = factor(disjunctive_selection,
levels = 1:2,
labels = c("abnormal", "normal")))%>%
mutate(judgment = ifelse(structure =="ConjLeft",
100 - judgment,
judgment)) %>%
rename(conjunctive_agent_abnormal = conjunctive_agreement_billy,
conjunctive_agent_normal = conjunctive_agreement_suzy,
disjunctive_agent_abnormal = disjunctive_agreement_billy,
disjunctive_agent_normal = disjunctive_agreement_suzy) %>%
arrange(participant) %>%
# define exclusion criteria
mutate(exclude = ifelse(
test = (conjunctive_agent_abnormal < conjunctive_agent_normal) &
(disjunctive_agent_abnormal < disjunctive_agent_normal) &
(conjunctive < 50) &
(disjunctive > 50),
yes = 0,
no = 1))
# COMBINE DATA
df.structure = df.stat_abnormal_judgments %>%
mutate(explanation = "abnormal") %>%
bind_rows(df.stat_normal_judgments %>%
mutate(explanation = "normal")) %>%
rename(conjunctive_abnormal = conjunctive_ball_abnormal,
conjunctive_normal = conjunctive_ball_normal,
disjunctive_abnormal = disjunctive_ball_abnormal,
disjunctive_normal = disjunctive_ball_normal) %>%
mutate(norm = "statistical") %>%
bind_rows(df.pres_abnormal_judgments %>%
mutate(explanation = "abnormal") %>%
bind_rows(df.pres_normal_judgments %>%
mutate(explanation = "normal")) %>%
rename(conjunctive_abnormal = conjunctive_agent_abnormal,
conjunctive_normal = conjunctive_agent_normal,
disjunctive_abnormal = disjunctive_agent_abnormal,
disjunctive_normal = disjunctive_agent_normal) %>%
mutate(norm = "prescriptive")) %>%
filter(exclude == 0) %>% # filter based on exclusion criteria
select(-c(norm_condition, structure)) %>%
rename(conjunctive_cause = conjunctive,
disjunctive_cause = disjunctive) %>%
mutate(participant = 1:n(),
across(c(contains("disjunctive"), contains("conjunctive")), ~ as.character(.))) %>%
pivot_longer(names_to = c("structure", "index"),
names_sep = "_",
cols = c(contains("disjunctive"), contains("conjunctive"))) %>%
pivot_wider(names_from = index,
values_from = value) %>%
mutate(across(c(cause, abnormal, normal), ~ as.numeric(.))) %>%
mutate(selection = factor(selection, levels = c("abnormal", "normal")),
structure = factor(structure, levels = c("conjunctive", "disjunctive")),
norm = factor(norm, levels = c("statistical", "prescriptive")))