## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.4.0 ✔ purrr 0.3.4
## ✔ tibble 3.1.7 ✔ dplyr 1.0.9
## ✔ tidyr 1.2.0 ✔ stringr 1.5.0
## ✔ readr 2.1.2 ✔ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## here() starts at /home/vboyce/Research/mia23
These visualizations are based on 120 submissions.
Process data
dt = dt%>%
filter(Name != "Test" ) %>%
distinct(Name, .keep_all=TRUE)
longify = function(data){
Words = unlist(strsplit(gsub("\"|\\[|\\]| |\n", "", as.character(data$Words)), ","))
Responses = unlist(strsplit(gsub("\"|\\[|\\]| |\n", "", as.character(data$Responses)), ","))
if(length(Words) == length(Responses)){
out = data.frame(word = Words, response = Responses)
}
else {
Warning = paste("Warning: Longify failes for subject", unique(data$Name))
out = data.frame(word = Warning, response = NA)
}
return(out)
}
dt_long = dt %>%
group_by(Name) %>%
do(longify(.)) %>%
drop_na()
list_info = read.csv(here("data_4",'valence_ratings.csv'))
list_info$word = as.character(list_info$word)
dt_long = dt_long %>%
left_join(list_info, by = "word") |>
mutate(response=as.numeric(response)) |>
filter(!is.na(valence)) # "hostage" and "mutilate" don't have ratings
How well are words remembered as a function of valence?
dt_long %>%
group_by(valence) %>%
ggplot(aes(x = valence, y = response, color=valence))+
stat_summary(fun.data = "mean_cl_boot")+
theme_classic()+
scale_color_manual(values=c("negative"="red", "neutral"="blue","positive"="green"))+
theme(legend.position = "none")+
ylab("Proportion remembered")+
coord_cartesian(ylim=c(0,.5))
ggsave(here(images, "valence.png"), dev="png")
More strongly valenced words (either positive or negative) are remembered better than neutral.
Which words are remembered best?
dt_long %>%
group_by(word) %>%
summarise(prop_remb = sum(as.numeric(response))/n()) %>%
arrange(-prop_remb)
## # A tibble: 43 × 2
## word prop_remb
## <chr> <dbl>
## 1 mother 0.624
## 2 love 0.615
## 3 laughter 0.603
## 4 baby 0.5
## 5 slaughter 0.487
## 6 kiss 0.470
## 7 murderer 0.444
## 8 depression 0.427
## 9 leprosy 0.419
## 10 rainbow 0.402
## # … with 33 more rows
How does presentation order affect memory?
dt_serial = dt_long %>%
group_by(Name) %>%
mutate(serial_position = 1:n()) %>%
mutate(serial_category = ifelse(serial_position <6, "primacy", ifelse(serial_position>40, "recency", "middle"))) %>%
mutate(serial_category = factor(serial_category,levels = c("primacy", "middle", "recency"))) %>%
ungroup()
dt_serial %>%
group_by(serial_category) %>%
ggplot(aes(serial_category, response))+
stat_summary(fun.data = "mean_cl_boot")+
theme_classic()+
coord_cartesian(ylim=c(0,.6))
Words presented in the first or last 5 words are remembered better than
the ones in the middle.
This is also seen continuously.
dt_serial %>%
group_by(serial_position) %>%
ggplot(aes(serial_position, response))+
stat_summary(fun.data = "mean_cl_boot")+
theme_classic()+
geom_smooth()+
ylab("Proportion remembered")+
coord_cartesian(ylim=c(0,.7))
ggsave(here(images, "time.png"), dev="png")
The earliest words are remembered best, declining over the first 10 or so words (primacy effect). Then in the middle memory is steady, but there’s a recency effect on the last 5 or so words.
dt_serial %>%
group_by(serial_category, valence) %>%
ggplot(aes(serial_category, response, group= valence, color=valence))+
stat_summary(fun.data = "mean_cl_boot", position=position_dodge(.2))+
scale_color_manual(values=c("red", "green", "blue"))+
theme_classic()+
ylab("Proportion remembered")+
coord_cartesian(ylim=c(0,.7))
ggsave(here(images, "valence_time.png"), dev="png")
The primacy effect is strong regardless of valence. Recency effect is strongest for valenced words. In the middle section, emotionally valenced words are remembed much better than neutral words.
dt_serial %>%
group_by(serial_position, valence)%>%
ggplot(aes(serial_position, response, group= valence, col=valence))+
geom_smooth(alpha = 0.5)+
stat_summary(fun.data = "mean_cl_boot", position=position_dodge(.2), geom="point")+
scale_fill_manual(values=c("red", "green", "blue"))+
theme_classic()+
coord_cartesian(ylim=c(0,.8))+
ylab("Proportion remembered")