Lewis and Frank (2018) raw data.
RAW_EXPERIMENTAL_DATA <- "no_dups_data_munged_A.csv"
EXPERIMENT_METADATA <- "experiment_key.csv"
all_d <- read_csv(RAW_EXPERIMENTAL_DATA)
exp_key <- read_csv(EXPERIMENT_METADATA) %>%
mutate(order = gsub("\"", "", order),
exp = as.character(exp)) %>%
mutate_if(is.character, as.factor)
Munge data.
all_d_clean <- all_d %>%
mutate(exp = as.character(exp),
condition = fct_recode(condition, three_subordinate = "3sub",
three_basic = "3bas",
three_superordinate = "3sup")) %>%
mutate_if(is.character, as_factor) %>%
select(exp, everything()) %>%
left_join(exp_key %>% select(exp, order, timing)) %>%
rename(stim_category = category,
training_number = condition,
presentation_style = timing)
kable(count(all_d_clean, training_number))
| training_number | n |
|---|---|
| three_basic | 1560 |
| three_subordinate | 1560 |
| three_superordinate | 1560 |
| one | 1560 |
Get subject mean across stimuli category.
ms <- all_d_clean %>%
filter(training_number == "one" | training_number == "three_subordinate") %>%
gather(variable, value, c(prop_sub, prop_bas, prop_sup)) %>%
filter(variable == "prop_bas") %>%
group_by(subids, presentation_style, order, training_number) %>%
summarize(prop_bas = mean(value))
Filter to “first” trials only.
group_first_ms <- ms %>%
filter(
(training_number == "three_subordinate" & order == "3-1") |
(training_number == "one" & order == "1-3")) %>%
group_by(presentation_style, training_number) %>%
tidyboot_mean(column = prop_bas, na.rm = TRUE)
ggplot(group_first_ms,
aes(x = presentation_style, y = mean, group = training_number, fill = training_number)) +
geom_bar(position = "dodge", stat = "identity") +
geom_linerange(aes(ymin = ci_lower,
ymax = ci_upper),
position = position_dodge(width = .9)) +
ylim(0, 1) +
ylab("Prop. basic-level choices") +
theme_classic(base_size = 12)
kable(group_first_ms, digits = 2)
| presentation_style | training_number | n | empirical_stat | ci_lower | mean | ci_upper |
|---|---|---|---|---|---|---|
| sequential | three_subordinate | 122 | 0.30 | 0.24 | 0.30 | 0.36 |
| sequential | one | 129 | 0.66 | 0.60 | 0.66 | 0.73 |
| simultaneous | three_subordinate | 134 | 0.20 | 0.14 | 0.20 | 0.25 |
| simultaneous | one | 135 | 0.59 | 0.53 | 0.59 | 0.66 |
t-test of “three” trials
t.test(prop_bas ~ presentation_style, ms %>%
filter(training_number == "three_subordinate" & order == "3-1"))
##
## Welch Two Sample t-test
##
## data: prop_bas by presentation_style
## t = 2.5693, df = 243.99, p-value = 0.01079
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 0.02456515 0.18598048
## sample estimates:
## mean in group sequential mean in group simultaneous
## 0.3005464 0.1952736
t-test of “one” trials
t.test(prop_bas ~ presentation_style, ms %>%
filter(training_number == "one" & order == "1-3"))
##
## Welch Two Sample t-test
##
## data: prop_bas by presentation_style
## t = 1.4525, df = 260.72, p-value = 0.1476
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -0.02494865 0.16523002
## sample estimates:
## mean in group sequential mean in group simultaneous
## 0.6614987 0.5913580