OSCR

Broadening the Agent Preference Hypothesis Through Experiencers: Eye-Tracking and EEG Evidence of Proto-Agents and Proto-Patients.

Code ↔ Paper

7 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 7 matches
  1. [1] § EXPERIMENT 2 › Data Processing and Analyses ↔ Scripts/Preprocessing_eeg_data.m, lines 361–416 · score 0.64 · 200–900 ms, TBT, artifact, epoched, 200 ms, ERP
  2. [2] § EXPERIMENT 2 › Data Processing and Analyses ↔ Scripts/Preprocessing_eeg_data.m, lines 6–29 · score 0.59 · rejected channels, Artifact correction, EEG
  3. [3] § EXPERIMENT 2 › Data Processing and Analyses ↔ Scripts/Preprocessing_eeg_data.m, lines 190–245 · score 0.59 · high pass filtered, EEGLAB, preprocessed, channels
  4. [4] § EXPERIMENT 2 › Data Processing and Analyses ↔ Scripts/TFA.qmd, lines 308–384 · score 0.55 · 300–500 ms, 600–800 ms, TFA, windows, 300 ms, 600 ms
  5. [5] § EXPERIMENT 2 › Results ↔ Scripts/TFA.qmd, lines 227–306 · score 0.55 · 600–800 ms, 600 ms, theta, N400, patients, agents
  6. [6] § EXPERIMENT 2 › Discussion ↔ Scripts/TFA.qmd, lines 176–225 · score 0.53 · 300–500 ms, 600–800 ms, window, N400, electrodes, 300 ms
  7. [7] § EXPERIMENT 2 › Data Processing and Analyses ↔ Scripts/TFA.qmd, lines 308–384 · score 0.51 · 300–500 ms, 600–800 ms, window, electrode, 300 ms, 600 ms

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Quarto · 1,556 lines · 45 KB · no license · 4 matches

  1. ---
  2. title: "TFA"
  3. format: pdf
  4. editor: visual
  5. ---
  6. This script is based on the original analysis script published on OSF for: Isasi-Isasmendi, A. et al., (2023). Incremental sentence processing is guided by a preference for agents: EEG evidence from Basque. Language, Cognition and Neuroscience. Original OSF repository: https://osf.io/6gjkz/?viewonly=825cdcbd9b1347c9868cf43426e7761c The present version includes modifications and extensions for the current project.
  7. # Library
  8. ```{r}
  9. library(tidyverse)
  10. library(pbapply)
  11. library(reshape2)
  12. library(car)
  13. library(DescTools)
  14. library(readxl)
  15. library(mgcv)
  16. library(itsadug)
  17. library(mgcViz)
  18. library(gplots)
  19. library(brms)
  20. library(R.matlab)
  21. library(viridisLite)
  22. library(dplyr)
  23. ```
  24. # Create function
  25. ```{r}
  26. surprisal_df <- readxl::read_excel('/Users/martasanchez/Documents/Documentos - MacBook Pro de Marta/Matlab_code/EYEEEG2025/export_epochs/EYEEEG_2025_ERP/output_surprisal_eeg_2.xlsx')
  27. names(surprisal_df) <- tolower(names(surprisal_df))
  28. surprisal_df <- surprisal_df %>%
  29. filter(!region %in% c("subject", "preverb")) %>%
  30. group_by(number_item, condition, region) %>%
  31. summarise(
  32. surprisal = if (region[1] == "verb") sum(surprisal, na.rm = TRUE) else first(surprisal),
  33. .groups = "drop"
  34. )
  35. ```
  36. ```{r}
  37. read_tfa_agent_v <- function(i) {
  38. data <- readMat(agent_v_files[i])
  39. data<-data$freq.agent.v.baselined
  40. datachan<-data[[1]]
  41. datafreq<-data[[3]]
  42. datatime<-data[[4]]
  43. data<-data[[8]]
  44. dimnames(data) <- list(c(),c(datachan),c(datafreq),c(datatime))
  45. data<-reshape2::melt(data)
  46. return(data)
  47. }
  48. read_tfa_experiencer_v <- function(i) {
  49. data <- readMat(experiencer_v_files[i])
  50. data<-data$freq.experiencer.v.baselined
  51. datachan<-data[[1]]
  52. datafreq<-data[[3]]
  53. datatime<-data[[4]]
  54. data<-data[[8]]
  55. dimnames(data) <- list(c(),c(datachan),c(datafreq),c(datatime))
  56. data<-reshape2::melt(data)
  57. return(data)
  58. }
  59. read_tfa_patient_v <- function(i) {
  60. data <- readMat(patient_v_files[i])
  61. data<-data$freq.patient.v.baselined
  62. datachan<-data[[1]]
  63. datafreq<-data[[3]]
  64. datatime<-data[[4]]
  65. data<-data[[8]]
  66. dimnames(data) <- list(c(),c(datachan),c(datafreq),c(datatime))
  67. data<-melt(data)
  68. return(data)
  69. }
  70. ```
  71. # Set directory
  72. ```{r}
  73. setwd(
  74. '/Users/martasanchez/Documents/Documentos - MacBook Pro de Marta/Matlab_code/EYEEEG2025/4_output_TFA'
  75. )
  76. agent_v_files <- list.files(path = '/Users/martasanchez/Documents/Documentos - MacBook Pro de Marta/Matlab_code/EYEEEG2025/4_output_TFA', pattern = "_agent_v_TFA_rev.mat")
  77. experiencer_v_files <- list.files(path = '/Users/martasanchez/Documents/Documentos - MacBook Pro de Marta/Matlab_code/EYEEEG2025/4_output_TFA', pattern = "_experiencer_v_TFA_rev.mat")
  78. patient_v_files <- list.files(path = '/Users/martasanchez/Documents/Documentos - MacBook Pro de Marta/Matlab_code/EYEEEG2025/4_output_TFA', pattern = "_patient_v_TFA_rev.mat")
  79. ```
  80. # Run function
  81. ```{r}
  82. process_files_segmented <- function(files, read_function, output_dir_n400, output_dir_p600, time_window_n400, time_window_p600, condition) {
  83. if (!dir.exists(output_dir_n400)) dir.create(output_dir_n400)
  84. if (!dir.exists(output_dir_p600)) dir.create(output_dir_p600)
  85. message("Processing files for condition: ", condition)
  86. lapply(seq_along(files), function(i) {
  87. message(paste("Processing file:", i, "de", length(files)))
  88. df <- read_function(i)
  89. df$Condition <- condition
  90. df$Participant <- gsub("\\D", "", files[i])
  91. colnames(df) <- c("Channel", "Electrode", "Frequency", "Time", "Power", "condition", "Participant")
  92. # E-Prime files
  93. subj_id <- sprintf("%02d", as.numeric(df$Participant[1]))
  94. eprime_dir <- '/Users/martasanchez/Documents/Documentos - MacBook Pro de Marta/Matlab_code/EYEEEG2025/export_epochs/EEG_Marta'
  95. eprime_file <- list.files(path = eprime_dir, pattern = paste0("-", as.numeric(subj_id), "-1\\.txt$"), full.names = TRUE)
  96. for (window_name in c("n400", "p600")) {
  97. time_window <- if (window_name == "n400") time_window_n400 else time_window_p600
  98. df_segment <- df %>% filter(Time >= time_window[1] & Time <= time_window[2])
  99. if (nrow(df_segment) == 0) next
  100. if (length(eprime_file) == 1) {
  101. eprime_lines <- readLines(file(eprime_file[1], encoding = "UTF-16LE"), warn = FALSE)
  102. number_items <- c()
  103. potential_number <- NULL
  104. is_experimental <- FALSE
  105. for (line in eprime_lines) {
  106. if (grepl("NUMBER_ITEM", line)) {
  107. potential_number <- as.numeric(stringr::str_extract(line, "\\d+$"))
  108. }
  109. if (grepl("CONDITION:\\s*EXPERIMENTAL", line, ignore.case = TRUE)) {
  110. is_experimental <- TRUE
  111. }
  112. if (!is.null(potential_number) && is_experimental) {
  113. number_items <- c(number_items, potential_number)
  114. potential_number <- NULL
  115. is_experimental <- FALSE
  116. }
  117. if (grepl("^Trial", line, ignore.case = TRUE)) {
  118. potential_number <- NULL
  119. is_experimental <- FALSE
  120. }
  121. }
  122. n_timepoints <- length(unique(df_segment$Time))
  123. n_trials <- length(number_items)
  124. df_segment$trial_number <- rep(1:n_trials, each = n_timepoints, length.out = nrow(df_segment))
  125. trial_info <- tibble(
  126. trial_number = 1:n_trials,
  127. number_item = number_items,
  128. region = "verb"
  129. )
  130. df_segment <- left_join(df_segment, trial_info, by = "trial_number")
  131. } else {
  132. warning(paste("No E-Prime file found for Subject", subj_id))
  133. df_segment$trial_number <- NA
  134. df_segment$number_item <- NA
  135. df_segment$region <- NA
  136. }
  137. # Guardar archivo
  138. output_file <- file.path(
  139. if (window_name == "n400") output_dir_n400 else output_dir_p600,
  140. paste0("processed_", condition, "_", window_name, "_", i, ".csv")
  141. )
  142. write.csv(df_segment, file = output_file, row.names = FALSE)
  143. }
  144. })
  145. message("Procesamiento para ", condition, " completado.")
  146. }
  147. time_window_n400 <- c(0.3, 0.5)
  148. time_window_p600 <- c(0.6, 0.8)
  149. output_dir_agent_n400 <- "processed_agent_n400_files"
  150. output_dir_agent_p600 <- "processed_agent_p600_files"
  151. output_dir_experiencer_n400 <- "processed_experiencer_n400_files"
  152. output_dir_experiencer_p600 <- "processed_experiencer_p600_files"
  153. output_dir_patient_n400 <- "processed_patient_n400_files"
  154. output_dir_patient_p600 <- "processed_patient_p600_files"
  155. process_files_segmented(agent_v_files, read_tfa_agent_v, output_dir_agent_n400, output_dir_agent_p600, time_window_n400, time_window_p600, "agent")
  156. process_files_segmented(experiencer_v_files, read_tfa_experiencer_v, output_dir_experiencer_n400, output_dir_experiencer_p600, time_window_n400, time_window_p600, "experiencer")
  157. process_files_segmented(patient_v_files, read_tfa_patient_v, output_dir_patient_n400, output_dir_patient_p600, time_window_n400, time_window_p600, "patient")
  158. iaf_table <- read.csv("IAF_table.csv")
  159. combine_files_to_disk_filtered <- function(files, output_file_theta, output_file_alpha, output_file_low_beta) {
  160. for (file in files) {
  161. df <- data.table::fread(file)
  162. df$Electrode <- substr(df$Electrode, 7, nchar(df$Electrode) - 2)
  163. df$Participant <- as.numeric(as.character(df$Participant))
  164. print(names(df))
  165. print(names(surprisal_df))
  166. df <- left_join(df, surprisal_df, by = c("condition", "region", "number_item"))
  167. print(head(df$surprisal))
  168. print(head(df$region))
  169. print(head(df$number_item))
  170. # Join with IAF
  171. df <- left_join(df, iaf_table, by = "Participant")
  172. print(summary(df$Frequency))
  173. print(sort(unique(df$Frequency)))
  174. df_theta <- df %>%
  175. group_by(Participant) %>%
  176. filter(Frequency >= (IAF - 6) & Frequency <= (IAF - 4)) %>%
  177. ungroup()
  178. print(nrow(df_theta))
  179. df_alpha <- df %>%
  180. group_by(Participant) %>%
  181. filter(Frequency >= (IAF - 4) & Frequency <= (IAF + 2)) %>%
  182. ungroup()
  183. print(nrow(df_alpha))
  184. df_low_beta <- df %>%
  185. group_by(Participant) %>%
  186. filter(Frequency >= (IAF + 2) & Frequency <= (IAF + 10)) %>%
  187. ungroup()
  188. print(nrow(df_low_beta))
  189. df_theta_600_800 <- df_theta %>%
  190. filter(Time >= 0.6 & Time <= 0.8)
  191. df_alpha_600_800 <- df_alpha %>%
  192. filter(Time >= 0.6 & Time <= 0.8)
  193. df_low_beta_600_800 <- df_low_beta %>%
  194. filter(Time >= 0.6 & Time <= 0.8)
  195. cat("Data in 600–800 ms:\n")
  196. cat("Theta:", nrow(df_theta_600_800), "\n")
  197. cat("Alpha:", nrow(df_alpha_600_800), "\n")
  198. cat("Low Beta:", nrow(df_low_beta_600_800), "\n")
  199. data.table::fwrite(df_theta, file = output_file_theta, append = TRUE, sep = ",", col.names = FALSE)
  200. data.table::fwrite(df_alpha, file = output_file_alpha, append = TRUE, sep = ",", col.names = FALSE)
  201. data.table::fwrite(df_low_beta, file = output_file_low_beta, append = TRUE, sep = ",", col.names = FALSE)
  202. rm(df, df_theta, df_alpha, df_low_beta)
  203. gc()
  204. }
  205. }
  206. output_file_theta <- "theta_with_locations.csv"
  207. output_file_alpha <- "alpha_with_locations.csv"
  208. output_file_low_beta <- "low_beta_with_locations.csv"
  209. write.table(NULL, file = output_file_theta, col.names = TRUE, sep = ",", row.names = FALSE)
  210. write.table(NULL, file = output_file_alpha, col.names = TRUE, sep = ",", row.names = FALSE)
  211. write.table(NULL, file = output_file_low_beta, col.names = TRUE, sep = ",", row.names = FALSE)
  212. # Procesar archivos segmentados para ambas condiciones
  213. agent_n400_files <- list.files(output_dir_agent_n400, full.names = TRUE)
  214. agent_p600_files <- list.files(output_dir_agent_p600, full.names = TRUE)
  215. experiencer_n400_files <- list.files(output_dir_experiencer_n400, full.names = TRUE)
  216. experiencer_p600_files <- list.files(output_dir_experiencer_p600, full.names = TRUE)
  217. patient_n400_files <- list.files(output_dir_patient_n400, full.names = TRUE)
  218. patient_p600_files <- list.files(output_dir_patient_p600, full.names = TRUE)
  219. combine_files_to_disk_filtered(c(agent_n400_files, experiencer_n400_files, patient_n400_files), output_file_theta, output_file_alpha, output_file_low_beta)
  220. combine_files_to_disk_filtered(c(agent_p600_files, experiencer_p600_files, patient_p600_files), output_file_theta, output_file_alpha, output_file_low_beta)
  221. message("Completed")
  222. message("Theta: ", output_file_theta)
  223. message("Alpha: ", output_file_alpha)
  224. message("Beta: ", output_file_low_beta)
  225. ```
  226. ```{r}
  227. channel_loc_file <- '/Users/martasanchez/Documents/Documentos - MacBook Pro de Marta/R/EEG/location_erp'
  228. channel_loc <- read.table(file = channel_loc_file, sep = '\t', header = FALSE) %>%
  229. mutate(
  230. electrode = trimws(as.character(V2)),
  231. x = -as.numeric(V6),
  232. y = as.numeric(V5)
  233. ) %>%
  234. select(electrode, x, y) %>%
  235. mutate(electrode = gsub(" ", "", electrode, fixed = TRUE))
  236. theta_data <- read.csv("theta_with_locations.csv", header = FALSE, fill = TRUE, strip.white = TRUE)
  237. alpha_data <- read.csv("alpha_with_locations.csv", header = FALSE, fill = TRUE, strip.white = TRUE)
  238. low_beta_data <- read.csv("low_beta_with_locations.csv", header = FALSE, fill = TRUE, strip.white = TRUE)
  239. column_names <- c("Channel", "Electrode", "Frequency", "Time", "Power", "Condition", "Participant", "Trial", "number_item", "region", "surprisal", "IAF")
  240. colnames(theta_data) <- column_names
  241. colnames(alpha_data) <- column_names
  242. colnames(low_beta_data) <- column_names
  243. theta_data <- theta_data[, colSums(is.na(theta_data)) < nrow(theta_data)]
  244. alpha_data <- alpha_data[, colSums(is.na(alpha_data)) < nrow(alpha_data)]
  245. low_beta_data <- low_beta_data[, colSums(is.na(low_beta_data)) < nrow(low_beta_data)]
  246. theta_data$Electrode <- gsub('\\"', '', theta_data$Electrode)
  247. alpha_data$Electrode <- gsub('\\"', '', alpha_data$Electrode)
  248. low_beta_data$Electrode <- gsub('\\"', '', low_beta_data$Electrode)
  249. time_window_n400 <- c(0.3, 0.5)
  250. time_window_p600 <- c(0.6, 0.8)
  251. theta_N400 <- theta_data %>% filter(Time >= time_window_n400[1] & Time <= time_window_n400[2])
  252. theta_P600 <- theta_data %>% filter(Time >= time_window_p600[1] & Time <= time_window_p600[2])
  253. print(nrow(theta_P600))
  254. alpha_N400 <- alpha_data %>% filter(Time >= time_window_n400[1] & Time <= time_window_n400[2])
  255. alpha_P600 <- alpha_data %>% filter(Time >= time_window_p600[1] & Time <= time_window_p600[2])
  256. low_beta_N400 <- low_beta_data %>% filter(Time >= time_window_n400[1] & Time <= time_window_n400[2])
  257. low_beta_P600 <- low_beta_data %>% filter(Time >= time_window_p600[1] & Time <= time_window_p600[2])
  258. theta_N400 <- left_join(theta_N400, channel_loc, by = c("Electrode" = "electrode"))
  259. theta_P600 <- left_join(theta_P600, channel_loc, by = c("Electrode" = "electrode"))
  260. alpha_N400 <- left_join(alpha_N400, channel_loc, by = c("Electrode" = "electrode"))
  261. alpha_P600 <- left_join(alpha_P600, channel_loc, by = c("Electrode" = "electrode"))
  262. low_beta_N400 <- left_join(low_beta_N400, channel_loc, by = c("Electrode" = "electrode"))
  263. low_beta_P600 <- left_join(low_beta_P600, channel_loc, by = c("Electrode" = "electrode"))
  264. write.csv(theta_N400, "N400_theta.csv", row.names = FALSE)
  265. write.csv(theta_P600, "P600_theta.csv", row.names = FALSE)
  266. write.csv(alpha_N400, "N400_alpha.csv", row.names = FALSE)
  267. write.csv(alpha_P600, "P600_alpha.csv", row.names = FALSE)
  268. write.csv(low_beta_N400, "N400_low_beta.csv", row.names = FALSE)
  269. write.csv(low_beta_P600, "P600_low_beta.csv", row.names = FALSE)
  270. message("Files created:")
  271. message("N400 Theta: N400_alpha.csv")
  272. message("P600 Theta: P600_alpha.csv")
  273. message("N400 Alpha: N400_alpha.csv")
  274. message("P600 Alpha: P600_alpha.csv")
  275. message("N400 Beta: N400_low_beta.csv")
  276. message("P600 Beta: P600_low_beta.csv")
  277. ```
  278. # Fit the model
  279. ## Alpha 400
  280. ```{r}
  281. alpha_400_data <- read.csv("N400_alpha.csv", header = TRUE)
  282. summary(alpha_400_data)
  283. alpha_400_data <- alpha_400_data %>%
  284. dplyr::group_by_at(setdiff(names(alpha_400_data), c("Time", "Power"))) %>%
  285. dplyr::summarise(Power = mean(Power))
  286. alpha_400_data$Condition <- as.factor(alpha_400_data$Condition)
  287. alpha_400_data$trial_number.C <- c(scale(x = alpha_400_data$Trial, center = T, scale = F))
  288. alpha_400_data$surprisal.C <- c(scale(x = alpha_400_data$surprisal, center = T, scale = F))
  289. alpha_400_data <- alpha_400_data%>%drop_na(Power, x, y)
  290. alpha_400_data$Participant <- factor(alpha_400_data$Participant)
  291. alpha_400_data$number_item <- factor(alpha_400_data$number_item)
  292. ###################
  293. gam_space_alpha_400_null <-
  294. bam(formula = Power
  295. ~ 1
  296. + trial_number.C
  297. + s(Participant,x, y, bs = "re")
  298. + s(number_item,x, y, bs = "re")
  299. ,
  300. data = alpha_400_data,
  301. method = "ML",
  302. gc.level = 0)
  303. gam_space_alpha_400_all <-
  304. bam(formula = Power
  305. ~ 1
  306. + Condition
  307. + surprisal.C
  308. + trial_number.C
  309. + te(x, y, by = Condition)
  310. + te(x, y, by = surprisal.C)
  311. + s(Participant,x, y, bs = "re")
  312. + s(number_item,x, y, bs = "re")
  313. ,
  314. data = alpha_400_data,
  315. method = "ML",
  316. gc.level = 0)
  317. gam_space_alpha_400_es <-
  318. bam(formula = Power
  319. ~ 1
  320. + Condition
  321. + trial_number.C
  322. + te(x, y, by = Condition)
  323. + s(Participant,x, y, bs = "re")
  324. + s(number_item,x, y, bs = "re")
  325. ,
  326. data = alpha_400_data,
  327. method = "ML",
  328. gc.level = 0)
  329. gam_space_alpha_400_s <-
  330. bam(formula = Power
  331. ~ 1
  332. + surprisal.C
  333. + trial_number.C
  334. + te(x, y, by = surprisal.C)
  335. + s(Participant,x, y, bs = "re")
  336. + s(number_item,x, y, bs = "re")
  337. ,
  338. data = alpha_400_data,
  339. method = "ML",
  340. gc.level = 0)
  341. AIC(gam_space_alpha_400_all,gam_space_alpha_400_es, gam_space_alpha_400_s, gam_space_alpha_400_null)
  342. saveRDS(gam_space_alpha_400_null, file = "gam_space_alpha_400_null.rds")
  343. saveRDS(gam_space_alpha_400_all, file = "gam_space_alpha_400_all.rds")
  344. saveRDS(gam_space_alpha_400_es, file = "gam_space_alpha_400_es.rds")
  345. saveRDS(gam_space_alpha_400_s, file = "gam_space_alpha_400_s.rds")
  346. ```
  347. The model with the lower AIC is the model with all predictors.
  348. ```{r}
  349. alpha_400_data_pat <- within(alpha_400_data, Condition <- relevel(Condition, ref = "patient"))
  350. gam_space_alpha_400_pat <-
  351. bam(formula = Power
  352. ~ 1
  353. + Condition
  354. + surprisal.C
  355. + trial_number.C
  356. + te(x, y, by = Condition)
  357. + te(x, y, by = surprisal.C)
  358. + s(Participant,x, y, bs = "re")
  359. + s(number_item,x, y, bs = "re")
  360. ,
  361. data = alpha_400_data_pat,
  362. method = "ML",
  363. gc.level = 0)
  364. summary(gam_space_alpha_400_pat)
  365. summary(gam_space_alpha_400_all)
  366. saveRDS(gam_space_alpha_400_pat, file = "gam_space_alpha_400_all_pat.rds")
  367. ```
  368. ###Plots
  369. ```{r}
  370. gam_space_alpha_400_null <- readRDS("gam_space_alpha_400_null.rds")
  371. gam_space_alpha_400_all <- readRDS("gam_space_alpha_400_all.rds")
  372. gam_space_alpha_400_es <- readRDS("gam_space_alpha_400_es.rds")
  373. gam_space_alpha_400_s <- readRDS("gam_space_alpha_400_s.rds")
  374. gam_space_alpha_400_pat <- readRDS("gam_space_alpha_400_all_pat.rds")
  375. png("agent_experiencer_alpha_400.png", width = 1800, height = 1500, res = 300)
  376. par(mar = c(5, 4, 4, 8))
  377. plot_diff2(
  378. model = gam_space_alpha_400_all,
  379. view = c("x", "y"),
  380. comp = list(Condition = c("agent", "experiencer")),
  381. show.diff = T,
  382. sim.ci = T,
  383. rm.ranef = T,
  384. color = gplots::rich.colors(n = 256, palette = "temperature"),
  385. ci.col = c("gray", "gray"),
  386. main = "Agent - Experiencer",
  387. add.color.legend = F,
  388. zlim = c(-1, 1)
  389. )
  390. fields::image.plot(
  391. legend.only = TRUE,
  392. zlim = c(-1, 1),
  393. col = gplots::rich.colors(256, "temperature"),
  394. legend.args = list(text = "", side = 4, line = 2)
  395. )
  396. dev.off()
  397. png("patient_agent_alpha_400.png", width = 1800, height = 1500, res = 300)
  398. par(mar = c(5, 4, 4, 8))
  399. plot_diff2(
  400. model = gam_space_alpha_400_pat,
  401. view = c("x", "y"),
  402. comp = list(Condition = c("patient", "agent")),
  403. show.diff = T,
  404. sim.ci = T,
  405. rm.ranef = T,
  406. color = gplots::rich.colors(n = 256, palette = "temperature"),
  407. ci.col = c("gray", "gray"),
  408. main = "Patient - Agent",
  409. add.color.legend = F,
  410. zlim = c(-1, 1)
  411. )
  412. fields::image.plot(
  413. legend.only = TRUE,
  414. zlim = c(-1, 1),
  415. col = gplots::rich.colors(256, "temperature"),
  416. legend.args = list(text = "", side = 4, line = 2)
  417. )
  418. dev.off()
  419. png("patient_experiencer_alpha_400.png", width = 1800, height = 1500, res = 300)
  420. par(mar = c(5, 4, 4, 8))
  421. plot_diff2(
  422. model = gam_space_alpha_400_pat,
  423. view = c("x", "y"),
  424. comp = list(Condition = c("patient", "experiencer")),
  425. show.diff = T,
  426. sim.ci = T,
  427. rm.ranef = T,
  428. color = gplots::rich.colors(n = 256, palette = "temperature"),
  429. ci.col = c("gray", "gray"),
  430. main = "Patient - Experiencer",
  431. add.color.legend = F,
  432. zlim = c(-1, 1)
  433. )
  434. fields::image.plot(
  435. legend.only = TRUE,
  436. zlim = c(-1, 1),
  437. col = gplots::rich.colors(256, "temperature"),
  438. legend.args = list(text = "", side = 4, line = 2)
  439. )
  440. dev.off()
  441. ```
  442. ```{r}
  443. newdata_base <- alpha_400_data %>%
  444. select(x, y, Electrode) %>%
  445. distinct()
  446. newdata_base <- newdata_base %>%
  447. mutate(
  448. surprisal.C = 0,
  449. trial_number.C=0,
  450. number_item=0,
  451. Participant = "P001"
  452. )
  453. newdata_patient <- newdata_base %>% mutate(Condition = "patient")
  454. newdata_experiencer <- newdata_base %>% mutate(Condition = "experiencer")
  455. pred_patient <- predict(gam_space_alpha_400_all, newdata = newdata_patient, type = "response")
  456. pred_experiencer <- predict(gam_space_alpha_400_all, newdata = newdata_experiencer, type = "response")
  457. ```
  458. ## Alpha 600
  459. ```{r}
  460. alpha_600_data <- read.csv("P600_alpha.csv", header = TRUE)
  461. summary(alpha_600_data)
  462. alpha_600_data <- alpha_600_data %>%
  463. dplyr::group_by_at(setdiff(names(alpha_600_data), c("Time", "Power"))) %>%
  464. dplyr::summarise(Power = mean(Power))
  465. alpha_600_data$Condition <- as.factor(alpha_600_data$Condition)
  466. alpha_600_data$trial_number.C <- c(scale(x = alpha_600_data$Trial, center = T, scale = F))
  467. alpha_600_data$surprisal.C <- c(scale(x = alpha_600_data$surprisal, center = T, scale = F))
  468. alpha_600_data <- alpha_600_data%>%drop_na(Power, x, y)
  469. alpha_600_data$Participant <- factor(alpha_600_data$Participant)
  470. alpha_600_data$number_item <- factor(alpha_600_data$number_item)
  471. ###################
  472. gam_space_alpha_600_null <-
  473. bam(formula = Power
  474. ~ 1
  475. + trial_number.C
  476. + s(Participant,x, y, bs = "re")
  477. + s(number_item,x, y, bs = "re")
  478. ,
  479. data = alpha_600_data,
  480. method = "ML",
  481. gc.level = 0)
  482. gam_space_alpha_600_all <-
  483. bam(formula = Power
  484. ~ 1
  485. + Condition
  486. + surprisal.C
  487. + trial_number.C
  488. + te(x, y, by = Condition)
  489. + te(x, y, by = surprisal.C)
  490. + s(Participant,x, y, bs = "re")
  491. + s(number_item,x, y, bs = "re")
  492. ,
  493. data = alpha_600_data,
  494. method = "ML",
  495. gc.level = 0)
  496. gam_space_alpha_600_es <-
  497. bam(formula = Power
  498. ~ 1
  499. + Condition
  500. + trial_number.C
  501. + te(x, y, by = Condition)
  502. + s(Participant,x, y, bs = "re")
  503. + s(number_item,x, y, bs = "re")
  504. ,
  505. data = alpha_600_data,
  506. method = "ML",
  507. gc.level = 0)
  508. gam_space_alpha_600_s <-
  509. bam(formula = Power
  510. ~ 1
  511. + surprisal.C
  512. + trial_number.C
  513. + te(x, y, by = surprisal.C)
  514. + s(Participant,x, y, bs = "re")
  515. + s(number_item,x, y, bs = "re")
  516. ,
  517. data = alpha_600_data,
  518. method = "ML",
  519. gc.level = 0)
  520. AIC(gam_space_alpha_600_all,gam_space_alpha_600_es, gam_space_alpha_600_s, gam_space_alpha_600_null)
  521. saveRDS(gam_space_alpha_600_null, file = "gam_space_alpha_600_null.rds")
  522. saveRDS(gam_space_alpha_600_all, file = "gam_space_alpha_600_all.rds")
  523. saveRDS(gam_space_alpha_600_es, file = "gam_space_alpha_600_es.rds")
  524. saveRDS(gam_space_alpha_600_s, file = "gam_space_alpha_600_s.rds")
  525. ```
  526. The model with the lower AIC is the one with all predictors.
  527. ```{r}
  528. alpha_600_data_pat <- within(alpha_600_data, Condition <- relevel(Condition, ref = "patient"))
  529. gam_space_alpha_600_pat <-
  530. bam(formula = Power
  531. ~ 1
  532. + Condition
  533. + surprisal.C
  534. + trial_number.C
  535. + te(x, y, by = Condition)
  536. + te(x, y, by = surprisal.C)
  537. + s(Participant,x, y, bs = "re")
  538. + s(number_item,x, y, bs = "re")
  539. ,
  540. data = alpha_600_data_pat,
  541. method = "ML",
  542. gc.level = 0)
  543. summary(gam_space_alpha_600_pat)
  544. summary(gam_space_alpha_600_all)
  545. saveRDS(gam_space_alpha_600_pat, file = "gam_space_alpha_600_all_pat.rds")
  546. ```
  547. #### Plots
  548. ```{r}
  549. gam_space_alpha_600_null <- readRDS("gam_space_alpha_600_null.rds")
  550. gam_space_alpha_600_all <- readRDS("gam_space_alpha_600_all.rds")
  551. gam_space_alpha_600_es <- readRDS("gam_space_alpha_600_es.rds")
  552. gam_space_alpha_600_s <- readRDS("gam_space_alpha_600_s.rds")
  553. gam_space_alpha_600_pat <- readRDS("gam_space_alpha_600_all_pat.rds")
  554. png("agent_experiencer_alpha_600.png", width = 1800, height = 1500, res = 300)
  555. par(mar = c(5, 4, 4, 8))
  556. plot_diff2(
  557. model = gam_space_alpha_600_all,
  558. view = c("x", "y"),
  559. comp = list(Condition = c("agent", "experiencer")),
  560. show.diff = T,
  561. sim.ci = T,
  562. rm.ranef = T,
  563. color = gplots::rich.colors(n = 256, palette = "temperature"),
  564. ci.col = c("gray", "gray"),
  565. main = "Agent - Experiencer",
  566. add.color.legend = F,
  567. zlim = c(-1, 1)
  568. )
  569. fields::image.plot(
  570. legend.only = TRUE,
  571. zlim = c(-1, 1),
  572. col = gplots::rich.colors(256, "temperature"),
  573. legend.args = list(text = "", side = 4, line = 2)
  574. )
  575. dev.off()
  576. png("patient_agent_alpha_600.png", width = 1800, height = 1500, res = 300)
  577. par(mar = c(5, 4, 4, 8))
  578. plot_diff2(
  579. model = gam_space_alpha_600_pat,
  580. view = c("x", "y"),
  581. comp = list(Condition = c("patient", "agent")),
  582. show.diff = T,
  583. sim.ci = T,
  584. rm.ranef = T,
  585. color = gplots::rich.colors(n = 256, palette = "temperature"),
  586. ci.col = c("gray", "gray"),
  587. main = "Patient - Agent",
  588. add.color.legend = F,
  589. zlim = c(-1, 1)
  590. )
  591. fields::image.plot(
  592. legend.only = TRUE,
  593. zlim = c(-1, 1),
  594. col = gplots::rich.colors(256, "temperature"),
  595. legend.args = list(text = "", side = 4, line = 2)
  596. )
  597. dev.off()
  598. png("patient_experiencer_alpha_600.png", width = 1800, height = 1500, res = 300)
  599. par(mar = c(5, 4, 4, 8))
  600. plot_diff2(
  601. model = gam_space_alpha_600_pat,
  602. view = c("x", "y"),
  603. comp = list(Condition = c("patient", "experiencer")),
  604. show.diff = T,
  605. sim.ci = T,
  606. rm.ranef = T,
  607. color = gplots::rich.colors(n = 256, palette = "temperature"),
  608. ci.col = c("gray", "gray"),
  609. main = "Patient - Experiencer",
  610. add.color.legend = F,
  611. zlim = c(-1, 1)
  612. )
  613. fields::image.plot(
  614. legend.only = TRUE,
  615. zlim = c(-1, 1),
  616. col = gplots::rich.colors(256, "temperature"),
  617. legend.args = list(text = "", side = 4, line = 2)
  618. )
  619. dev.off()
  620. ```
  621. ## Theta 400
  622. ```{r}
  623. theta_400_data <- read.csv("N400_theta.csv", header = TRUE)
  624. summary(theta_400_data)
  625. theta_400_data <- theta_400_data %>%
  626. dplyr::group_by_at(setdiff(names(theta_400_data), c("Time", "Power"))) %>%
  627. dplyr::summarise(Power = mean(Power))
  628. theta_400_data$Condition <- as.factor(theta_400_data$Condition)
  629. theta_400_data$trial_number.C <- c(scale(x = theta_400_data$Trial, center = T, scale = F))
  630. theta_400_data$surprisal.C <- c(scale(x = theta_400_data$surprisal, center = T, scale = F))
  631. theta_400_data <- theta_400_data%>%drop_na(Power, x, y)
  632. theta_400_data$Participant <- factor(theta_400_data$Participant)
  633. theta_400_data$number_item <- factor(theta_400_data$number_item)
  634. ###################
  635. gam_space_theta_400_null <-
  636. bam(formula = Power
  637. ~ 1
  638. + trial_number.C
  639. + s(Participant,x, y, bs = "re")
  640. + s(number_item,x, y, bs = "re")
  641. ,
  642. data = theta_400_data,
  643. method = "ML",
  644. gc.level = 0)
  645. gam_space_theta_400_all <-
  646. bam(formula = Power
  647. ~ 1
  648. + Condition
  649. + surprisal.C
  650. + trial_number.C
  651. + te(x, y, by = Condition)
  652. + te(x, y, by = surprisal.C)
  653. + s(Participant,x, y, bs = "re")
  654. + s(number_item,x, y, bs = "re")
  655. ,
  656. data = theta_400_data,
  657. method = "ML",
  658. gc.level = 0)
  659. gam_space_theta_400_es <-
  660. bam(formula = Power
  661. ~ 1
  662. + Condition
  663. + trial_number.C
  664. + te(x, y, by = Condition)
  665. + s(Participant,x, y, bs = "re")
  666. + s(number_item,x, y, bs = "re")
  667. ,
  668. data = theta_400_data,
  669. method = "ML",
  670. gc.level = 0)
  671. gam_space_theta_400_s <-
  672. bam(formula = Power
  673. ~ 1
  674. + surprisal.C
  675. + trial_number.C
  676. + te(x, y, by = surprisal.C)
  677. + s(Participant,x, y, bs = "re")
  678. + s(number_item,x, y, bs = "re")
  679. ,
  680. data = theta_400_data,
  681. method = "ML",
  682. gc.level = 0)
  683. AIC(gam_space_theta_400_all,gam_space_theta_400_es, gam_space_theta_400_s, gam_space_theta_400_null)
  684. saveRDS(gam_space_theta_400_null, file = "gam_space_theta_400_null.rds")
  685. saveRDS(gam_space_theta_400_all, file = "gam_space_theta_400_all.rds")
  686. saveRDS(gam_space_theta_400_es, file = "gam_space_theta_400_es.rds")
  687. saveRDS(gam_space_theta_400_s, file = "gam_space_theta_400_s.rds")
  688. ```
  689. The model with the lowest AIC is the verb type predictor.
  690. ```{r}
  691. theta_400_data_pat <- within(theta_400_data, Condition <- relevel(Condition, ref = "patient"))
  692. gam_space_theta_400_pat <-
  693. bam(formula = Power
  694. ~ 1
  695. + Condition
  696. + trial_number.C
  697. + te(x, y, by = Condition)
  698. + s(Participant,x, y, bs = "re")
  699. + s(number_item,x, y, bs = "re")
  700. ,
  701. data = theta_400_data_pat,
  702. method = "ML",
  703. gc.level = 0)
  704. summary(gam_space_theta_400_pat)
  705. summary(gam_space_theta_400_es)
  706. saveRDS(gam_space_theta_400_pat, file = "gam_space_theta_400_es_pat.rds")
  707. ```
  708. #### Plots
  709. ```{r}
  710. gam_space_theta_400_null <- readRDS("gam_space_theta_400_null.rds")
  711. gam_space_theta_400_all <- readRDS("gam_space_theta_400_all.rds")
  712. gam_space_theta_400_es <- readRDS("gam_space_theta_400_es.rds")
  713. gam_space_theta_400_s <- readRDS("gam_space_theta_400_s.rds")
  714. gam_space_theta_400_pat <- readRDS("gam_space_theta_400_es_pat.rds")
  715. png("agent_experiencer_theta_400.png", width = 1800, height = 1500, res = 300)
  716. par(mar = c(5, 4, 4, 8))
  717. plot_diff2(
  718. model = gam_space_theta_400_all,
  719. view = c("x", "y"),
  720. comp = list(Condition = c("agent", "experiencer")),
  721. show.diff = T,
  722. sim.ci = T,
  723. rm.ranef = T,
  724. color = gplots::rich.colors(n = 256, palette = "temperature"),
  725. ci.col = c("gray", "gray"),
  726. main = "Agent - Experiencer",
  727. add.color.legend = F,
  728. zlim = c(-1, 1)
  729. )
  730. fields::image.plot(
  731. legend.only = TRUE,
  732. zlim = c(-1, 1),
  733. col = gplots::rich.colors(256, "temperature"),
  734. legend.args = list(text = "", side = 4, line = 2)
  735. )
  736. dev.off()
  737. png("patient_agent_theta_400.png", width = 1800, height = 1500, res = 300)
  738. par(mar = c(5, 4, 4, 8))
  739. plot_diff2(
  740. model = gam_space_theta_400_all,
  741. view = c("x", "y"),
  742. comp = list(Condition = c("patient", "agent")),
  743. show.diff = T,
  744. sim.ci = T,
  745. rm.ranef = T,
  746. color = gplots::rich.colors(n = 256, palette = "temperature"),
  747. ci.col = c("gray", "gray"),
  748. main = "Patient - Agent",
  749. add.color.legend = F,
  750. zlim = c(-1, 1)
  751. )
  752. fields::image.plot(
  753. legend.only = TRUE,
  754. zlim = c(-1, 1),
  755. col = gplots::rich.colors(256, "temperature"),
  756. legend.args = list(text = "", side = 4, line = 2)
  757. )
  758. dev.off()
  759. png("patient_experiencer_theta_400.png", width = 1800, height = 1500, res = 300)
  760. par(mar = c(5, 4, 4, 8))
  761. plot_diff2(
  762. model = gam_space_theta_400_all,
  763. view = c("x", "y"),
  764. comp = list(Condition = c("patient", "experiencer")),
  765. show.diff = T,
  766. sim.ci = T,
  767. rm.ranef = T,
  768. color = gplots::rich.colors(n = 256, palette = "temperature"),
  769. ci.col = c("gray", "gray"),
  770. main = "Patient - Experiencer",
  771. add.color.legend = F,
  772. zlim = c(-1, 1)
  773. )
  774. fields::image.plot(
  775. legend.only = TRUE,
  776. zlim = c(-1, 1),
  777. col = gplots::rich.colors(256, "temperature"),
  778. legend.args = list(text = "", side = 4, line = 2)
  779. )
  780. dev.off()
  781. ```
  782. ## Theta 600
  783. ```{r}
  784. theta_600_data <- read.csv("P600_theta.csv", header = TRUE)
  785. summary(theta_600_data)
  786. theta_600_data <- theta_600_data %>%
  787. dplyr::group_by_at(setdiff(names(theta_600_data), c("Time", "Power"))) %>%
  788. dplyr::summarise(Power = mean(Power))
  789. theta_600_data$Condition <- as.factor(theta_600_data$Condition)
  790. theta_600_data$trial_number.C <- c(scale(x = theta_600_data$Trial, center = T, scale = F))
  791. theta_600_data$surprisal.C <- c(scale(x = theta_600_data$surprisal, center = T, scale = F))
  792. theta_600_data <- theta_600_data%>%drop_na(Power, x, y)
  793. theta_600_data$Participant <- factor(theta_600_data$Participant)
  794. theta_600_data$number_item <- factor(theta_600_data$number_item)
  795. ###################
  796. gam_space_theta_600_null <-
  797. bam(formula = Power
  798. ~ 1
  799. + trial_number.C
  800. + s(Participant,x, y, bs = "re")
  801. + s(number_item,x, y, bs = "re")
  802. ,
  803. data = theta_600_data,
  804. method = "ML",
  805. gc.level = 0)
  806. gam_space_theta_600_all <-
  807. bam(formula = Power
  808. ~ 1
  809. + Condition
  810. + surprisal.C
  811. + trial_number.C
  812. + te(x, y, by = Condition)
  813. + te(x, y, by = surprisal.C)
  814. + s(Participant,x, y, bs = "re")
  815. + s(number_item,x, y, bs = "re")
  816. ,
  817. data = theta_600_data,
  818. method = "ML",
  819. gc.level = 0)
  820. gam_space_theta_600_es <-
  821. bam(formula = Power
  822. ~ 1
  823. + Condition
  824. + trial_number.C
  825. + te(x, y, by = Condition)
  826. + s(Participant,x, y, bs = "re")
  827. + s(number_item,x, y, bs = "re")
  828. ,
  829. data = theta_600_data,
  830. method = "ML",
  831. gc.level = 0)
  832. gam_space_theta_600_s <-
  833. bam(formula = Power
  834. ~ 1
  835. + surprisal.C
  836. + trial_number.C
  837. + te(x, y, by = surprisal.C)
  838. + s(Participant,x, y, bs = "re")
  839. + s(number_item,x, y, bs = "re")
  840. ,
  841. data = theta_600_data,
  842. method = "ML",
  843. gc.level = 0)
  844. AIC(gam_space_theta_600_all,gam_space_theta_600_es, gam_space_theta_600_s, gam_space_theta_600_null)
  845. saveRDS(gam_space_theta_600_null, file = "gam_space_theta_600_null.rds")
  846. saveRDS(gam_space_theta_600_all, file = "gam_space_theta_600_all.rds")
  847. saveRDS(gam_space_theta_600_es, file = "gam_space_theta_600_es.rds")
  848. saveRDS(gam_space_theta_600_s, file = "gam_space_theta_600_s.rds")
  849. ```
  850. The model with the lowest AIC is the one with all predictors.
  851. ```{r}
  852. theta_600_data_pat <- within(theta_600_data, Condition <- relevel(Condition, ref = "patient"))
  853. gam_space_theta_600_pat <-
  854. bam(formula = Power
  855. ~ 1
  856. + Condition
  857. + surprisal.C
  858. + trial_number.C
  859. + te(x, y, by = Condition)
  860. + te(x, y, by = surprisal.C)
  861. + s(Participant,x, y, bs = "re")
  862. + s(number_item,x, y, bs = "re")
  863. ,
  864. data = theta_600_data_pat,
  865. method = "ML",
  866. gc.level = 0)
  867. summary(gam_space_theta_600_pat)
  868. summary(gam_space_theta_600_all)
  869. saveRDS(gam_space_theta_600_pat, file = "gam_space_theta_600_all_pat.rds")
  870. ```
  871. #### Plots
  872. ```{r}
  873. gam_space_theta_600_null <- readRDS("gam_space_theta_600_null.rds")
  874. gam_space_theta_600_all <- readRDS("gam_space_theta_600_all.rds")
  875. gam_space_theta_600_es <- readRDS("gam_space_theta_600_es.rds")
  876. gam_space_theta_600_s <- readRDS("gam_space_theta_600_s.rds")
  877. gam_space_theta_600_pat <- readRDS("gam_space_theta_600_all_pat.rds")
  878. png("agent_experiencer_theta_600.png", width = 1800, height = 1500, res = 300)
  879. par(mar = c(5, 4, 4, 8))
  880. plot_diff2(
  881. model = gam_space_theta_600_all,
  882. view = c("x", "y"),
  883. comp = list(Condition = c("agent", "experiencer")),
  884. show.diff = T,
  885. sim.ci = T,
  886. rm.ranef = T,
  887. color = gplots::rich.colors(n = 256, palette = "temperature"),
  888. ci.col = c("gray", "gray"),
  889. main = "Agent - Experiencer",
  890. add.color.legend = F,
  891. zlim = c(-1, 1)
  892. )
  893. fields::image.plot(
  894. legend.only = TRUE,
  895. zlim = c(-1, 1),
  896. col = gplots::rich.colors(256, "temperature"),
  897. legend.args = list(text = "", side = 4, line = 2)
  898. )
  899. dev.off()
  900. png("patient_agent_theta_600.png", width = 1800, height = 1500, res = 300)
  901. par(mar = c(5, 4, 4, 8))
  902. plot_diff2(
  903. model = gam_space_theta_600_pat,
  904. view = c("x", "y"),
  905. comp = list(Condition = c("patient", "agent")),
  906. show.diff = T,
  907. sim.ci = T,
  908. rm.ranef = T,
  909. color = gplots::rich.colors(n = 256, palette = "temperature"),
  910. ci.col = c("gray", "gray"),
  911. main = "Patient - Agent",
  912. add.color.legend = F,
  913. zlim = c(-1, 1)
  914. )
  915. fields::image.plot(
  916. legend.only = TRUE,
  917. zlim = c(-1, 1),
  918. col = gplots::rich.colors(256, "temperature"),
  919. legend.args = list(text = "", side = 4, line = 2)
  920. )
  921. dev.off()
  922. png("patient_experiencer_theta_600.png", width = 1800, height = 1500, res = 300)
  923. par(mar = c(5, 4, 4, 8))
  924. plot_diff2(
  925. model = gam_space_theta_600_pat,
  926. view = c("x", "y"),
  927. comp = list(Condition = c("patient", "experiencer")),
  928. show.diff = T,
  929. sim.ci = T,
  930. rm.ranef = T,
  931. color = gplots::rich.colors(n = 256, palette = "temperature"),
  932. ci.col = c("gray", "gray"),
  933. main = "Patient - Experiencer",
  934. add.color.legend = F,
  935. zlim = c(-1, 1)
  936. )
  937. fields::image.plot(
  938. legend.only = TRUE,
  939. zlim = c(-1, 1),
  940. col = gplots::rich.colors(256, "temperature"),
  941. legend.args = list(text = "", side = 4, line = 2)
  942. )
  943. dev.off()
  944. ```
  945. ## Low beta 400
  946. ```{r}
  947. low_beta_400_data <- read.csv("N400_low_beta.csv", header = TRUE)
  948. summary(low_beta_400_data)
  949. low_beta_400_data <- low_beta_400_data %>%
  950. dplyr::group_by_at(setdiff(names(low_beta_400_data), c("Time", "Power"))) %>%
  951. dplyr::summarise(Power = mean(Power))
  952. low_beta_400_data$Condition <- as.factor(low_beta_400_data$Condition)
  953. low_beta_400_data$trial_number.C <- c(scale(x = low_beta_400_data$Trial, center = T, scale = F))
  954. low_beta_400_data$surprisal.C <- c(scale(x = low_beta_400_data$surprisal, center = T, scale = F))
  955. low_beta_400_data <- low_beta_400_data%>%drop_na(Power, x, y)
  956. low_beta_400_data$Participant <- factor(low_beta_400_data$Participant)
  957. low_beta_400_data$number_item <- factor(low_beta_400_data$number_item)
  958. ###################
  959. gam_space_low_beta_400_null <-
  960. bam(formula = Power
  961. ~ 1
  962. + trial_number.C
  963. + s(Participant,x, y, bs = "re")
  964. + s(number_item,x, y, bs = "re")
  965. ,
  966. data = low_beta_400_data,
  967. method = "ML",
  968. gc.level = 0)
  969. gam_space_low_beta_400_all <-
  970. bam(formula = Power
  971. ~ 1
  972. + Condition
  973. + surprisal.C
  974. + trial_number.C
  975. + te(x, y, by = Condition)
  976. + te(x, y, by = surprisal.C)
  977. + s(Participant,x, y, bs = "re")
  978. + s(number_item,x, y, bs = "re")
  979. ,
  980. data = low_beta_400_data,
  981. method = "ML",
  982. gc.level = 0)
  983. gam_space_low_beta_400_es <-
  984. bam(formula = Power
  985. ~ 1
  986. + Condition
  987. + trial_number.C
  988. + te(x, y, by = Condition)
  989. + s(Participant,x, y, bs = "re")
  990. + s(number_item,x, y, bs = "re")
  991. ,
  992. data = low_beta_400_data,
  993. method = "ML",
  994. gc.level = 0)
  995. gam_space_low_beta_400_s <-
  996. bam(formula = Power
  997. ~ 1
  998. + surprisal.C
  999. + trial_number.C
  1000. + te(x, y, by = surprisal.C)
  1001. + s(Participant,x, y, bs = "re")
  1002. + s(number_item,x, y, bs = "re")
  1003. ,
  1004. data = low_beta_400_data,
  1005. method = "ML",
  1006. gc.level = 0)
  1007. AIC(gam_space_low_beta_400_all,gam_space_low_beta_400_es, gam_space_low_beta_400_s, gam_space_low_beta_400_null)
  1008. saveRDS(gam_space_low_beta_400_null, file = "gam_space_low_beta_400_null.rds")
  1009. saveRDS(gam_space_low_beta_400_all, file = "gam_space_low_beta_400_all.rds")
  1010. saveRDS(gam_space_low_beta_400_es, file = "gam_space_low_beta_400_es.rds")
  1011. saveRDS(gam_space_low_beta_400_s, file = "gam_space_low_beta_400_s.rds")
  1012. ```
  1013. The model with the lower AIC is the model with all predictors.
  1014. ```{r}
  1015. low_beta_400_data_pat <- within(low_beta_400_data, Condition <- relevel(Condition, ref = "patient"))
  1016. gam_space_low_beta_400_pat <-
  1017. bam(formula = Power
  1018. ~ 1
  1019. + Condition
  1020. + surprisal.C
  1021. + trial_number.C
  1022. + te(x, y, by = Condition)
  1023. + te(x, y, by = surprisal.C)
  1024. + s(Participant,x, y, bs = "re")
  1025. + s(number_item,x, y, bs = "re")
  1026. ,
  1027. data = low_beta_400_data_pat,
  1028. method = "ML",
  1029. gc.level = 0)
  1030. summary(gam_space_low_beta_400_pat)
  1031. summary(gam_space_low_beta_400_all)
  1032. saveRDS(gam_space_low_beta_400_pat, file = "gam_space_low_beta_400_all_pat.rds")
  1033. ```
  1034. ### Plots
  1035. ```{r}
  1036. gam_space_low_beta_400_null <- readRDS("gam_space_low_beta_400_null.rds")
  1037. gam_space_low_beta_400_all <- readRDS("gam_space_low_beta_400_all.rds")
  1038. gam_space_low_beta_400_es <- readRDS("gam_space_low_beta_400_es.rds")
  1039. gam_space_low_beta_400_s <- readRDS("gam_space_low_beta_400_s.rds")
  1040. gam_space_low_beta_400_pat <- readRDS("gam_space_low_beta_400_all_pat.rds")
  1041. png("agent_experiencer_lowbeta_400.png", width = 1800, height = 1500, res = 300)
  1042. par(mar = c(5, 4, 4, 8))
  1043. plot_diff2(
  1044. model = gam_space_low_beta_400_all,
  1045. view = c("x", "y"),
  1046. comp = list(Condition = c("agent", "experiencer")),
  1047. show.diff = T,
  1048. sim.ci = T,
  1049. rm.ranef = T,
  1050. color = gplots::rich.colors(n = 256, palette = "temperature"),
  1051. ci.col = c("gray", "gray"),
  1052. main = "Agent - Experiencer",
  1053. add.color.legend = F,
  1054. zlim = c(-1, 1)
  1055. )
  1056. fields::image.plot(
  1057. legend.only = TRUE,
  1058. zlim = c(-1, 1),
  1059. col = gplots::rich.colors(256, "temperature"),
  1060. legend.args = list(text = "", side = 4, line = 2)
  1061. )
  1062. dev.off()
  1063. png("patient_agent_lowbeta_400.png", width = 1800, height = 1500, res = 300)
  1064. par(mar = c(5, 4, 4, 8))
  1065. plot_diff2(
  1066. model = gam_space_low_beta_400_pat,
  1067. view = c("x", "y"),
  1068. comp = list(Condition = c("patient", "agent")),
  1069. show.diff = T,
  1070. sim.ci = T,
  1071. rm.ranef = T,
  1072. color = gplots::rich.colors(n = 256, palette = "temperature"),
  1073. ci.col = c("gray", "gray"),
  1074. main = "Patient - Agent",
  1075. add.color.legend = F,
  1076. zlim = c(-1, 1)
  1077. )
  1078. fields::image.plot(
  1079. legend.only = TRUE,
  1080. zlim = c(-1, 1),
  1081. col = gplots::rich.colors(256, "temperature"),
  1082. legend.args = list(text = "", side = 4, line = 2)
  1083. )
  1084. dev.off()
  1085. png("patient_experiencer_lowbeta_400.png", width = 1800, height = 1500, res = 300)
  1086. par(mar = c(5, 4, 4, 8))
  1087. plot_diff2(
  1088. model = gam_space_low_beta_400_pat,
  1089. view = c("x", "y"),
  1090. comp = list(Condition = c("patient", "experiencer")),
  1091. show.diff = T,
  1092. sim.ci = T,
  1093. rm.ranef = T,
  1094. color = gplots::rich.colors(n = 256, palette = "temperature"),
  1095. ci.col = c("gray", "gray"),
  1096. main = "Patient - Experiencer",
  1097. add.color.legend = F,
  1098. zlim = c(-1, 1)
  1099. )
  1100. fields::image.plot(
  1101. legend.only = TRUE,
  1102. zlim = c(-1, 1),
  1103. col = gplots::rich.colors(256, "temperature"),
  1104. legend.args = list(text = "", side = 4, line = 2)
  1105. )
  1106. dev.off()
  1107. ```
  1108. ## Low beta 600
  1109. ```{r}
  1110. low_beta_600_data <- read.csv("P600_low_beta.csv", header = TRUE)
  1111. summary(low_beta_600_data)
  1112. low_beta_600_data <- low_beta_600_data %>%
  1113. dplyr::group_by_at(setdiff(names(low_beta_600_data), c("Time", "Power"))) %>%
  1114. dplyr::summarise(Power = mean(Power))
  1115. low_beta_600_data$Condition <- as.factor(low_beta_600_data$Condition)
  1116. low_beta_600_data$trial_number.C <- c(scale(x = low_beta_600_data$Trial, center = T, scale = F))
  1117. low_beta_600_data$surprisal.C <- c(scale(x = low_beta_600_data$surprisal, center = T, scale = F))
  1118. low_beta_600_data <- low_beta_600_data%>%drop_na(Power, x, y)
  1119. low_beta_600_data$Participant <- factor(low_beta_600_data$Participant)
  1120. low_beta_600_data$number_item <- factor(low_beta_600_data$number_item)
  1121. ###################
  1122. gam_space_low_beta_600_null <-
  1123. bam(formula = Power
  1124. ~ 1
  1125. + trial_number.C
  1126. + s(Participant,x, y, bs = "re")
  1127. + s(number_item,x, y, bs = "re")
  1128. ,
  1129. data = low_beta_600_data,
  1130. method = "ML",
  1131. gc.level = 0)
  1132. gam_space_low_beta_600_all <-
  1133. bam(formula = Power
  1134. ~ 1
  1135. + Condition
  1136. + surprisal.C
  1137. + trial_number.C
  1138. + te(x, y, by = Condition)
  1139. + te(x, y, by = surprisal.C)
  1140. + s(Participant,x, y, bs = "re")
  1141. + s(number_item,x, y, bs = "re")
  1142. ,
  1143. data = low_beta_600_data,
  1144. method = "ML",
  1145. gc.level = 0)
  1146. gam_space_low_beta_600_es <-
  1147. bam(formula = Power
  1148. ~ 1
  1149. + Condition
  1150. + trial_number.C
  1151. + te(x, y, by = Condition)
  1152. + s(Participant,x, y, bs = "re")
  1153. + s(number_item,x, y, bs = "re")
  1154. ,
  1155. data = low_beta_600_data,
  1156. method = "ML",
  1157. gc.level = 0)
  1158. gam_space_low_beta_600_s <-
  1159. bam(formula = Power
  1160. ~ 1
  1161. + surprisal.C
  1162. + trial_number.C
  1163. + te(x, y, by = surprisal.C)
  1164. + s(Participant,x, y, bs = "re")
  1165. + s(number_item,x, y, bs = "re")
  1166. ,
  1167. data = low_beta_600_data,
  1168. method = "ML",
  1169. gc.level = 0)
  1170. AIC(gam_space_low_beta_600_all,gam_space_low_beta_600_es, gam_space_low_beta_600_s, gam_space_low_beta_600_null)
  1171. saveRDS(gam_space_low_beta_600_null, file = "gam_space_low_beta_600_null.rds")
  1172. saveRDS(gam_space_low_beta_600_all, file = "gam_space_low_beta_600_all.rds")
  1173. saveRDS(gam_space_low_beta_600_es, file = "gam_space_low_beta_600_es.rds")
  1174. saveRDS(gam_space_low_beta_600_s, file = "gam_space_low_beta_600_s.rds")
  1175. ```
  1176. The model with the lower AIC is the model with all predictors.
  1177. ```{r}
  1178. low_beta_600_data_pat <- within(low_beta_600_data, Condition <- relevel(Condition, ref = "patient"))
  1179. gam_space_low_beta_600_pat <-
  1180. bam(formula = Power
  1181. ~ 1
  1182. + Condition
  1183. + surprisal.C
  1184. + trial_number.C
  1185. + te(x, y, by = Condition)
  1186. + te(x, y, by = surprisal.C)
  1187. + s(Participant,x, y, bs = "re")
  1188. + s(number_item,x, y, bs = "re")
  1189. ,
  1190. data = low_beta_600_data_pat,
  1191. method = "ML",
  1192. gc.level = 0)
  1193. summary(gam_space_low_beta_600_pat)
  1194. summary(gam_space_low_beta_600_all)
  1195. saveRDS(gam_space_low_beta_600_pat, file = "gam_space_low_beta_600_all_pat.rds")
  1196. ```
  1197. ### Plots
  1198. ```{r}
  1199. gam_space_low_beta_600_null <- readRDS("gam_space_low_beta_600_null.rds")
  1200. gam_space_low_beta_600_all <- readRDS("gam_space_low_beta_600_all.rds")
  1201. gam_space_low_beta_600_es <- readRDS("gam_space_low_beta_600_es.rds")
  1202. gam_space_low_beta_600_s <- readRDS("gam_space_low_beta_600_s.rds")
  1203. gam_space_low_beta_600_pat <- readRDS("gam_space_low_beta_600_all_pat.rds")
  1204. png("agent_experiencer_lowbeta_600.png", width = 1800, height = 1500, res = 300)
  1205. par(mar = c(5, 4, 4, 8))
  1206. plot_diff2(
  1207. model = gam_space_low_beta_600_all,
  1208. view = c("x", "y"),
  1209. comp = list(Condition = c("agent", "experiencer")),
  1210. show.diff = T,
  1211. sim.ci = T,
  1212. rm.ranef = T,
  1213. color = gplots::rich.colors(n = 256, palette = "temperature"),
  1214. ci.col = c("gray", "gray"),
  1215. main = "Agent - Experiencer",
  1216. add.color.legend = F,
  1217. zlim = c(-1, 1)
  1218. )
  1219. fields::image.plot(
  1220. legend.only = TRUE,
  1221. zlim = c(-1, 1),
  1222. col = gplots::rich.colors(256, "temperature"),
  1223. legend.args = list(text = "", side = 4, line = 2)
  1224. )
  1225. dev.off()
  1226. png("patient_agent_lowbeta_600.png", width = 1800, height = 1500, res = 300)
  1227. par(mar = c(5, 4, 4, 8))
  1228. plot_diff2(
  1229. model = gam_space_low_beta_600_pat,
  1230. view = c("x", "y"),
  1231. comp = list(Condition = c("patient", "agent")),
  1232. show.diff = T,
  1233. sim.ci = T,
  1234. rm.ranef = T,
  1235. color = gplots::rich.colors(n = 256, palette = "temperature"),
  1236. ci.col = c("gray", "gray"),
  1237. main = "Patient - Agent",
  1238. add.color.legend = F,
  1239. zlim = c(-1, 1)
  1240. )
  1241. fields::image.plot(
  1242. legend.only = TRUE,
  1243. zlim = c(-1, 1),
  1244. col = gplots::rich.colors(256, "temperature"),
  1245. legend.args = list(text = "", side = 4, line = 2)
  1246. )
  1247. png("patient_experiencer_lowbeta_600.png", width = 1800, height = 1500, res = 300)
  1248. par(mar = c(5, 4, 4, 8))
  1249. plot_diff2(
  1250. model = gam_space_low_beta_600_pat,
  1251. view = c("x", "y"),
  1252. comp = list(Condition = c("patient", "experiencer")),
  1253. show.diff = T,
  1254. sim.ci = T,
  1255. rm.ranef = T,
  1256. color = gplots::rich.colors(n = 256, palette = "temperature"),
  1257. ci.col = c("gray", "gray"),
  1258. main = "Patient - Experiencer",
  1259. add.color.legend = F,
  1260. zlim = c(-1, 1)
  1261. )
  1262. fields::image.plot(
  1263. legend.only = TRUE,
  1264. zlim = c(-1, 1),
  1265. col = gplots::rich.colors(256, "temperature"),
  1266. legend.args = list(text = "", side = 4, line = 2)
  1267. )
  1268. dev.off()
  1269. ```

TFA.qmd, no license · at the source

Overview

  1. Department of Linguistics and Basque Studies, University of the Basque Country (UPV/EHU), Vitoria-Gasteiz, Spain
  2. Université de Pau et des Pays de l’Adour, Bayonne, France
  3. CNRS-IKER UMR 5478, Bayonne, France
  4. Institute for the Interdisciplinary Study of Language Evolution (ISLE), University of Zurich, Zurich, Switzerland
Journal: Open mind : discoveries in cognitive science, volume 10, pages 1092-1117
Dates: received 19 December 2025; accepted 29 May 2026; published online 17 July 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1162/opmi.a.372 · PMID 42657401 · PMCID PMC13518077 · OpenAlex W7162969484
Open access: gold, a free copy (OpenAlex)
Preprint: osf.io/t9zer
Status: code verified
Categories: EEG (modality), human (organism), clinical / translational (subfield)
Keywords: event roles, proto-roles, agent preference, eye-tracking, EEG
Topic: Neural and Behavioral Psychology Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Citations: not cited yet (Europe PMC); 109 references in the paper

Abstract

Despite the large number of proposed event roles, psycholinguistic evidence supports only two core knowledge categories with distinct processing correlates: agent and patient roles. This evidence aligns with the proto-role approach, which proposes only two proto-roles, proto-agent and proto-patient. Here, we investigate the processing correlates of arguments labeled as “experiencers” to determine whether they exhibit specific processing correlates, as agents and patients do, or whether they are subsumed under the proto-agent role category, sharing similar processing correlates with agents and differing from patients. We conducted both eye-tracking and EEG reading tasks, where Spanish speakers were instructed to read intransitive sentences with either agent, experiencer, or patient subjects. In eye-tracking, agents and experiencers elicited longer fixation times and regression counts than patients, in both the verb and post-verb regions. In EEG, we replicated the known N400 component associated with processing patients compared to both agents and experiencers. Crucially, no N400 effect was observed when comparing agents to experiencers. Additionally, patients revealed a power increase in the theta band compared to agents and experiencers, and a power decrease in the low-beta band. These findings replicate previous results supporting a transient preference for agents in language comprehension and suggest that experiencers align with agents in this regard, providing further evidence for the proto-role approach.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repositories

Its files are read in the Code ↔ Paper reader above, with 7 matches between paragraphs and lines of code.

OSF t9zer

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Languages: Quarto (10), MATLAB (1)
Size: 205 files, 11 scripts
Software Heritage: not checked
Found in: “DATA AVAILABILITY STATEMENT”
Holds: 10 notebooks
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: brms (8 files), tidyverse (6 files), car (2 files), mgcv (2 files), reshape2 (2 files), Stan (2 files), data.table (1 file), EEGLAB (1 file), ERPLAB (1 file), FieldTrip (1 file), ggplot2 (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
11 files

OSF wnar8

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Languages: Quarto (10)
Size: 56 files, 10 scripts
Software Heritage: not checked
Found in: the references
Holds: 10 notebooks
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: brms (7 files), tidyverse (7 files), ggplot2 (2 files), patchwork (1 file), Stan (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
10 files

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:

  • 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 21 scripts, each with its path and the digest of its content;
  • 7 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • 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

The data, analysis scripts, materials, and appendices can be accessed at the following OSF repository: https://osf.io/t9zer/overview?view_only=182b23f8871f4205ba256ac9b13cdc0c.

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, 27 September 2026: the first record

Recorded: type, language, journal, volume, pages, dates, 4 authors, 5 keywords, 89 references.

Cite

This paper

Sánchez-López, M., Isasi-Isasmendi, A., Bickel, B., & Santesteban, M. (2026). Broadening the Agent Preference Hypothesis Through Experiencers: Eye-Tracking and EEG Evidence of Proto-Agents and Proto-Patients. Open mind : discoveries in cognitive science, 10, 1092-1117. https://doi.org/10.1162/opmi.a.372

BibTeX

@article{sanchezlopez2026broadening,
author = {Sánchez-López, Marta and Isasi-Isasmendi, Arrate and Bickel, Balthasar and Santesteban, Mikel},
title = {{Broadening the Agent Preference Hypothesis Through Experiencers: Eye-Tracking and EEG Evidence of Proto-Agents and Proto-Patients}},
journal = {Open mind : discoveries in cognitive science},
year = {2026},
month = jul,
volume = {10},
pages = {1092--1117},
publisher = {MIT Press},
issn = {2470-2986},
doi = {10.1162/opmi.a.372},
url = {https://doi.org/10.1162/opmi.a.372},
pmid = {42657401},
pmcid = {PMC13518077}
}

RIS

TY - JOUR
AU - Sánchez-López, Marta
AU - Isasi-Isasmendi, Arrate
AU - Bickel, Balthasar
AU - Santesteban, Mikel
TI - Broadening the Agent Preference Hypothesis Through Experiencers: Eye-Tracking and EEG Evidence of Proto-Agents and Proto-Patients
T2 - Open mind : discoveries in cognitive science
J2 - Open Mind (Camb)
PY - 2026
DA - 2026/07/17
VL - 10
SP - 1092
EP - 1117
SN - 2470-2986
PB - MIT Press
DO - 10.1162/opmi.a.372
UR - https://doi.org/10.1162/opmi.a.372
LA - en
ER -

CSL-JSON

{
"id": "10.1162/opmi.a.372",
"type": "article-journal",
"title": "Broadening the Agent Preference Hypothesis Through Experiencers: Eye-Tracking and EEG Evidence of Proto-Agents and Proto-Patients",
"container-title": "Open mind : discoveries in cognitive science",
"author": [
{
"family": "Sánchez-López",
"given": "Marta"
},
{
"family": "Isasi-Isasmendi",
"given": "Arrate"
},
{
"family": "Bickel",
"given": "Balthasar"
},
{
"family": "Santesteban",
"given": "Mikel"
}
],
"container-title-short": "Open Mind (Camb)",
"volume": "10",
"page": "1092-1117",
"DOI": "10.1162/opmi.a.372",
"PMID": "42657401",
"PMCID": "PMC13518077",
"ISSN": "2470-2986",
"publisher": "MIT Press",
"URL": "https://doi.org/10.1162/opmi.a.372",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
17
]
]
}
}

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.1162/imag.a.1258 [code]
Non-specific increase in alpha power during a neurofeedback session targeting its downregulation.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: Stan, brms, EEGLAB, 4 other tools, EEG, 3 references
[2] doi:10.1523/eneuro.0316-25.2026 [code]
Neural Mechanisms of Self-Generated Action Sequences.
Journal: eNeuro
In common: ERPLAB, brms, EEGLAB, 4 other tools, EEG, 2 references
[3] doi:10.1016/j.celrep.2026.117505 [code]
Impaired spatial coding and neuronal hyperactivity in the medial entorhinal cortex of aged APP knock-in mice.
Journal: Cell reports
In common: Stan, brms, mgcv, 5 other tools
[4] doi:10.1371/journal.pbio.3003979 [code]
Impaired midfrontal‑motor theta phase synchronization characterizes maladaptive motivational behavior in people with obsessive‑compulsive disorder.
Journal: PLoS biology
In common: Stan, car, EEGLAB, 4 other tools, EEG, 2 references
[5] 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 one
In common: ERPLAB, car, EEGLAB, 4 other tools, EEG, 1 reference
[6] doi:10.7554/elife.111114 [code]
Theta beta ratio in attention deficit hyperactivity disorder using a multiverse analysis.
Journal: eLife
In common: EEGLAB, FieldTrip, patchwork, 2 other tools, EEG, 4 references
[7] doi:10.1523/eneuro.0076-26.2026 [code]
Exogenously Driven Neural Reactivation of Spatially Matching Visual Working-Memory Contents.
Journal: eNeuro
In common: brms, car, FieldTrip, 4 other tools, EEG, 1 reference
[8] doi:10.1371/journal.pone.0355165 [code]
Pupillary dynamics during hands-off L2 driving and transitions of control under high cognitive load.
Journal: PloS one
In common: Stan, brms, mgcv, 4 other tools
[9] doi:10.1162/imag.a.1201 [code]
All spectral frequencies of neural activity reveal semantic representation in the human anterior ventral temporal cortex.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: EEGLAB, FieldTrip, reshape2, 2 other tools, 4 references
[10] doi:10.1371/journal.pbio.3003899 [code]
Social interactions between people of same and different generations shape longitudinal changes in interpersonal neural synchrony, loneliness, and social connection.
Journal: PLoS biology
In common: brms, FieldTrip, data.table, 3 other tools, 2 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.

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: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.