Social Anxiety Predicts Enhanced Electrocortical Sensitivity to the Mental State Meanings Revealed by Gaze Patterns.
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
R · 577 lines · 25 KB · no license
- #############################################################################################################
- ##### SOCIAL ANXIETY PREDICTS THE TIMELINESS OF GAZE MEANING DETECTION: AN ELECTROCORTICAL INVESTIGATION ####
- ################## IRENE MELANI, MARTHA K. BERG, JAMES GLAZER, AND SHINOBU KITAYAMA #########################
- #############################################################################################################
- #load packages
- library(psych)
- library(lme4)
- library(lmerTest)
- library(ggplot2)
- library(emmeans)
- library(tidyverse)
- library(dplyr)
- library(Hmisc)
- library(patchwork)
- #set path
- setwd('C:\\Users\\irene\\Documents\\Michigan\\RME\\Data\\R Script')
- #########################
- # Load and prepare data
- #########################
- #load data
- RME <- read.csv('Data_RME.csv')
- CTRL <- read.csv('Data_CTRL.csv')
- #combine data from RME and Control tasks
- all <- rbind(RME, CTRL)
- #########################
- # Descriptive Statistics
- #########################
- #Descriptive statistics for RME condition
- #Main variables
- RME %>% group_by(Subject) %>% summarise(sex_cont = mean(sex_cont)) %>% count(sex_cont)
- RME %>%
- group_by(Subject) %>%
- summarise(
- age = mean(age),
- socanx = mean(socanx),
- accuracy = mean(accuracy),
- rt = mean(rt)) %>%
- summarise(
- age_mean = mean(age), age_sd = sd(age),
- socanx_mean = mean(socanx), socanx_sd = sd(socanx),
- acc_mean = mean(accuracy), acc_sd = sd(accuracy),
- rt_mean = mean(rt), rt_sd = sd(rt))
- #Supplementary variables
- RME %>%
- group_by(Subject) %>%
- summarise(
- indep = mean(indep),
- interdep = mean(interdep),
- open = mean(open),
- conscient = mean(conscient),
- extro = mean(extro),
- agree = mean(agree),
- neurot = mean(neurot)) %>%
- summarise(
- indep_mean = mean(indep, na.rm = TRUE), indep_sd = sd(indep, na.rm = TRUE),
- interdep_mean = mean(interdep, na.rm = TRUE), interdep_sd = sd(interdep, na.rm = TRUE),
- open_mean = mean(open), open_sd = sd(open),
- conscient_mean = mean(conscient), conscient_sd = sd(conscient),
- extro_mean = mean(extro), extro_sd = sd(extro),
- agree_mean = mean(agree), agree_sd = sd(agree),
- neurot_mean = mean(neurot), neurot_sd = sd(neurot))
- #Descriptive statistics for Control condition
- #Main variables
- CTRL %>% group_by(Subject) %>% summarise(sex_cont = mean(sex_cont)) %>% count(sex_cont)
- CTRL %>%
- group_by(Subject) %>%
- summarise(
- age = mean(age),
- socanx = mean(socanx),
- accuracy = mean(accuracy),
- rt = mean(rt)) %>%
- summarise(
- age_mean = mean(age), age_sd = sd(age),
- socanx_mean = mean(socanx), socanx_sd = sd(socanx),
- acc_mean = mean(accuracy), acc_sd = sd(accuracy),
- rt_mean = mean(rt), rt_sd = sd(rt))
- #Supplementary variables
- CTRL %>%
- group_by(Subject) %>%
- summarise(
- indep = mean(indep),
- interdep = mean(interdep),
- open = mean(open),
- conscient = mean(conscient),
- extro = mean(extro),
- agree = mean(agree),
- neurot = mean(neurot)) %>%
- summarise(
- indep_mean = mean(indep, na.rm = TRUE), indep_sd = sd(indep, na.rm = TRUE),
- interdep_mean = mean(interdep, na.rm = TRUE), interdep_sd = sd(interdep, na.rm = TRUE),
- open_mean = mean(open), open_sd = sd(open),
- conscient_mean = mean(conscient), conscient_sd = sd(conscient),
- extro_mean = mean(extro), extro_sd = sd(extro),
- agree_mean = mean(agree), agree_sd = sd(agree),
- neurot_mean = mean(neurot), neurot_sd = sd(neurot))
- #Compare descriptive statistics across tasks
- #Main variables
- prop.test(x = c(43, 25), n = c(57, 50))
- all %>% group_by(Subject, task) %>% summarise(age = mean(age)) %>% t.test(age ~ task, data = .)
- all %>% group_by(Subject, task) %>% summarise(socanx = mean(socanx)) %>% t.test(socanx ~ task, data = .)
- all %>% group_by(Subject, task) %>% summarise(accuracy = mean(accuracy)) %>% t.test(accuracy ~ task, data = .)
- all %>% group_by(Subject, task) %>% summarise(rt = mean(rt)) %>% t.test(rt ~ task, data = .)
- #Supplementary variables
- all %>% group_by(Subject, task) %>% summarise(indep = mean(indep)) %>% t.test(indep ~ task, data = .)
- all %>% group_by(Subject, task) %>% summarise(interdep = mean(interdep)) %>% t.test(interdep ~ task, data = .)
- all %>% group_by(Subject, task) %>% summarise(open = mean(open)) %>% t.test(open ~ task, data = .)
- all %>% group_by(Subject, task) %>% summarise(conscient = mean(conscient)) %>% t.test(conscient ~ task, data = .)
- all %>% group_by(Subject, task) %>% summarise(extro = mean(extro)) %>% t.test(extro ~ task, data = .)
- all %>% group_by(Subject, task) %>% summarise(agree = mean(agree)) %>% t.test(agree ~ task, data = .)
- all %>% group_by(Subject, task) %>% summarise(neurot = mean(neurot)) %>% t.test(neurot ~ task, data = .)
- ################
- # Main Analyses
- ################
- #Task Performance
- #Predict accuracy from congruence * social anxiety
- RME.accmod <- glmer(accuracy ~ sex_cont + c_socanx * congruence_cont + (1 | Subject) + (1 | FaceNum),
- data = RME, family = binomial)
- summary(RME.accmod)
- confint(RME.accmod)
- CTRL.accmod <- glmer(accuracy ~ sex_cont + c_socanx * congruence_cont + (1 | Subject) + (1 | FaceNum),
- data = CTRL, family = binomial)
- summary(CTRL.accmod)
- confint(CTRL.accmod)
- #Predict accuracy from congruence * social anxiety * task
- all.accmod <- glmer(accuracy ~ sex_cont + c_socanx * congruence_cont * task + (1 | Subject) + (1 | FaceNum),
- data = all, family = binomial)
- summary(all.accmod)
- confint(all.accmod)
- #Drop incorrectly answered trials for neural and reaction time analyses
- RME.correct <- subset(RME, RME$acc==1) #dropped 1573 trials = 21.71% of eligible trials
- CTRL.correct <- subset(CTRL, CTRL$acc==1) #dropped 999 trials = 15.41% of eligible trials
- all.correct <- rbind(RME.correct, CTRL.correct)
- #Perform analyses on correctly answered trials
- #N400 (Cz, CPz, Pz)
- #Predict amplitude from congruence * social anxiety
- RME.erpmod <- lmer(c_erp_avg ~ sex_cont + c_socanx * congruence_cont + (1 | Subject) + (1 | FaceNum),
- data = RME.correct, REML = TRUE)
- summary(RME.erpmod)
- confint(RME.erpmod)
- CTRL.erpmod <- lmer(c_erp_avg ~ sex_cont + c_socanx * congruence_cont + (1 | Subject) + (1 | FaceNum),
- data = CTRL.correct, REML = TRUE)
- summary(CTRL.erpmod)
- confint(CTRL.erpmod)
- #Predict amplitude from congruence * social anxiety * task
- all.erpmod <- lmer(c_erp_avg ~ sex_cont + c_socanx * congruence_cont * task + (1 | Subject) + (1 | FaceNum),
- data = all.correct, REML = TRUE)
- summary(all.erpmod)
- confint(all.erpmod)
- #Response Time
- #Predict RT from congruence * social anxiety
- RME.rtmod <- lmer(rt ~ sex_cont + c_socanx * congruence_cont + (1 | Subject) + (1 | FaceNum),
- data = RME.correct, REML = TRUE)
- summary(RME.rtmod)
- confint(RME.rtmod)
- CTRL.rtmod <- lmer(rt ~ sex_cont + c_socanx * congruence_cont + (1 | Subject) + (1 | FaceNum),
- data = CTRL.correct, REML = TRUE)
- summary(CTRL.rtmod)
- confint(CTRL.rtmod)
- #Predict RT from congruence * social anxiety * task
- all.rtmod <- lmer(rt ~ sex_cont + c_socanx * congruence_cont * task + (1 | Subject) + (1 | FaceNum),
- data = all.correct, REML = TRUE)
- summary(all.rtmod)
- confint(all.rtmod)
- ##############
- # Plot Figure
- ##############
- #Increase computing power so that the subsequent command can be run
- emm_options(pbkrtest.limit = 11158, lmerTest.limit = 11158)
- #Compute estimated marginal means from the ERP model for plotting
- figure_pred <- emmeans(all.erpmod, ~c_socanx * congruence_cont * task,
- at = list(c_socanx = c(-1.5, -1, -0.5, 0, 0.5, 1, 1.5),
- congruence_cont = c(-0.5, 0.5),
- task = c(0.5, -0.5))) %>%
- as.data.frame() %>%
- mutate(Congruence = congruence_cont %>% recode(`-0.5` = "Incongruent", `0.5` = "Congruent")) %>%
- mutate(Condition = task %>% recode(`0.5` = "RME Task", `-0.5` = "Control Task"))
- #Create figure
- #RME Task plot
- figure_rme <- figure_pred %>%
- filter(Condition == "RME Task") %>%
- ggplot(aes(x = c_socanx, y = emmean, linetype = Congruence)) +
- geom_line(linewidth = 1.1) +
- geom_ribbon(aes(ymin = emmean - SE, ymax = emmean + SE, fill = Congruence), alpha = 0.25) +
- scale_fill_grey(start = 0.3, end = 0.7) +
- scale_color_grey(start = 0.3, end = 0.7) +
- scale_y_reverse(limits = c(4, -5)) +
- theme_classic() +
- labs(title = "RME Task",
- x = "Social anxiety (centered)",
- y = expression(atop("N400 amplitude (" * mu * "V)", "Midline centroparietal (Cz, CPz, Pz)"))) +
- theme(axis.title.x = element_text(size = 14),
- axis.title.y = element_text(size = 14),
- axis.text.x = element_text(size = 12),
- axis.text.y = element_text(size = 12),
- legend.position = "none")
- figure_rme
- #Control Task plot
- figure_control <- figure_pred %>%
- filter(Condition == "Control Task") %>%
- ggplot(aes(x = c_socanx, y = emmean, linetype = Congruence)) +
- geom_line(linewidth = 1.1) +
- geom_ribbon(aes(ymin = emmean - SE, ymax = emmean + SE, fill = Congruence), alpha = 0.25) +
- scale_fill_grey(start = 0.3, end = 0.7) +
- scale_color_grey(start = 0.3, end = 0.7) +
- scale_y_reverse(limits = c(4, -5)) +
- theme_classic() +
- labs(title = "Control Task",
- x = "Social anxiety (centered)",
- y = expression(atop("N400 amplitude (" * mu * "V)", "Midline centroparietal (Cz, CPz, Pz)"))) +
- theme(axis.title.x = element_text(size = 14),
- axis.title.y = element_text(size = 14),
- axis.text.x = element_text(size = 12),
- axis.text.y = element_text(size = 12),
- legend.position = "none")
- figure_control
- #Combine RME and Control plots
- figure_combined <- (figure_rme + figure_control) +
- plot_layout(ncol = 2, guides = "collect") &
- theme(legend.position = "bottom", legend.title = element_blank(),
- legend.text = element_text(size = 11.5))
- #Display
- figure_combined
- #Export figure
- ggsave('Figure_1C_251225.png', figure_rme, width = 5, height = 4)
- ggsave('Figure_1D_251225.png', figure_control, width = 5, height = 4)
- #########################
- # Supplementary analyses
- #########################
- #Test primary model with sex as a moderator
- sexmoderator <- lmer(c_erp_avg ~ sex_cont * c_socanx * congruence_cont + (1 | Subject) + (1 | FaceNum),
- data = RME.correct, REML = TRUE)
- summary(sexmoderator)
- confint(sexmoderator)
- #Test valence interaction in primary model
- valence.rme.erpmod <- lmer(c_erp_avg ~ sex_cont + c_socanx * congruence_cont * Valence_factor + (1 | Subject) + (1 | FaceNum),
- data = RME.correct, REML = TRUE)
- summary(valence.rme.erpmod)
- confint(valence.rme.erpmod)
- #Test primary model controlling for other measures
- #Independent self-construal
- indep <- lmer(c_erp_avg ~ sex_cont + c_socanx * congruence_cont +
- c_indep:congruence_cont + c_indep +
- (1 | Subject) + (1 | FaceNum),
- data = RME.correct, REML = TRUE)
- summary(indep)
- confint(indep)
- #Interdependent self-construal
- interdep <- lmer(c_erp_avg ~ sex_cont + c_socanx * congruence_cont +
- c_interdep:congruence_cont + c_interdep +
- (1 | Subject) + (1 | FaceNum),
- data = RME.correct, REML = TRUE)
- summary(interdep)
- confint(interdep)
- #Openness to experience
- open <- lmer(c_erp_avg ~ sex_cont + c_socanx * congruence_cont +
- c_open:congruence_cont + c_open +
- (1 | Subject) + (1 | FaceNum),
- data = RME.correct, REML = TRUE)
- summary(open)
- confint(open)
- #Conscientiousness
- conscient <- lmer(c_erp_avg ~ sex_cont + c_socanx * congruence_cont +
- c_conscient:congruence_cont + c_conscient +
- (1 | Subject) + (1 | FaceNum),
- data = RME.correct, REML = TRUE)
- summary(conscient)
- confint(conscient)
- #Extraversion
- extro <- lmer(c_erp_avg ~ sex_cont + c_socanx * congruence_cont +
- c_extro:congruence_cont + c_extro +
- (1 | Subject) + (1 | FaceNum),
- data = RME.correct, REML = TRUE)
- summary(extro)
- confint(extro)
- #Agreeableness
- agree <- lmer(c_erp_avg ~ sex_cont + c_socanx * congruence_cont +
- c_agree:congruence_cont + c_agree +
- (1 | Subject) + (1 | FaceNum),
- data = RME.correct, REML = TRUE)
- summary(agree)
- confint(agree)
- #Neuroticism
- neurot <- lmer(c_erp_avg ~ sex_cont + c_socanx * congruence_cont +
- c_neurot:congruence_cont + c_neurot +
- (1 | Subject) + (1 | FaceNum),
- data = RME.correct, REML = TRUE)
- summary(neurot)
- confint(neurot)
- #N400 (Centroparietal [including lateral and midline]: Cz, C3, C4, CPz, CP1, CP2, CP5, CP6, Pz, P3, P4, P7, P8)
- #Predict amplitude from congruence * social anxiety
- RME.erp.centroparietal.mod <- lmer(c_n400_centroparietal_avg ~ sex_cont + c_socanx * congruence_cont + (1 | Subject) + (1 | FaceNum),
- data = RME.correct, REML = TRUE)
- summary(RME.erp.centroparietal.mod)
- confint(RME.erp.centroparietal.mod)
- CTRL.erp.centroparietal.mod <- lmer(c_n400_centroparietal_avg ~ sex_cont + c_socanx * congruence_cont + (1 | Subject) + (1 | FaceNum),
- data = CTRL.correct, REML = TRUE)
- summary(CTRL.erp.centroparietal.mod)
- confint(CTRL.erp.centroparietal.mod)
- #Predict amplitude from congruence * social anxiety * task
- all.erp.centroparietal.mod <- lmer(c_n400_centroparietal_avg ~ sex_cont + c_socanx * congruence_cont * task + (1 | Subject) + (1 | FaceNum),
- data = all.correct, REML = TRUE)
- summary(all.erp.centroparietal.mod)
- confint(all.erp.centroparietal.mod)
- #LPP (Cz, CPz, Pz)
- #Predict amplitude from congruence * social anxiety
- RME.lpp.czcpzpz.mod <- lmer(c_lpp_cz_cpz_pz_avg ~ sex_cont + c_socanx * congruence_cont + (1 | Subject) + (1 | FaceNum),
- data = RME.correct, REML = TRUE)
- summary(RME.lpp.czcpzpz.mod)
- confint(RME.lpp.czcpzpz.mod)
- CTRL.lpp.czcpzpz.mod <- lmer(c_lpp_cz_cpz_pz_avg ~ sex_cont + c_socanx * congruence_cont + (1 | Subject) + (1 | FaceNum),
- data = CTRL.correct, REML = TRUE)
- summary(CTRL.lpp.czcpzpz.mod)
- confint(CTRL.lpp.czcpzpz.mod)
- #Predict amplitude from congruence * social anxiety * task
- all.lpp.czcpzpz.mod <- lmer(c_lpp_cz_cpz_pz_avg ~ sex_cont + c_socanx * congruence_cont * task + (1 | Subject) + (1 | FaceNum),
- data = all.correct, REML = TRUE)
- summary(all.lpp.czcpzpz.mod)
- confint(all.lpp.czcpzpz.mod)
- #LPP (Centroparietal [including lateral and midline]: Cz, C3, C4, CPz, CP1, CP2, CP5, CP6, Pz, P3, P4, P7, P8)
- #Predict amplitude from congruence * social anxiety
- RME.lpp.centroparietal.mod <- lmer(c_lpp_centroparietal_avg ~ sex_cont + c_socanx * congruence_cont + (1 | Subject) + (1 | FaceNum),
- data = RME.correct, REML = TRUE)
- summary(RME.lpp.centroparietal.mod)
- confint(RME.lpp.centroparietal.mod)
- CTRL.lpp.centroparietal.mod <- lmer(c_lpp_centroparietal_avg ~ sex_cont + c_socanx * congruence_cont + (1 | Subject) + (1 | FaceNum),
- data = CTRL.correct, REML = TRUE)
- summary(CTRL.lpp.centroparietal.mod)
- confint(CTRL.lpp.centroparietal.mod)
- #Predict amplitude from congruence * social anxiety * task
- all.lpp.centroparietal.mod <- lmer(c_lpp_centroparietal_avg ~ sex_cont + c_socanx * congruence_cont * task + (1 | Subject) + (1 | FaceNum),
- data = all.correct, REML = TRUE)
- summary(all.lpp.centroparietal.mod)
- confint(all.lpp.centroparietal.mod)
- ###########################
- # Plot Supplemental Figure
- ###########################
- #N400 (Centroparietal [including lateral and midline])
- #Increase computing power so that the subsequent command can be run
- #Compute estimated marginal means from the ERP model for plotting
- figure_pred_n400_centroparietal <- emmeans(all.erp.centroparietal.mod, ~c_socanx * congruence_cont * task,
- at = list(c_socanx = c(-1.5, -1, -0.5, 0, 0.5, 1, 1.5),
- congruence_cont = c(-0.5, 0.5),
- task = c(0.5, -0.5))) %>%
- as.data.frame() %>%
- mutate(Congruence = congruence_cont %>% recode(`-0.5` = "Incongruent", `0.5` = "Congruent")) %>%
- mutate(Condition = task %>% recode(`0.5` = "RME Task", `-0.5` = "Control Task"))
- #Create figure
- #RME Task plot
- figure_rme_n400_centroparietal <- figure_pred_n400_centroparietal %>%
- filter(Condition == "RME Task") %>%
- ggplot(aes(x = c_socanx, y = emmean, linetype = Congruence)) +
- geom_line(linewidth = 1.1) +
- geom_ribbon(aes(ymin = emmean - SE, ymax = emmean + SE, fill = Congruence), alpha = 0.25) +
- scale_fill_grey(start = 0.3, end = 0.7) +
- scale_color_grey(start = 0.3, end = 0.7) +
- scale_y_reverse(limits = c(4, -4)) +
- theme_classic() +
- labs(title = "RME Task",
- x = "Social anxiety (centered)",
- y = expression(atop("N400 amplitude (" * mu * "V)", "Midline and lateral centroparietal"))) +
- theme(axis.title.x = element_text(size = 14),
- axis.title.y = element_text(size = 14),
- axis.text.x = element_text(size = 12),
- axis.text.y = element_text(size = 12),
- legend.position = "none")
- figure_rme_n400_centroparietal
- #Control Task plot
- figure_control_n400_centroparietal <- figure_pred_n400_centroparietal %>%
- filter(Condition == "Control Task") %>%
- ggplot(aes(x = c_socanx, y = emmean, linetype = Congruence)) +
- geom_line(linewidth = 1.1) +
- geom_ribbon(aes(ymin = emmean - SE, ymax = emmean + SE, fill = Congruence), alpha = 0.25) +
- scale_fill_grey(start = 0.3, end = 0.7) +
- scale_color_grey(start = 0.3, end = 0.7) +
- scale_y_reverse(limits = c(4, -4)) +
- theme_classic() +
- labs(title = "Control Task",
- x = "Social anxiety (centered)",
- y = expression(atop("N400 amplitude (" * mu * "V)", "Midline and lateral centroparietal"))) +
- theme(axis.title.x = element_text(size = 14),
- axis.title.y = element_text(size = 14),
- axis.text.x = element_text(size = 12),
- axis.text.y = element_text(size = 12),
- legend.position = "none")
- figure_control_n400_centroparietal
- #Combine RME and Control plots
- figure_combined_n400_centroparietal <- (figure_rme_n400_centroparietal + figure_control_n400_centroparietal) +
- plot_layout(ncol = 2, guides = "collect") &
- theme(legend.position = "bottom", legend.title = element_blank(),
- legend.text = element_text(size = 11.5))
- #Display
- figure_combined_n400_centroparietal
- #Export figure
- ggsave('Figure_S1C_251225.png', figure_rme_n400_centroparietal, width = 5, height = 4)
- ggsave('Figure_S1D_251225.png', figure_control_n400_centroparietal, width = 5, height = 4)
- #LPP (Centroparietal midline: Cz, CPz, Pz)
- #Compute estimated marginal means from the ERP model for plotting
- figure_pred_lpp_czcpzpz <- emmeans(all.lpp.czcpzpz.mod, ~c_socanx * congruence_cont * task,
- at = list(c_socanx = c(-1.5, -1, -0.5, 0, 0.5, 1, 1.5),
- congruence_cont = c(-0.5, 0.5),
- task = c(0.5, -0.5))) %>%
- as.data.frame() %>%
- mutate(Congruence = congruence_cont %>% recode(`-0.5` = "Incongruent", `0.5` = "Congruent")) %>%
- mutate(Condition = task %>% recode(`0.5` = "RME Task", `-0.5` = "Control Task"))
- #Create figure
- #RME Task plot
- figure_rme_lpp_czcpzpz <- figure_pred_lpp_czcpzpz %>%
- filter(Condition == "RME Task") %>%
- ggplot(aes(x = c_socanx, y = emmean, linetype = Congruence)) +
- geom_line(linewidth = 1.1) +
- geom_ribbon(aes(ymin = emmean - SE, ymax = emmean + SE, fill = Congruence), alpha = 0.25) +
- scale_fill_grey(start = 0.3, end = 0.7) +
- scale_color_grey(start = 0.3, end = 0.7) +
- scale_y_continuous(limits = c(-3.7, 5.0)) +
- theme_classic() +
- labs(title = "",
- x = "Social anxiety (centered)",
- y = expression(atop("LPP amplitude (" * mu * "V)", "Midline centroparietal (Cz, CPz, Pz)"))) +
- theme(axis.title.x = element_text(size = 14),
- axis.title.y = element_text(size = 14),
- axis.text.x = element_text(size = 12),
- axis.text.y = element_text(size = 12),
- legend.position = "none")
- figure_rme_lpp_czcpzpz
- #Control Task plot
- figure_control_lpp_czcpzpz <- figure_pred_lpp_czcpzpz %>%
- filter(Condition == "Control Task") %>%
- ggplot(aes(x = c_socanx, y = emmean, linetype = Congruence)) +
- geom_line(linewidth = 1.1) +
- geom_ribbon(aes(ymin = emmean - SE, ymax = emmean + SE, fill = Congruence), alpha = 0.25) +
- scale_fill_grey(start = 0.3, end = 0.7) +
- scale_color_grey(start = 0.3, end = 0.7) +
- scale_y_continuous(limits = c(-3.7, 5.0)) +
- theme_classic() +
- labs(title = "",
- x = "Social anxiety (centered)",
- y = expression(atop("LPP amplitude (" * mu * "V)", "Midline centroparietal (Cz, CPz, Pz)"))) +
- theme(axis.title.x = element_text(size = 14),
- axis.title.y = element_text(size = 14),
- axis.text.x = element_text(size = 12),
- axis.text.y = element_text(size = 12),
- legend.position = "none")
- figure_control_lpp_czcpzpz
- #Combine RME and Control plots
- figure_combined_lpp_czcpzpz <- (figure_rme_lpp_czcpzpz + figure_control_lpp_czcpzpz) +
- plot_layout(ncol = 2, guides = "collect") &
- theme(legend.position = "bottom", legend.title = element_blank(),
- legend.text = element_text(size = 11.5))
- #Display
- figure_combined_lpp_czcpzpz
- #Export figure
- ggsave('Figure_S3AB_251228.png', figure_combined_lpp_czcpzpz, width = 8, height = 4)
- #LPP (Centroparietal [including lateral and midline])
- #Compute estimated marginal means from the ERP model for plotting
- figure_pred_lpp_centroparietal <- emmeans(all.lpp.centroparietal.mod, ~c_socanx * congruence_cont * task,
- at = list(c_socanx = c(-1.5, -1, -0.5, 0, 0.5, 1, 1.5),
- congruence_cont = c(-0.5, 0.5),
- task = c(0.5, -0.5))) %>%
- as.data.frame() %>%
- mutate(Congruence = congruence_cont %>% recode(`-0.5` = "Incongruent", `0.5` = "Congruent")) %>%
- mutate(Condition = task %>% recode(`0.5` = "RME Task", `-0.5` = "Control Task"))
- #Create figure
- #RME Task plot
- figure_rme_lpp_centroparietal <- figure_pred_lpp_centroparietal %>%
- filter(Condition == "RME Task") %>%
- ggplot(aes(x = c_socanx, y = emmean, linetype = Congruence)) +
- geom_line(linewidth = 1.1) +
- geom_ribbon(aes(ymin = emmean - SE, ymax = emmean + SE, fill = Congruence), alpha = 0.25) +
- scale_fill_grey(start = 0.3, end = 0.7) +
- scale_color_grey(start = 0.3, end = 0.7) +
- scale_y_continuous(limits = c(-3, 4.7)) +
- theme_classic() +
- labs(title = "A) RME Task",
- x = "Social anxiety (centered)",
- y = expression(atop("LPP amplitude (" * mu * "V)", "Midline and lateral centroparietal"))) +
- theme(axis.title.x = element_text(size = 14),
- axis.title.y = element_text(size = 14),
- axis.text.x = element_text(size = 12),
- axis.text.y = element_text(size = 12),
- legend.position = "none")
- figure_rme_lpp_centroparietal
- #Control Task plot
- figure_control_lpp_centroparietal <- figure_pred_lpp_centroparietal %>%
- filter(Condition == "Control Task") %>%
- ggplot(aes(x = c_socanx, y = emmean, linetype = Congruence)) +
- geom_line(linewidth = 1.1) +
- geom_ribbon(aes(ymin = emmean - SE, ymax = emmean + SE, fill = Congruence), alpha = 0.25) +
- scale_fill_grey(start = 0.3, end = 0.7) +
- scale_color_grey(start = 0.3, end = 0.7) +
- scale_y_continuous(limits = c(-3, 4.7)) +
- theme_classic() +
- labs(title = "B) Control Task",
- x = "Social anxiety (centered)",
- y = expression(atop("LPP amplitude (" * mu * "V)", "Midline and lateral centroparietal"))) +
- theme(axis.title.x = element_text(size = 14),
- axis.title.y = element_text(size = 14),
- axis.text.x = element_text(size = 12),
- axis.text.y = element_text(size = 12),
- legend.position = "none")
- figure_control_lpp_centroparietal
- #Combine RME and Control plots
- figure_combined_lpp_centroparietal <- (figure_rme_lpp_centroparietal + figure_control_lpp_centroparietal) +
- plot_layout(ncol = 2, guides = "collect") &
- theme(legend.position = "bottom", legend.title = element_blank(),
- legend.text = element_text(size = 11.5))
- #Display
- figure_combined_lpp_centroparietal
- #Export figure
- ggsave('Figure_S3CD_251225.png', figure_combined_lpp_centroparietal, width = 8, height = 4)
SocAnx_ERP_260119.R, no license · at the source
Overview
- Department of Psychology, University of Michigan, Ann Arbor, Michigan, USA
- Department of Psychology, Northwestern University, Evanston, Illinois, USA
Abstract
Social anxiety—a fear of social interaction and negative evaluation—may be accompanied by heightened vigilance toward others' mental states, particularly those conveyed through gaze, as they provide cues about how one is being evaluated. We thus investigated whether individual differences in social anxiety predict neural sensitivity to the mental‐state meanings conveyed by gaze patterns. Fifty‐seven European American young adults varying in social anxiety viewed different gaze patterns, immediately followed by a mental‐state word that was either congruent or incongruent with the culturally recognized meaning of the gaze, while their electroencephalogram (EEG) was monitored. Our focus was N400—an event‐related potential (ERP) component indexing semantic expectation violations. We found the N400 amplitude to be more negative for incongruent (vs. congruent) mental‐state words. Notably, this N400 incongruity effect increased significantly with social anxiety. Moreover, the social anxiety effect was specific to mental state inference and was not observed in a comparable N400 incongruity effect involving animal stereotypes (n = 50). These findings suggest that social anxiety may confer enhanced neural sensitivity during the inference of others' mental states from gaze, even in the absence of overt performance differences. We discuss the implications of these findings with respect to the potential functional benefits of social anxiety.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above.
OSF tw5rp
Availability: 1 check, the latest on 1 October 2026: the link answers (HTTP 200)
- 1 October 2026: the link answers (HTTP 200)
1 file
- SocAnx_ERP_260119.R, R, 577 lines
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 1 script, each with its path and the digest of its content;
- no match between paragraphs and code yet;
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Data Availability Statement
Deidentified data and R codes are available on Open Science Framework (https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 1 October 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 4 authors, 5 keywords, 14 MeSH terms, 1 funder, 28 references.
Cite
This paper
Melani, I., Berg, M. K., Glazer, J., & Kitayama, S. (2026). Social Anxiety Predicts Enhanced Electrocortical Sensitivity to the Mental State Meanings Revealed by Gaze Patterns. Psychophysiology, 63(10), e70409. https://
BibTeX
@article{melani2026socia
author = {Melani, Irene and Berg, Martha K and Glazer, James and Kitayama, Shinobu},
title = {{Social Anxiety Predicts Enhanced Electrocortical Sensitivity to the Mental State Meanings Revealed by Gaze Patterns}},
journal = {Psychophysiology},
year = {2026},
month = oct,
volume = {63},
number = {10},
pages = {e70409},
publisher = {Wiley},
issn = {0048-5772},
doi = {10.1111/
url = {https://
pmid = {42806618},
pmcid = {PMC13620438}
}
RIS
TY - JOUR
AU - Melani, Irene
AU - Berg, Martha K
AU - Glazer, James
AU - Kitayama, Shinobu
TI - Social Anxiety Predicts Enhanced Electrocortical Sensitivity to the Mental State Meanings Revealed by Gaze Patterns
T2 - Psychophysiology
J2 - Psychophysiology
PY - 2026
DA - 2026/
VL - 63
IS - 10
SP - e70409
SN - 0048-5772
PB - Wiley
DO - 10.1111/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1111/
"type": "article-journal",
"title": "Social Anxiety Predicts Enhanced Electrocortical Sensitivity to the Mental State Meanings Revealed by Gaze Patterns",
"container-title": "Psychophysiology",
"author": [
{
"family": "Melani",
"given": "Irene"
},
{
"family": "Berg",
"given": "Martha K"
},
{
"family": "Glazer",
"given": "James"
},
{
"family": "Kitayama",
"given": "Shinobu"
}
],
"container-title-short":
"volume": "63",
"issue": "10",
"page": "e70409",
"DOI": "10.1111/
"PMID": "42806618",
"PMCID": "PMC13620438",
"ISSN": "0048-5772",
"publisher": "Wiley",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
10,
1
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1111/nyas.15407 [code]
- Foreign cultural norms are better accepted in the second language.Journal: Annals of the New York Academy of SciencesIn common: psych, emmeans, lmerTest, 4 other tools, EEG, 3 references
- [2] doi:10.1371/journal.pone.0353990 [code]
- Positive mood enhances accessibility of unrelated concepts in the first language but not in the foreign language.Journal: PloS oneIn common: psych, emmeans, lmerTest, 4 other tools, EEG, 2 references
- [3] doi:10.1007/s42113-024-00210-y [code]
- Mnemonic vs. Executive Contributions to the N400: A Connectionist Approach to False Memories.Journal: Computational brain & behaviorIn common: psych, emmeans, lmerTest, 4 other tools, EEG, 1 reference
- [4] doi:10.1093/scan/nsaf083
- Genes, culture, and neural sensitivity to norm violations: a DRD4 × culture interaction study.Journal: Social cognitive and affective neuroscienceIn common: EEG, 2 references, author Shinobu Kitayama
- [5] doi:10.3389/fnhum.2026.1820376 [code]
- The neural dynamics of political socio-pragmatic violations: an ERP study.Journal: Frontiers in human neuroscienceIn common: emmeans, lmerTest, lme4, 2 other tools, EEG, 3 references
- [6] doi:10.1038/s41398-026-04122-2 [code]
- Multi-session CBM-I for social anxiety: examining psychopathology, cognitive, neural, and psychophysiological effects in a randomized controlled trial.Journal: Translational psychiatryIn common: psych, emmeans, ggplot2, 1 other tool, other condition, 3 references
- [7] doi:10.1038/s41398-026-04479-4 [code]
- Altered semantic prediction error processing with increasing schizotypal and autistic traits.Journal: Translational psychiatryIn common: psych, emmeans, lmerTest, 3 other tools, EEG, 1 reference
- [8] doi:10.1371/journal.pone.0313854 [code]
- Hearing and cognitive decline in aging differentially impact neural tracking of context-supported versus random speech across linguistic timescales.Journal: PloS oneIn common: emmeans, lmerTest, lme4, 2 other tools, EEG, other condition, 2 references
- [9] doi:10.1038/s44271-025-00345-z [code]
- Accented speech modulates multiple event-related potential components across multiple levels of language processing.Journal: Communications psychologyIn common: psych, emmeans, lmerTest, 2 other tools, EEG, 1 reference
- [10] doi:10.1162/imag_a_00131 [code]
- Can prediction error explain predictability effects on the N1 during picture-word verification?Journal: Imaging neuroscience (Cambridge, Mass.)In common: lme4, patchwork, ggplot2, 1 other tool, EEG, 3 references
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 1 script, and 0 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:309217e0603161e1…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1111/psyp.70409)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1111/psyp.70409.svg
:target: https://openscicode.org/badge/doi/10.1111/psyp.70409
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1111/psyp.70409"><img src="https://openscicode.org/badge/doi/10.1111/psyp.70409.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
