OSCR

Task load modulates network interactions between bilateral fronto-parietal and cerebellar areas during verbal working memory.

Code ↔ Paper

10 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 10 matches
  1. [1] § STAR★Methods › Quantification and statistical analysis › Effective connectivity analysis ↔ scripts/10_run_watershed_masked.m, lines 85 to 118 · score 0.82 · watershed algorithm, binary masks, overlap map, activated voxels, sub, thresholded · Report a mismatch
  2. [2] § STAR★Methods › Quantification and statistical analysis › Effective connectivity analysis ↔ scripts/10_run_watershed_masked.m, lines 85 to 118 · score 0.80 · binary mask, overlap map, individual activation, Atlas, FLIRT, kernel · Report a mismatch
  3. [3] § STAR★Methods › Quantification and statistical analysis › Behavioral, statistical analyses ↔ scripts/31_analyse_plot_behavior_DCM.Rmd, lines 1096 to 1136 · score 0.67 · Wilcoxon signed rank, post hoc, Friedman, RT, interaction, behavioral · Report a mismatch
  4. [4] § STAR★Methods › Quantification and statistical analysis › fMRI analysis ↔ scripts/04_create_nuisance_regressors_individual_sess_memoslap.m, lines 54 to 88 · score 0.63 · nuisance regressors, aCompCor, motion, SPM12, blocked, fMRI · Report a mismatch
  5. [5] § STAR★Methods › Quantification and statistical analysis › Effective connectivity analysis ↔ scripts/09_create_interindividual_overlap_maps.m, lines 58 to 87 · score 0.62 · overlap map, individual activation, FWHM, smoothed, thresholded, ROI · Report a mismatch
  6. [6] § Results › Behavioral performance ↔ scripts/31_analyse_plot_behavior_DCM.Rmd, lines 1096 to 1136 · score 0.59 · Wilcoxon signed rank, Post hoc, Friedman, interaction, Behavioral · Report a mismatch
  7. [7] § Results › Behavioral performance ↔ scripts/31_analyse_plot_behavior_DCM.Rmd, lines 937 to 988 · score 0.59 · Wilcoxon signed rank, Post hoc, Friedman, Behavioral · Report a mismatch
  8. [8] § STAR★Methods › Quantification and statistical analysis › Effective connectivity analysis ↔ scripts/31_analyse_plot_behavior_DCM.Rmd, lines 522 to 602 · score 0.58 · correlation coefficients, Bayes factors, Bayesian, posterior, connectivity · Report a mismatch
  9. [9] § STAR★Methods › Quantification and statistical analysis › fMRI analysis ↔ scripts/06_first_level_simple_diagonal_concat_memoslap.m, lines 77 to 118 · score 0.58 · nuisance regressors, canonical, derivatives, HRF, diagonal, motion · Report a mismatch
  10. [10] § Results › Functional activation ↔ scripts/08_overlap_index_memoslap.py, lines 85 to 110 · score 0.51 · overlap coefficient, negative task activation, DMN, network, brain, voxels · Report a mismatch

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 Markdown · 1,470 lines · 49 KB · no license · 4 matches

  1. ---
  2. title: "Behavioral_Brain_Correlations"
  3. author: "Gerasimos Gerardos"
  4. date: "2026-01-26"
  5. output: html_document
  6. ---
  7. ```{r setup, include=FALSE}
  8. knitr::opts_chunk$set(echo = TRUE)
  9. library(nlme)
  10. library(lme4)
  11. library(data.table)
  12. library(lmerTest)
  13. library(tidyverse)
  14. library(ICC)
  15. library(readxl)
  16. library(parameters)
  17. library(ggpubr)
  18. library(ggsignif)
  19. library(see)
  20. library(ARTool)
  21. library(BayesFactor)
  22. ```
  23. ```{r}
  24. if (!require("tidyverse")) install.packages("tidyverse", dependencies = T)
  25. if (!require("tidyr")) install.packages("tidyr", dependencies = T)
  26. if (!require("dplyr")) install.packages("diplyr", dependencies = T)
  27. if (!require("lubridate")) install.packages("lubridate", dependencies = T)
  28. if (!require("readr")) install.packages("readr", dependencies = T)
  29. if (!require("forcats")) install.packages("forcats", dependencies = T)
  30. if (!require("fs")) install.packages("fs", dependencies = T)
  31. if (!require("readxl")) install.packages("readxl", dependencies = T)
  32. if (!require("stats")) install.packages("stats", dependencies = T)
  33. if (!require("ggplot2")) install.packages("stats", dependencies = T)
  34. if (!require("base")) install.packages("stats", dependencies = T)
  35. library(car)
  36. if (!require("ggridges")) install.packages("ggridges", dependencies = T)
  37. if (!require("ggplot")) install.packages("ggplot", dependencies = T)
  38. if (!require("ggbeeswarm")) install.packages("ggbeeswarm", dependencies = T)
  39. if (!require("afex")) install.packages("afex", dependencies = T)
  40. if (!require("sjPlot")) install.packages("sjPlot", dependencies = T)
  41. if (!require("readxl")) install.packages("readxl", dependencies = T)
  42. if (!require("bayestestR")) install.packages("bayestestR", dependencies = T)
  43. if (!require("brms")) install.packages("brms", dependencies = T)
  44. ```
  45. Set working directory
  46. ```{r}
  47. work_directory <- "/data/pt_02809/MeMoSLAP/p4_dcm/final_codes/LMM_DCM_Analysis/LMM_DCM_true_concat_512max/long_task_table"
  48. setwd(work_directory)
  49. ```
  50. Laod raw PsychoPy files
  51. ```{r}
  52. files <- list.files(work_directory, pattern = "*.csv", full.names = TRUE)
  53. # Initialize an empty list to store data frames
  54. data_list <- list()
  55. # Read each file and store it in the list
  56. for (file in files) {
  57. tryCatch({
  58. # Read each CSV file with the full path
  59. data <- read.csv(file, header = TRUE, sep = ",", na.strings = "NA", stringsAsFactors = FALSE)
  60. # Store the data frame in the list
  61. data_list[[file]] <- data
  62. }, error = function(e) {
  63. cat("Error in file:", file, "\n", e, "\n")
  64. })
  65. }
  66. ```
  67. Files connected:
  68. ```{r}
  69. # Identify common columns
  70. common_cols <- Reduce(intersect, lapply(data_list, names))
  71. # Filter each data frame to include only common columns
  72. filtered_data_list <- lapply(data_list, function(df) df[, common_cols, drop = FALSE])
  73. # Combine data frames using bind_rows
  74. Data_complete <- do.call(rbind,filtered_data_list)
  75. ## create a Data Set that ommits the NA values of the variable curr_n_back:
  76. Data_complete_clean <- Data_complete[!is.na(Data_complete$curr_n_back), ]
  77. # Check the structure of the new data set
  78. #str(Data_complete_clean)
  79. ```
  80. Accuracy:
  81. ```{r}
  82. # Calculate accuracy, false alarm rate, and miss rate by participant and difficulty level (curr_n_back)
  83. metrics_by_condition <- Data_complete_clean %>%
  84. group_by(participant, curr_n_back) %>%
  85. summarise(
  86. Correct = sum(result == "Correct", na.rm = TRUE),
  87. Correct_rejected = sum(result == "Okay", na.rm = TRUE),
  88. Miss = sum(result == "Absent", na.rm = TRUE),
  89. False_Alarm = sum(result == "Incorrect", na.rm = TRUE),
  90. Total = n()
  91. ) %>%
  92. mutate(
  93. Accuracy = (Correct + Correct_rejected) / Total,
  94. False_Alarm_rate = False_Alarm / Total,
  95. Miss_rate = Miss / Total
  96. )
  97. ```
  98. d' analysis
  99. ```{r}
  100. # adjusted ratios (Hautus, 1995) --> recommended by Gerry: Maybe ask him again? https://www.researchgate.net/post/What-does-a-high-D-prime-score-mean
  101. # https://neuropsychology.github.io/psycho.R/2018/03/29/SDT.html
  102. # Calculate hit rate (HR) and false alarm rate (FAR) for each participant and condition
  103. hit_false_alarm_rates <- Data_complete_clean %>%
  104. group_by(participant, curr_n_back, block.thisN) %>%
  105. summarise(
  106. Hits = sum(result == "Correct", na.rm = TRUE),
  107. Misses = sum(result == "Absent", na.rm = TRUE),
  108. False_Alarms = sum(result == "Incorrect", na.rm = TRUE),
  109. Correct_Rejections = sum(result == "Okay", na.rm = TRUE),
  110. Total_Target = Hits + Misses,
  111. Total_NonTarget = False_Alarms + Correct_Rejections,
  112. HR = (sum(result == "Correct", na.rm = TRUE) + 0.5) / (sum(result == "Correct", na.rm = TRUE) + sum(result == "Absent", na.rm = TRUE) + 1), # Adjusted Hit Rate: Hautus correction
  113. FAR = (sum(result == "Incorrect", na.rm = TRUE) + 0.5) / (sum(result == "Incorrect", na.rm = TRUE) + sum(result == "Okay", na.rm = TRUE) + 1) # Adjusted False Alarm Rate: Hautus correction
  114. )
  115. # Compute d' for each participant and condition
  116. d_prime_values <- hit_false_alarm_rates %>%
  117. mutate(d_prime = qnorm(HR) - qnorm(FAR)) %>%
  118. ungroup() %>%
  119. select(participant, curr_n_back, d_prime, block.thisN) %>%
  120. distinct() # Keep unique values
  121. # Print the d' values
  122. d_prime_values
  123. #write.csv(d_prime_values, "/data/pt_02809/MeMoSLAP/p4_dcm/final_codes/nback_behaviour/tables/d_values_raw.csv", row.names = FALSE, col.names = TRUE)
  124. ```
  125. Average d-prime per session: if raw file not available load the d-prime raw table
  126. ```{r}
  127. #d_prime_values <- read.csv("/data/pt_02809/MeMoSLAP/p4_dcm/final_codes/nback_behaviour/tables/d_values_raw.csv", header = TRUE, stringsAsFactors = FALSE)
  128. # Calculate the average d' for each participant (without session identifier) and condition
  129. session_average_d_prime <- d_prime_values %>%
  130. group_by(participant, curr_n_back) %>%
  131. summarise(mean_d_prime = mean(d_prime, na.rm = TRUE)) %>%
  132. ungroup()
  133. # Print the averaged d' values
  134. session_average_d_prime
  135. ```
  136. NEW Averages grouped over Participants and sessions:
  137. ```{r}
  138. # Calculate the average d' for each participant and condition over the two sessions
  139. session_average_d_prime <- d_prime_values %>%
  140. mutate(participant_id = sapply(d_prime_values$participant, function(x) {
  141. # Extract the single match of "40xx"
  142. regmatches(x, regexpr("40\\d{2}", x))
  143. })) %>%
  144. group_by(participant_id, curr_n_back) %>%
  145. summarise(mean_d_prime = mean(d_prime, na.rm = TRUE)) %>%
  146. ungroup()
  147. # Print the averaged d' values
  148. session_average_d_prime
  149. ```
  150. Prepare data for statistics and plotting
  151. ```{r}
  152. d_n <- as.data.frame(session_average_d_prime)
  153. d_n$curr_n_back <- as.factor(d_n$curr_n_back)
  154. idx_nback <- unique(d_n$curr_n_back)
  155. d_n$out_flag <- NaN
  156. for (n in idx_nback) {
  157. # Calculate Tukey's fences
  158. Q1 <- quantile(d_n[d_n$curr_n_back==n, c("mean_d_prime")], 0.25)
  159. Q3 <- quantile(d_n[d_n$curr_n_back==n, c("mean_d_prime")], 0.75)
  160. IQR <- Q3 - Q1
  161. lower_fence <- Q1 - 1.5 * IQR
  162. upper_fence <- Q3 + 1.5 * IQR
  163. d_n[d_n$curr_n_back==n, c("out_flag")]<- ifelse(d_n[d_n$curr_n_back==n, c("mean_d_prime")] < lower_fence | d_n[d_n$curr_n_back==n, c("mean_d_prime")] > upper_fence, "outlier", "inlier")
  164. }
  165. d_n
  166. ```
  167. Friedman tests and post-hoc paired Wilcoxon tests
  168. ```{r}
  169. # Global test
  170. fried_test <- friedman.test(cbind(d_n$mean_d_prime[d_n$curr_n_back==0],
  171. d_n$mean_d_prime[d_n$curr_n_back==1],
  172. d_n$mean_d_prime[d_n$curr_n_back==2],
  173. d_n$mean_d_prime[d_n$curr_n_back==3]))
  174. avg_d_tests <- data.frame(
  175. method = fried_test$method,
  176. data = "0, 1, 2, 3 -back",
  177. statistic = as.numeric(fried_test$statistic),
  178. p_value = round(fried_test$p.value, 3),
  179. p_bonferroni = NA
  180. )
  181. paired_wilcox <- function(x, y) {
  182. # Perform paired Wilcoxon test
  183. test_result <- wilcox.test(x, y, paired = TRUE, exact = FALSE)
  184. return(test_result)
  185. }
  186. k = length(idx_nback)
  187. n_com = (k * (k - 1)) / 2
  188. if (avg_d_tests$p_value[1] < 0.5) {
  189. options(digits = 4)
  190. i = 0
  191. for (n in list( c("0", "1"), c("0", "2"),c("0", "3"), c("1", "2"),c("1", "3"), c("2", "3"))){
  192. x = d_n$mean_d_prime[d_n$curr_n_back==as.numeric(n[1])]
  193. y = d_n$mean_d_prime[d_n$curr_n_back==as.numeric(n[2])]
  194. wil_test <- paired_wilcox(x,y)
  195. ntest <- data.frame(
  196. method = wil_test$method,
  197. data = paste0(n[1],' vs ',n[2],' -back'),
  198. statistic = NA,
  199. p_value = round(wil_test$p.value, 3),
  200. p_bonferroni = round(wil_test$p.value*n_com, 3)
  201. )
  202. avg_d_tests[2+i,] <- ntest
  203. i = i+1
  204. }
  205. }
  206. avg_d_tests
  207. ```
  208. Plot results
  209. ```{r}
  210. dn <-ggplot(d_n, aes(x=curr_n_back, y=mean_d_prime, fill=curr_n_back)) +
  211. geom_violin() +
  212. geom_boxplot(width = 0.1, color = "black", fill = NA,outlier.shape = NA) +
  213. geom_jitter(position=position_jitter(0.03), aes(color = out_flag), size = 0.5)+
  214. scale_color_manual(values = c("black", "red3"))
  215. if (avg_d_tests$p_value[1] < 0.5) {
  216. dn <- dn +
  217. geom_signif(
  218. comparisons = list( c("0", "1"), c("1", "2"), c("2", "3")),
  219. map_signif_level = c("***"=0.001/n_com, "**"=0.01/n_com, "*"=0.05/n_com),
  220. y_position = 4, textsize = 5, vjust = 0.8,
  221. test = paired_wilcox) +
  222. geom_signif(
  223. comparisons = list( c("0", "2")),
  224. map_signif_level = c("***"=0.001/n_com, "**"=0.01/n_com, "*"=0.05/n_com),
  225. y_position = 4.2, textsize = 5, vjust = 0.8, tip_length = 0.02,
  226. test = paired_wilcox) +
  227. geom_signif(
  228. comparisons = list(c("1", "3")),
  229. map_signif_level = c("***"=0.001/n_com, "**"=0.01/n_com, "*"=0.05/n_com),
  230. y_position = 4.4, textsize = 5, vjust = 0.8, tip_length = 0.02,
  231. test = paired_wilcox) +
  232. geom_signif(
  233. comparisons = list( c("0", "3")),
  234. map_signif_level = c("***"=0.001/n_com, "**"=0.01/n_com, "*"=0.05/n_com),
  235. y_position =4.6, textsize = 5, vjust = 0.8,
  236. test = paired_wilcox)
  237. }
  238. dn <- dn +
  239. labs(x = "n-back Condition", y = "Sensitivity (d')") +
  240. #ggtitle("Mean Senstivity (d') per n-back Condition") + # for the main title
  241. theme_modern() +
  242. scale_fill_okabeito(palette = "full", order = c(1, 5, 3, 6))
  243. dn
  244. ```
  245. session tests
  246. ```{r}
  247. # Calculate the average d' for each participant and condition over the two sessions
  248. session_d_prime <- d_prime_values %>%
  249. group_by(participant, curr_n_back) %>%
  250. summarise(mean_d_prime = mean(d_prime, na.rm = TRUE)) %>%
  251. ungroup()
  252. # Print the averaged d' values
  253. session_d_prime
  254. ```
  255. ```{r}
  256. d_s <- session_d_prime
  257. d_s <- as.data.frame(d_s)
  258. d_s$session[grepl("1$", d_s$participant)] <- "1"
  259. d_s$session[grepl("2$", d_s$participant)] <- "2"
  260. d_s$participant <- sapply(d_s$participant, function(x) {
  261. # Extract the single match of "40xx"
  262. regmatches(x, regexpr("40\\d{2}", x))
  263. })
  264. d_s$out_flag <- NaN
  265. sess <- unique(d_s$session)
  266. for (n in idx_nback) {
  267. for (s in sess) {
  268. # Calculate Tukey's fences
  269. Q1 <- quantile(d_s[d_s$curr_n_back==n & d_s$sess==s, c("mean_d_prime")], 0.25)
  270. Q3 <- quantile(d_s[d_s$curr_n_back==n & d_s$sess==s, c("mean_d_prime")], 0.75)
  271. IQR <- Q3 - Q1
  272. lower_fence <- Q1 - 1.5 * IQR
  273. upper_fence <- Q3 + 1.5 * IQR
  274. d_s[d_s$curr_n_back==n & d_s$sess==s, c("out_flag")]<- ifelse(d_s[d_s$curr_n_back==n & d_s$sess==s, c("mean_d_prime")] < lower_fence | d_s[d_s$curr_n_back==n & d_s$sess==s, c("mean_d_prime")] > upper_fence, "outlier", "inlier")
  275. }
  276. }
  277. d_s
  278. ```
  279. ```{r}
  280. d_s$curr_n_back <- as.factor(d_s$curr_n_back)
  281. d_s$participant <-as.factor(d_s$participant)
  282. d_s$session <- as.factor(d_s$session)
  283. df_art <- art(mean_d_prime ~ curr_n_back * session + (1 | participant), data = d_s )
  284. # Perform ART ANOVA
  285. art_anova_results <- anova(df_art)
  286. # Print results
  287. print(art_anova_results)
  288. df_text <- capture.output(print(art_anova_results))
  289. if (art_anova_results['session','Pr(>F)']<=0.05 | art_anova_results['curr_n_back:session','Pr(>F)']<=0.05)
  290. {
  291. wide_ses <- d_s %>%
  292. unite("back_sess", curr_n_back, session, sep = "back_sess") %>% # combine back and sess
  293. pivot_wider(
  294. id_cols = code,
  295. names_from = back_sess,
  296. values_from = mean_d_prime
  297. )
  298. wide_matrix <- wide_ses %>%
  299. select(-participant) %>% # Remove the identifier column
  300. as.matrix() # Convert to matrix
  301. # Get all unique pairwise combinations of columns
  302. combinations <- combn(colnames(wide_matrix), 2, simplify = FALSE)
  303. # Apply paired Wilcoxon test to each pair
  304. wilcox_results <- lapply(combinations, function(pair) {
  305. test <- wilcox.test(wide_matrix[, pair[1]], wide_matrix[, pair[2]], paired = TRUE, exact = FALSE)
  306. data.frame(
  307. group1 = pair[1],
  308. group2 = pair[2],
  309. p_value = test$p.value
  310. )
  311. })
  312. # Combine results into a data frame
  313. results_df <- do.call(rbind, wilcox_results)
  314. # Apply Bonferroni correction
  315. results_df$adjusted_p <- p.adjust(results_df$p_value, method = "bonerroni")
  316. results_df <- results_df %>%
  317. mutate(significance = case_when(
  318. adjusted_p <= 0.001 ~ "***",
  319. adjusted_p <= 0.01 ~ "**",
  320. adjusted_p <= 0.05 ~ "*",
  321. TRUE ~ "ns"
  322. ))
  323. print(results_df)
  324. }
  325. ```
  326. ```{r}
  327. dses <- ggplot(d_s, aes(x = curr_n_back, y = mean_d_prime, fill = interaction(session, curr_n_back))) +
  328. geom_violin() +
  329. geom_boxplot(aes(group = interaction(session, curr_n_back)), position = position_dodge(width = 0.9), width = 0.1, color = "black", fill = NA,outlier.shape = NA) +
  330. geom_point(aes(group = interaction(session, curr_n_back)), position = position_dodge(width = 0.9), size = 0.5,color = "black") +
  331. # Lines connecting data points from session 1 to session 2
  332. geom_line(aes(x = as.numeric(curr_n_back) +
  333. ifelse(session == levels(session)[1], -0.375/2, 0.375/2),
  334. group = interaction(participant, curr_n_back)),
  335. alpha = 0.6, color = "gray40", linetype = "dotted") +
  336. #ggtitle("Sensitivity (d') of individual blocks per n-back level") + # for the main title
  337. labs(x = "n-back Condition", y = "Sensitivity (d')")+
  338. #stat_compare_means(method = "wilcox.test", paired = TRUE, label.y = 4.9, p.adjust.method = "bonferroni" )+
  339. theme_modern() +
  340. scale_fill_manual(name = "nback x session", labels = c("0back in ses-1","0back in ses-2","1back in ses-1","1back in ses-2","2back in ses-1","2back in ses-2","3back in ses-1","3back in ses-2"),
  341. values = c( "goldenrod1","goldenrod3", "dodgerblue","dodgerblue3","seagreen3","seagreen4","tomato1","tomato3")) +
  342. scale_color_manual(name = "nback x session", labels = c("0back in ses-1","0back in ses-2","1back in ses-1","1back in ses-2","2back in ses-1","2back in ses-2","3back in ses-1","3back in ses-2"),
  343. values = c( "goldenrod3","goldenrod4","dodgerblue3","dodgerblue4","seagreen4","darkgreen","tomato3","tomato4")) +
  344. theme(
  345. axis.ticks.length = unit(5, "pt"), # makes ticks longer (more dash-like)
  346. axis.ticks = element_line(linewidth = 0.5, linetype = "solid", color = "black")
  347. )+
  348. ylim(0.8, 4)
  349. dses
  350. ```
  351. Without 0back:
  352. ```{r}
  353. # Calculate the average d' for each participant and condition, excluding 0-back
  354. session_average_d_prime_123 <- session_average_d_prime %>%
  355. filter(curr_n_back != "0")
  356. # Print the averaged d' values
  357. session_average_d_prime_123
  358. ```
  359. ```{r}
  360. # Load the DCM connectivity data from Excel file
  361. dcm_data <- read_excel("/data/pt_02809/MeMoSLAP/p4_dcm/final_codes/DCM_true_concat_512max/modulatory_connectivity_B_n1back_Mean_DCM_analysis_mask_CER_PAR_IFG_ROI_s4fmap_brain_true_concat_512max.xlsx")
  362. # View the first few rows of your data to understand its structure
  363. #head(dcm_data)
  364. #head(session_average_d_prime_123)
  365. # Create a vector of participant IDs excluding 4004
  366. participant_ids <- unique(session_average_d_prime_123$participant_id)
  367. # Assign to the data frame
  368. dcm_data <- dcm_data %>%
  369. mutate(participant_id = participant_ids)
  370. # Print the updated dcm_data to verify the change
  371. #dcm_data
  372. # Combine the dPrime table with the B-matrix parameters table
  373. mcombined_data <- session_average_d_prime_123 %>%
  374. left_join(dcm_data, by = "participant_id") # Join by participant ID
  375. # Print the combined data
  376. #combined_data
  377. # Load the DCM connectivity data from Excel file
  378. dcm_data <- read_excel("/data/pt_02809/MeMoSLAP/p4_dcm/final_codes/DCM_true_concat_512max/modulatory_connectivity_B_n2back_Mean_DCM_analysis_mask_CER_PAR_IFG_ROI_s4fmap_brain_true_concat_512max.xlsx")
  379. # Assign to the data frame
  380. dcm_data <- dcm_data %>%
  381. mutate(participant_id = participant_ids)
  382. # Print the updated dcm_data to verify the change
  383. #dcm_data
  384. # Combine the dPrime table with the B-matrix parameters table
  385. mcombined_data <- mcombined_data %>%
  386. left_join(dcm_data, by = "participant_id") # Join by participant ID
  387. # Print the combined data
  388. #combined_data
  389. # Load the DCM connectivity data from Excel file
  390. dcm_data <- read_excel("/data/pt_02809/MeMoSLAP/p4_dcm/final_codes/DCM_true_concat_512max/modulatory_connectivity_B_n3back_Mean_DCM_analysis_mask_CER_PAR_IFG_ROI_s4fmap_brain_true_concat_512max.xlsx")
  391. # Assign to the data frame
  392. dcm_data <- dcm_data %>%
  393. mutate(participant_id = participant_ids)
  394. # Print the updated dcm_data to verify the change
  395. #dcm_data
  396. # Combine the dPrime table with the B-matrix parameters table
  397. mcombined_data <- mcombined_data %>%
  398. left_join(dcm_data, by = "participant_id") # Join by participant ID
  399. # Print the combined data
  400. mcombined_data
  401. ```
  402. ```{r}
  403. # Initialize a data frame to store correlation results with p-values
  404. Bayes_correlation_results_nback_mod <- data.frame(
  405. Connectivity_Variable = character(),
  406. Bayesian_Factor = numeric(),
  407. median_r = numeric(),
  408. CI_lower95_r = numeric(),
  409. CI_upper95_r= numeric(),
  410. Significance = character(),
  411. stringsAsFactors = FALSE
  412. )
  413. interpret_bayes_factor <- function(bf) {
  414. if (bf <= 1 ) {
  415. interpretation <- "Null"
  416. } else if (bf > 1 && bf <= 3) {
  417. interpretation <- "Weak"
  418. } else if (bf > 3 && bf <= 10) {
  419. interpretation <- "Moderate"
  420. } else if (bf > 10 && bf <= 30) {
  421. interpretation <- "Strong"
  422. } else if (bf > 30 && bf <= 100) {
  423. interpretation <- "Very strong "
  424. } else if (bf > 100) {
  425. interpretation <- "Extreme"
  426. } else {
  427. interpretation <- "Uninterpretable value"
  428. }
  429. return(interpretation)
  430. }
  431. for (n_level in 1:3) {
  432. # Filter data for 3-back condition
  433. Bayes_mod_data_nback <-mcombined_data %>%
  434. filter(curr_n_back == n_level)
  435. # Extract column names
  436. connectivity_variables <- colnames(mcombined_data)[startsWith(colnames(mcombined_data), paste0('n',as.character(n_level)))]
  437. # Loop through each connectivity variable, run cor.test, and extract the correlation coefficient and p-value
  438. for (var in connectivity_variables) {
  439. # Perform the cor.test for the current variable
  440. cor_test <- correlationBF(
  441. x = Bayes_mod_data_nback$mean_d_prime,
  442. y = Bayes_mod_data_nback[[var]]
  443. )
  444. set.seed(2025)
  445. post <- posterior(cor_test, iterations = 50000) # MCMC samples
  446. rho <- as.numeric(post[,"rho"]) # posterior draws of r
  447. median_r <- median(rho)
  448. ci_r <- quantile(rho, c(.025, .975)) # 95% credible interval
  449. c(median_r = median_r, l95 = ci_r[1], u95 = ci_r[2])
  450. # Determine significance based on p-value
  451. # Convert to data frame and extract the BF value
  452. bf_df <- as.data.frame(cor_test)
  453. bf_value <- bf_df$bf[1]
  454. significance <- interpret_bayes_factor(bf_value)
  455. # Append results to the data frame
  456. Bayes_correlation_results_nback_mod <- rbind(Bayes_correlation_results_nback_mod, data.frame(
  457. Connectivity_Variable = var,
  458. Bayesian_Factor = bf_value,
  459. median_r = median_r,
  460. CI_lower95_r = ci_r[1],
  461. CI_upper95_r = ci_r[2],
  462. Significance = significance
  463. ))
  464. }
  465. }
  466. # Print the updated correlation results with p-values and significance
  467. Bayes_correlation_results_nback_mod
  468. ```
  469. ```{r}
  470. filtered_bay_nback<- Bayes_correlation_results_nback_mod %>%
  471. filter(Significance != "Null" )
  472. kept_indices <- which(Bayes_correlation_results_nback_mod$Significance != "Null")
  473. colr = c("#0072B2","#009E73","#D55E00") #E69F00
  474. if (!is_empty(kept_indices)){
  475. for (i in 1:nrow(filtered_bay_nback))
  476. {
  477. n_level <- filtered_bay_nback$Connectivity_Variable[i]
  478. n_level <- as.numeric(substr(n_level, 2, 2))
  479. Bayes_mod_data_nback <-mcombined_data %>%
  480. filter(curr_n_back == n_level)
  481. con_name = filtered_bay_nback[i,1]
  482. just_con = substr(con_name, 8, nchar(con_name))
  483. # Convert the Bayes Factor output to a data frame and extract the relevant value
  484. bayes_factor_df_nback_mod <- as.data.frame(filtered_bay_nback[i,])
  485. bayes_factor_nback_mod <- bayes_factor_df_nback_mod$Bayesian_Factor[1] # Adjust as necessary based on the output structure
  486. r_bf = bayes_factor_df_nback_mod$median_r
  487. # Create the plot
  488. mbplot <- ggplot(Bayes_mod_data_nback, aes(x = mean_d_prime, y = .data[[con_name]])) +
  489. geom_point(alpha = 0.6) + # Scatter plot points
  490. geom_smooth(method = "lm", color = colr[n_level], se = FALSE) + # Regression line
  491. labs(
  492. title = paste0("Correlation of Sensitivity with Connectivity Modulation: \n", just_con, " in ", as.character(n_level), "-back"),
  493. x = "Mean Sensitivity (d')",
  494. y = "Modulation (Hz)"
  495. ) +
  496. theme_modern() +
  497. xlim(1, 3.5) +
  498. ylim(-1, 1) +
  499. theme(
  500. plot.title = element_text(hjust = 0.5, size = 14, face = "bold"),
  501. axis.title = element_text(size = 14)
  502. ) +
  503. # Add correlation and Bayes Factor text
  504. annotate("text", x = Inf, y = Inf,
  505. label = paste("BF:", round(bayes_factor_nback_mod, 3),"\nrho:",round(r_bf, 3)),
  506. hjust = 1.1, vjust = 1.5, size = 4, color = "black", fontface = "italic")
  507. print(mbplot)
  508. }
  509. }else {
  510. print('No evidence at all')
  511. }
  512. ```
  513. ```{r}
  514. # Load the DCM connectivity data from Excel file
  515. dcm_data <- read_excel("/data/pt_02809/MeMoSLAP/p4_dcm/final_codes/DCM_true_concat_512max/intrinsic_connectivity_A_Mean_DCM_analysis_mask_CER_PAR_IFG_ROI_s4fmap_brain_true_concat_512max.xlsx")
  516. # View the first few rows of your data to understand its structure
  517. head(dcm_data)
  518. head(session_average_d_prime)
  519. # Create a vector of participant IDs excluding 4004
  520. participant_ids <- unique(session_average_d_prime$participant_id)
  521. # Assign to the data frame
  522. dcm_data <- dcm_data %>%
  523. mutate(participant_id = participant_ids)
  524. # Print the updated dcm_data to verify the change
  525. print(dcm_data)
  526. avg0123 <- session_average_d_prime
  527. avg0123$mean_d_prime[avg0123$curr_n_back=='0'] <- avg0123$mean_d_prime[avg0123$curr_n_back=='0'] * 0.5
  528. avg0123 <- avg0123 %>%
  529. group_by(participant_id) %>% # Group by participant and n-back condition
  530. summarise(mean_d_prime = mean(mean_d_prime, na.rm = TRUE)) %>% # Calculate mean d'
  531. ungroup() # Remove grouping structure
  532. icombined_data <- avg0123 %>%
  533. left_join(dcm_data, by = "participant_id") # Join by participant ID
  534. # Print the combined data
  535. icombined_data
  536. ```
  537. ```{r}
  538. # Extract column names
  539. connectivity_variables <- colnames(icombined_data)[grepl("^[lr]", colnames(icombined_data))]
  540. # Initialize a data frame to store correlation results with p-values
  541. Bayes_correlation_results_nback_intr <- data.frame(
  542. Connectivity_Variable = character(),
  543. median_r = numeric(),
  544. CI_lower95_r = numeric(),
  545. CI_upper95_r= numeric(),
  546. Bayesian_Factor = numeric(),
  547. Significance = character(),
  548. stringsAsFactors = FALSE
  549. )
  550. interpret_bayes_factor <- function(bf) {
  551. if (bf <= 1 ) {
  552. interpretation <- "Null"
  553. } else if (bf > 1 && bf <= 3) {
  554. interpretation <- "Weak"
  555. } else if (bf > 3 && bf <= 10) {
  556. interpretation <- "Moderate"
  557. } else if (bf > 10 && bf <= 30) {
  558. interpretation <- "Strong"
  559. } else if (bf > 30 && bf <= 100) {
  560. interpretation <- "Very strong "
  561. } else if (bf > 100) {
  562. interpretation <- "Extreme"
  563. } else {
  564. interpretation <- "Uninterpretable value"
  565. }
  566. return(interpretation)
  567. }
  568. n_level = '0123'
  569. # Filter data for 3-back condition
  570. Bayes_intr_data_nback <-icombined_data
  571. # Loop through each connectivity variable, run cor.test, and extract the correlation coefficient and p-value
  572. for (var in connectivity_variables) {
  573. # Perform the cor.test for the current variable
  574. cor_test <- correlationBF(
  575. x = Bayes_intr_data_nback$mean_d_prime,
  576. y = Bayes_intr_data_nback[[var]]
  577. )
  578. set.seed(2025)
  579. post <- posterior(cor_test, iterations = 50000) # MCMC samples
  580. rho <- as.numeric(post[,"rho"]) # posterior draws of r
  581. median_r <- median(rho)
  582. ci_r <- quantile(rho, c(.025, .975)) # 95% credible interval
  583. c(median_r = median_r, l95 = ci_r[1], u95 = ci_r[2])
  584. # Determine significance based on p-value
  585. # Convert to data frame and extract the BF value
  586. bf_df <- as.data.frame(cor_test)
  587. bf_value <- bf_df$bf[1]
  588. significance <- interpret_bayes_factor(bf_value)
  589. # Determine significance based on p-value
  590. # Convert to data frame and extract the BF value
  591. bf_df <- as.data.frame(cor_test)
  592. bf_value <- bf_df$bf[1]
  593. significance <- interpret_bayes_factor(bf_value)
  594. # Append results to the data frame
  595. Bayes_correlation_results_nback_intr <- rbind(Bayes_correlation_results_nback_intr, data.frame(
  596. Connectivity_Variable = paste0('n',as.character(n_level),'back_', var),
  597. Bayesian_Factor = bf_value,
  598. median_r = median_r,
  599. CI_lower95_r = ci_r[1],
  600. CI_upper95_r = ci_r[2],
  601. Significance = significance
  602. ))
  603. }
  604. # Print the updated correlation results with p-values and significance
  605. Bayes_correlation_results_nback_intr
  606. ```
  607. ```{r}
  608. filtered_bay_nback<- Bayes_correlation_results_nback_intr %>%
  609. filter(Significance != "Null" )
  610. kept_indices <- which(Bayes_correlation_results_nback_intr$Significance != "Null")
  611. colr = c("#0072B2","#009E73","#D55E00", "#CC79A7")
  612. if (!is_empty(kept_indices)){
  613. for (i in 1:nrow(filtered_bay_nback))
  614. {
  615. n_level <-'0123'
  616. Bayes_intr_data_nback <-icombined_data
  617. con_name = filtered_bay_nback[i,1]
  618. area_name = substr(con_name, 11, nchar(con_name))
  619. # Convert the Bayes Factor output to a data frame and extract the relevant value
  620. bayes_factor_df_nback_intr <- as.data.frame(filtered_bay_nback[i,])
  621. bayes_factor_nback_intr <- bayes_factor_df_nback_intr$Bayesian_Factor[1] # Adjust as necessary based on the output structure
  622. r_bf = bayes_factor_df_nback_intr$median_r
  623. conn = Bayes_intr_data_nback[[area_name]][c(1:4,6:20)]
  624. dprime =Bayes_intr_data_nback$mean_d_prime[c(1:4,6:20)]
  625. # Create the plot
  626. ibplot <- ggplot(Bayes_intr_data_nback, aes(x = mean_d_prime, y = .data[[area_name]])) +
  627. geom_point(alpha = 0.6) + # Scatter plot points
  628. geom_smooth(method = "lm", color = colr[4], se = FALSE) + # Regression line
  629. labs(
  630. title = paste0("Correlation of Sensitivity in the 0, 1 ,2 & 3 -back with \nIntrinsic Connectivity: from_", area_name), #as.character(n_level),
  631. x = "Mean Sensitivity (d')",
  632. y = "Connection Strength (Hz)"
  633. ) +
  634. theme_modern() +
  635. xlim(1, 3.5) +
  636. ylim(-1, 1) +
  637. theme(
  638. plot.title = element_text(hjust = 0.5, size = 14, face = "bold"),
  639. axis.title = element_text(size = 14)
  640. ) +
  641. # Add correlation and Bayes Factor text
  642. annotate("text", x = Inf, y = Inf,
  643. label = paste("BF:", round(bayes_factor_nback_intr, 3),"\nrho:",round(r_bf, 3)),
  644. hjust = 1.1, vjust = 1.5, size = 4, color = "black", fontface = "italic")
  645. #("r:", round(correlation_result_nback_intr, 3), "\nBF:", round(bayes_factor_nback_intr, 3),"\np:",round(p_val, 3), "\np-FDR:",round(p_adj, 3)),
  646. print(ibplot)
  647. # ggsave(paste0("/data/pt_02809/MeMoSLAP/p4_dcm/final_codes/DCM_true_concat_512max/Performance_correlations/Bayes_dprime",as.character(n_level), "back_intrinsic_", area_name , ".png"), width = 7, height = 5, dpi = 1000)
  648. }
  649. }else {
  650. print('No evidence at all')
  651. }
  652. ```
  653. ```{r}
  654. # Step 1: Extract participant ID without the task identifier
  655. rt_data <- Data_complete_clean %>%
  656. mutate(participant_id = sapply(Data_complete_clean$participant, function(x) {
  657. # Extract the single match of "40xx"
  658. regmatches(x, regexpr("40\\d{2}", x))
  659. }))
  660. # Step 2: Filter for correct responses
  661. correct_responses <- rt_data %>%
  662. filter(result == "Correct")
  663. # Step 3 & 4: Group by the participant ID and condition, then calculate mean reaction time
  664. reaction_times <- correct_responses %>%
  665. group_by(participant_id, curr_n_back) %>%
  666. summarise(mean_cor_rt = mean(response.rt, na.rm = TRUE)) %>%
  667. ungroup()
  668. # Print the calculated reaction times
  669. reaction_times
  670. #write.csv(reaction_times, "/data/pt_02809/MeMoSLAP/p4_dcm/final_codes/nback_behaviour/tables/rt_raw.csv", row.names = FALSE, col.names = TRUE)
  671. ```
  672. ``` {r}
  673. #reaction_times <- read.csv("/data/pt_02809/MeMoSLAP/p4_dcm/final_codes/nback_behaviour/tables/rt_raw.csv", header = TRUE, stringsAsFactors = FALSE)
  674. rt_nback <- reaction_times
  675. rt_nback <- as.data.frame(rt_nback)
  676. rt_nback$curr_n_back <- as.factor(rt_nback$curr_n_back)
  677. rt_nback$out_flag <- NaN
  678. for (n in idx_nback) {
  679. # Calculate Tukey's fences
  680. Q1 <- quantile(rt_nback[rt_nback$curr_n_back==n, c("mean_cor_rt")], 0.25)
  681. Q3 <- quantile(rt_nback[rt_nback$curr_n_back==n, c("mean_cor_rt")], 0.75)
  682. IQR <- Q3 - Q1
  683. lower_fence <- Q1 - 1.5 * IQR
  684. upper_fence <- Q3 + 1.5 * IQR
  685. rt_nback[rt_nback$curr_n_back==n, c("out_flag")] <- ifelse(rt_nback[rt_nback$curr_n_back==n, c("mean_cor_rt")] < lower_fence | rt_nback[rt_nback$curr_n_back==n, c("mean_cor_rt")] > upper_fence, "outlier", "inlier")
  686. }
  687. rt_nback
  688. ```
  689. ```{r}
  690. fried_test <- friedman.test(cbind(rt_nback$mean_cor_rt[rt_nback$curr_n_back==0],
  691. rt_nback$mean_cor_rt[rt_nback$curr_n_back==1],
  692. rt_nback$mean_cor_rt[rt_nback$curr_n_back==2],
  693. rt_nback$mean_cor_rt[rt_nback$curr_n_back==3]))
  694. avg_rt_tests <- data.frame(
  695. method = fried_test$method,
  696. data = "0, 1, 2, 3 -back",
  697. statistic = as.numeric(fried_test$statistic),
  698. p_value = round(fried_test$p.value, 3),
  699. p_bonferroni = NA
  700. )
  701. options(digits = 4)
  702. i = 0
  703. for (n in list( c("0", "1"), c("0", "2"),c("0", "3"), c("1", "2"),c("1", "3"), c("2", "3"))){
  704. x = rt_nback$mean_cor_rt[rt_nback$curr_n_back==as.numeric(n[1])]
  705. y = rt_nback$mean_cor_rt[rt_nback$curr_n_back==as.numeric(n[2])]
  706. wil_test <- paired_wilcox(x,y)
  707. ntest <- data.frame(
  708. method = wil_test$method,
  709. data = paste0(n[1],' vs ',n[2],' -back'),
  710. statistic = NA,
  711. p_value = round(wil_test$p.value, 3),
  712. p_bonferroni = round(wil_test$p.value*n_com, 3)
  713. )
  714. avg_rt_tests[2+i,] <- ntest
  715. i = i+1
  716. }
  717. avg_rt_tests
  718. #write.csv(avg_rt_tests, "/data/pt_02809/MeMoSLAP/p4_dcm/final_codes/nback_behaviour/tables/rt_main_stat_tests.csv", row.names = FALSE, col.names = TRUE)
  719. ```
  720. ```{r}
  721. rtn <-ggplot(rt_nback, aes(x=curr_n_back, y=mean_cor_rt, fill=curr_n_back)) +
  722. geom_violin() + #outlier.colour="red", outlier.shape=8, outlier.size=1.5, notch=FALSE) +
  723. geom_boxplot(width = 0.1, color = "black", fill = NA,outlier.shape = NA) +
  724. geom_jitter(position=position_jitter(0.03), aes(color = out_flag), size = 0.5)+
  725. scale_color_manual(values = c("black", "red3"))
  726. if (avg_rt_tests$p_value[1] <= 0.05){
  727. rtn <- rtn+
  728. geom_signif(
  729. comparisons = list( c("0", "1"), c("1", "2"), c("2", "3")),
  730. map_signif_level = c("***"=0.001/n_com, "**"=0.01/n_com, "*"=0.05/n_com),
  731. y_position = 1.25-0.3, textsize = 5, vjust = 0.8, test =paired_wilcox) +
  732. geom_signif(
  733. comparisons = list( c("0", "2")),
  734. map_signif_level = c("***"=0.001/n_com, "**"=0.01/n_com, "*"=0.05/n_com),
  735. y_position = 1.3-0.3, textsize = 5, vjust = 0.8, tip_length = 0.02, test = paired_wilcox) +
  736. geom_signif(
  737. comparisons = list(c("1", "3")),
  738. map_signif_level = c("***"=0.001/n_com, "**"=0.01/n_com, "*"=0.05/n_com),
  739. y_position = 1.35-0.3, textsize = 5, vjust = 0.8, tip_length = 0.02, test = paired_wilcox) +
  740. geom_signif(
  741. comparisons = list( c("0", "3")),
  742. map_signif_level = c("***"=0.001/n_com, "**"=0.01/n_com, "*"=0.05/n_com),
  743. y_position =1.4-0.3, textsize = 5, vjust = 0.8, test = paired_wilcox)
  744. } else {
  745. rtn <- rtn+stat_compare_means(label.y = 1.3)
  746. }
  747. rtn <- rtn+
  748. ylim(0.4, 1.15) +
  749. #ggtitle("Response Speed per n-back Condition (only hit trials)") + # for the main title
  750. labs(x = "n-back Condition", y = "Response Time (sec)")+
  751. theme_modern() +
  752. # annotate("text", x = Inf, y = Inf,
  753. # label = paste("Friedman Test, p ~", as.character(round(as.numeric(fried_test["p.value"],3))), "\nPost-hoc Pairwise Wilcoxon Signed-Rank Test"),
  754. # hjust = 1, vjust = 1, size = 4, color = "black", fontface = "italic")+
  755. scale_fill_okabeito(palette = "full", order = c(1, 5, 3, 6)) +
  756. theme(legend.position = "none")+
  757. theme(
  758. axis.ticks.length = unit(5, "pt"), # makes ticks longer (more dash-like)
  759. axis.ticks = element_line(size = 0.5, linetype = "solid", color = "black")
  760. )
  761. rtn
  762. ```
  763. ```{r}
  764. # Step 1: Extract participant ID without the task identifier
  765. rt_data_sess <- Data_complete_clean %>%
  766. mutate(participant_id = sapply(Data_complete_clean$participant, function(x) {
  767. # Extract the single match of "40xx"
  768. regmatches(x, regexpr("40\\d{2}", x))})) %>%
  769. mutate(session = ifelse(grepl("1$", Data_complete_clean$participant), "1",
  770. ifelse(grepl("2$", Data_complete_clean$participant), "2", NA)))
  771. # Step 2: Filter for correct responses
  772. correct_responses_sess <- rt_data_sess %>%
  773. filter(result == "Correct")
  774. # Step 3 & 4: Group by the participant ID and condition, then calculate mean reaction time
  775. reaction_times_sess <- correct_responses_sess %>%
  776. group_by(participant_id, session, curr_n_back) %>%
  777. summarise(mean_cor_rt = mean(response.rt, na.rm = TRUE)) %>%
  778. ungroup()
  779. # Print the calculated reaction times
  780. reaction_times_sess
  781. #write.csv(reaction_times_sess, "/data/pt_02809/MeMoSLAP/p4_dcm/final_codes/nback_behaviour/tables/rt_sess_raw.csv", row.names = FALSE, col.names = TRUE)
  782. ```
  783. ```{r}
  784. #reaction_times_sess <- read.csv("/data/pt_02809/MeMoSLAP/p4_dcm/final_codes/nback_behaviour/tables/rt_sess_raw.csv", header = TRUE, stringsAsFactors = FALSE)
  785. rt_sess <- as.data.frame(reaction_times_sess)
  786. rt_sess$session <- as.factor(rt_sess$session)
  787. rt_sess$curr_n_back <- as.factor(rt_sess$curr_n_back)
  788. rt_sess$out_flag <- NaN
  789. idx_nback <- unique(rt_sess$curr_n_back)
  790. sess <- unique(rt_sess$session)
  791. for (n in idx_nback) {
  792. for (s in sess) {
  793. # Calculate Tukey's fences
  794. Q1 <- quantile(rt_sess[rt_sess$curr_n_back==n & rt_sess$session==s, c("mean_cor_rt")], 0.25)
  795. Q3 <- quantile(rt_sess[rt_sess$curr_n_back==n & rt_sess$session==s, c("mean_cor_rt")], 0.75)
  796. IQR <- Q3 - Q1
  797. lower_fence <- Q1 - 1.5 * IQR
  798. upper_fence <- Q3 + 1.5 * IQR
  799. rt_sess[rt_sess$curr_n_back==n & rt_sess$session==s, c("out_flag")]<- ifelse(rt_sess[rt_sess$curr_n_back==n & rt_sess$session==s, c("mean_cor_rt")] < lower_fence | rt_sess[rt_sess$curr_n_back==n & rt_sess$session==s, c("mean_cor_rt")] > upper_fence, "outlier", "inlier")
  800. }
  801. }
  802. rt_sess
  803. ```
  804. ```{r}
  805. df_art_rt <- art(mean_cor_rt ~ curr_n_back * session + (1 | participant_id), data = rt_sess)
  806. # Perform ART ANOVA
  807. art_anova_results_rt <- anova(df_art_rt)
  808. # Print results
  809. art_anova_results_rt
  810. if (art_anova_results['session','Pr(>F)']<=0.05 | art_anova_results['curr_n_back:session','Pr(>F)']<=0.05)
  811. {
  812. wide_ses <- rt_sess %>%
  813. unite("back_sess", curr_n_back, session, sep = "back_sess") %>% # combine back and sess
  814. pivot_wider(
  815. id_cols = participant_id,
  816. names_from = back_sess,
  817. values_from = mean_cor_rt
  818. )
  819. wide_matrix <- wide_ses %>%
  820. select(-participant_id) %>% # Remove the identifier column
  821. as.matrix() # Convert to matrix
  822. # Get all unique pairwise combinations of columns
  823. combinations <- combn(colnames(wide_matrix), 2, simplify = FALSE)
  824. # Apply paired Wilcoxon test to each pair
  825. wilcox_results <- lapply(combinations, function(pair) {
  826. test <- wilcox.test(wide_matrix[, pair[1]], wide_matrix[, pair[2]], paired = TRUE, exact = FALSE)
  827. data.frame(
  828. group1 = pair[1],
  829. group2 = pair[2],
  830. p_value = test$p.value
  831. )
  832. })
  833. # Combine results into a data frame
  834. results_df_rt <- do.call(rbind, wilcox_results)
  835. # Apply Bonferroni correction
  836. results_df_rt$adjusted_p <- p.adjust(results_df_rt$p_value, method = "fdr")
  837. results_df_rt <- results_df_rt %>%
  838. mutate(significance = case_when(
  839. adjusted_p <= 0.001 ~ "***",
  840. adjusted_p <= 0.01 ~ "**",
  841. adjusted_p <= 0.05 ~ "*",
  842. TRUE ~ "ns"
  843. ))
  844. results_df_rt
  845. }
  846. ```
  847. ```{r}
  848. rts <- ggplot(rt_sess, aes(x = curr_n_back, y = mean_cor_rt, fill = interaction(session,curr_n_back))) +
  849. geom_violin() +
  850. geom_boxplot(aes(group = interaction(session,curr_n_back)), position = position_dodge(width = 0.9), width = 0.1, color = "black", fill = NA,outlier.shape = NA) +
  851. geom_point(aes(group = interaction(session,curr_n_back)), position = position_dodge(width = 0.9), size = 0.5,color = "black") +
  852. # Lines connecting data points from session 1 to session 2
  853. geom_line(aes(x = as.numeric(curr_n_back) +
  854. ifelse(session == levels(session)[1], -0.375/2, 0.375/2),
  855. group = interaction(participant_id, curr_n_back)),
  856. alpha = 0.6, color = "gray40", linetype = "dotted") +
  857. labs(x = "n-back Condition", y = "Response Time (sec)")+
  858. theme_modern() +
  859. scale_fill_manual(name = "nback x session", labels = c("0back in ses-1","0back in ses-2","1back in ses-1","1back in ses-2","2back in ses-1","2back in ses-2","3back in ses-1","3back in ses-2"),
  860. values = c( "goldenrod1","goldenrod3", "dodgerblue","dodgerblue3","seagreen3","seagreen4","tomato1","tomato3")) +
  861. scale_color_manual(name = "nback x session", labels = c("0back in ses-1","0back in ses-2","1back in ses-1","1back in ses-2","2back in ses-1","2back in ses-2","3back in ses-1","3back in ses-2"),
  862. values = c( "goldenrod3","goldenrod4","dodgerblue3","dodgerblue4","seagreen4","darkgreen","tomato3","tomato4")) +
  863. #scale_fill_okabeito(palette = "full", order = c(1, 5, 3, 6))+
  864. theme(
  865. axis.ticks.length = unit(5, "pt"), # makes ticks longer (more dash-like)
  866. axis.ticks = element_line(size = 0.5, linetype = "solid", color = "black")
  867. )
  868. rts <- rts+
  869. ylim(0.4, 1) +
  870. #ggtitle("Response Speed per n-back Condition (only hit trials)") + # for the main title
  871. labs(x = "n-back Condition", y = "Response Speed (sec)")+
  872. theme_modern() +
  873. # annotate("text", x = Inf, y = Inf,
  874. # label = paste("Friedman Test, p ~", as.character(round(as.numeric(fried_test["p.value"],3))), "\nPost-hoc Pairwise Wilcoxon Signed-Rank Test"),
  875. # hjust = 1, vjust = 1, size = 4, color = "black", fontface = "italic")+
  876. #scale_fill_okabeito(palette = "full", order = c(1, 5, 3, 6)) +
  877. #theme(legend.position = "none")+
  878. theme(
  879. axis.ticks.length = unit(5, "pt"), # makes ticks longer (more dash-like)
  880. axis.ticks = element_line(size = 0.5, linetype = "solid", color = "black")
  881. )
  882. rts
  883. ```
  884. ```{r}
  885. # Filter out the 0-back condition
  886. reaction_times_123 <- reaction_times %>%
  887. filter(curr_n_back != 0)
  888. # Print the filtered reaction times to verify
  889. reaction_times_123
  890. ```
  891. ```{r}
  892. # Merge the filtered reaction times with the combined data
  893. mcombined_data <- mcombined_data %>%
  894. left_join(reaction_times_123, by = c("participant_id", "curr_n_back"))
  895. mcombined_data
  896. ```
  897. ```{r}
  898. # Initialize a data frame to store correlation results with p-values
  899. Bayes_correlation_results_nback_mod_rt <- data.frame(
  900. Connectivity_Variable = character(),
  901. Bayesian_Factor = numeric(),
  902. median_r = numeric(),
  903. CI_lower95_r = numeric(),
  904. CI_upper95_r= numeric(),
  905. Significance = character(),
  906. stringsAsFactors = FALSE
  907. )
  908. interpret_bayes_factor <- function(bf) {
  909. if (bf <= 1 ) {
  910. interpretation <- "Null"
  911. } else if (bf > 1 && bf <= 3) {
  912. interpretation <- "Weak"
  913. } else if (bf > 3 && bf <= 10) {
  914. interpretation <- "Moderate"
  915. } else if (bf > 10 && bf <= 30) {
  916. interpretation <- "Strong"
  917. } else if (bf > 30 && bf <= 100) {
  918. interpretation <- "Very strong "
  919. } else if (bf > 100) {
  920. interpretation <- "Extreme"
  921. } else {
  922. interpretation <- "Uninterpretable value"
  923. }
  924. return(interpretation)
  925. }
  926. for (n_level in 1:3) {
  927. # Filter data for 3-back condition
  928. Bayes_mod_data_nback <-mcombined_data %>%
  929. filter(curr_n_back == n_level)
  930. # Extract column names
  931. connectivity_variables <- colnames(mcombined_data)[startsWith(colnames(mcombined_data), paste0('n',as.character(n_level)))]
  932. # Loop through each connectivity variable, run cor.test, and extract the correlation coefficient and p-value
  933. for (var in connectivity_variables) {
  934. # Perform the cor.test for the current variable
  935. cor_test <- correlationBF(
  936. x = Bayes_mod_data_nback$mean_cor_rt,
  937. y = Bayes_mod_data_nback[[var]]
  938. )
  939. set.seed(2025)
  940. post <- posterior(cor_test, iterations = 50000) # MCMC samples
  941. rho <- as.numeric(post[,"rho"]) # posterior draws of r
  942. median_r <- median(rho)
  943. ci_r <- quantile(rho, c(.025, .975)) # 95% credible interval
  944. c(median_r = median_r, l95 = ci_r[1], u95 = ci_r[2])
  945. # Determine significance based on p-value
  946. # Convert to data frame and extract the BF value
  947. bf_df <- as.data.frame(cor_test)
  948. bf_value <- bf_df$bf[1]
  949. significance <- interpret_bayes_factor(bf_value)
  950. # Append results to the data frame
  951. Bayes_correlation_results_nback_mod_rt <- rbind(Bayes_correlation_results_nback_mod_rt, data.frame(
  952. Connectivity_Variable = var,
  953. Bayesian_Factor = bf_value,
  954. median_r = median_r,
  955. CI_lower95_r = ci_r[1],
  956. CI_upper95_r = ci_r[2],
  957. Significance = significance
  958. ))
  959. }
  960. }
  961. # Print the updated correlation results with p-values and significance
  962. Bayes_correlation_results_nback_mod_rt
  963. ```
  964. ```{r}
  965. filtered_bay_nback<- Bayes_correlation_results_nback_mod_rt %>%
  966. filter(Significance != "Null" )
  967. kept_indices <- which(Bayes_correlation_results_nback_mod_rt$Significance != "Null")
  968. colr = c("#0072B2","#009E73","#D55E00") #E69F00
  969. if (!is_empty(kept_indices))
  970. {
  971. for (i in 1:nrow(filtered_bay_nback))
  972. {
  973. n_level <- filtered_bay_nback$Connectivity_Variable[i]
  974. n_level <- as.numeric(substr(n_level, 2, 2))
  975. Bayes_mod_data_nback <-mcombined_data %>%
  976. filter(curr_n_back == n_level)
  977. con_name = filtered_bay_nback[i,1]
  978. just_con = substr(con_name, 8, nchar(con_name))
  979. # Convert the Bayes Factor output to a data frame and extract the relevant value
  980. bayes_factor_df_nback_mod <- as.data.frame(filtered_bay_nback[i,])
  981. bayes_factor_nback_mod <- bayes_factor_df_nback_mod$Bayesian_Factor[1] # Adjust as necessary based on the output structure
  982. r_bf = bayes_factor_df_nback_mod$median_r
  983. # Create the plot
  984. mbplot_rt <- ggplot(Bayes_mod_data_nback, aes(x = mean_cor_rt, y = .data[[con_name]])) +
  985. geom_point(alpha = 0.6) + # Scatter plot points
  986. geom_smooth(method = "lm", color = colr[n_level], se = FALSE) + # Regression line
  987. labs(
  988. title = paste0("Correlation of Response Time with Connectivity Modulation: \n", just_con, " in ", as.character(n_level), "-back"),
  989. x = "Response Time (sec)",
  990. y = "Modulation (Hz)"
  991. ) +
  992. theme_modern() +
  993. xlim(1, 3.5) +
  994. ylim(-1, 1) +
  995. theme(
  996. plot.title = element_text(hjust = 0.5, size = 14, face = "bold"),
  997. axis.title = element_text(size = 14)
  998. ) +
  999. # Add correlation and Bayes Factor text
  1000. annotate("text", x = Inf, y = Inf,
  1001. label = paste("BF:", round(bayes_factor_nback_mod, 3),"\nrho:",round(r_bf, 3)),
  1002. hjust = 1.1, vjust = 1.5, size = 4, color = "black", fontface = "italic")
  1003. print(mbplot_rt)
  1004. # ggsave(paste0("/data/pt_02809/MeMoSLAP/p4_dcm/final_codes/DCM_true_concat_results/Performance_correlations/Bayes_rt_",as.character(n_level), "back_modulatory_", con_name , ".png"), width = 7, height = 5, dpi = 1000)
  1005. }
  1006. }else {
  1007. print('No evidence at all')
  1008. }
  1009. ```
  1010. ```{r}
  1011. avg0123_rt <- reaction_times
  1012. avg0123_rt$mean_cor_rt[avg0123$curr_n_back=='0'] <- avg0123_rt$mean_cor_rt[avg0123_rt$curr_n_back=='0'] * 0.5
  1013. avg0123_rt <- avg0123_rt %>%
  1014. group_by(participant_id) %>% # Group by participant and n-back condition
  1015. summarise(mean_cor_rt = mean(mean_cor_rt, na.rm = TRUE)) %>% # Calculate mean d'
  1016. ungroup() # Remove grouping structure
  1017. icombined_data <- avg0123_rt %>%
  1018. left_join(icombined_data, by = "participant_id") # Join by participant ID
  1019. # Print the combined data
  1020. icombined_data
  1021. ```
  1022. ```{r}
  1023. # Extract column names
  1024. connectivity_variables <- colnames(icombined_data)[grepl("^[lr]", colnames(icombined_data))]
  1025. # Initialize a data frame to store correlation results with p-values
  1026. Bayes_correlation_results_nback_intr_rt <- data.frame(
  1027. Connectivity_Variable = character(),
  1028. median_r = numeric(),
  1029. CI_lower95_r = numeric(),
  1030. CI_upper95_r= numeric(),
  1031. Bayesian_Factor = numeric(),
  1032. Significance = character(),
  1033. stringsAsFactors = FALSE
  1034. )
  1035. interpret_bayes_factor <- function(bf) {
  1036. if (bf <= 1 ) {
  1037. interpretation <- "Null"
  1038. } else if (bf > 1 && bf <= 3) {
  1039. interpretation <- "Weak"
  1040. } else if (bf > 3 && bf <= 10) {
  1041. interpretation <- "Moderate"
  1042. } else if (bf > 10 && bf <= 30) {
  1043. interpretation <- "Strong"
  1044. } else if (bf > 30 && bf <= 100) {
  1045. interpretation <- "Very strong "
  1046. } else if (bf > 100) {
  1047. interpretation <- "Extreme"
  1048. } else {
  1049. interpretation <- "Uninterpretable value"
  1050. }
  1051. return(interpretation)
  1052. }
  1053. n_level = '0123'
  1054. # Filter data for 3-back condition
  1055. Bayes_intr_data_nback <-icombined_data
  1056. # Loop through each connectivity variable, run cor.test, and extract the correlation coefficient and p-value
  1057. for (var in connectivity_variables) {
  1058. # Perform the cor.test for the current variable
  1059. cor_test <- correlationBF(
  1060. x = Bayes_intr_data_nback$mean_cor_rt,
  1061. y = Bayes_intr_data_nback[[var]]
  1062. )
  1063. set.seed(2025)
  1064. post <- posterior(cor_test, iterations = 50000) # MCMC samples
  1065. rho <- as.numeric(post[,"rho"]) # posterior draws of r
  1066. median_r <- median(rho)
  1067. ci_r <- quantile(rho, c(.025, .975)) # 95% credible interval
  1068. c(median_r = median_r, l95 = ci_r[1], u95 = ci_r[2])
  1069. # Determine significance based on p-value
  1070. # Convert to data frame and extract the BF value
  1071. bf_df <- as.data.frame(cor_test)
  1072. bf_value <- bf_df$bf[1]
  1073. significance <- interpret_bayes_factor(bf_value)
  1074. # Determine significance based on p-value
  1075. # Convert to data frame and extract the BF value
  1076. bf_df <- as.data.frame(cor_test)
  1077. bf_value <- bf_df$bf[1]
  1078. significance <- interpret_bayes_factor(bf_value)
  1079. # Append results to the data frame
  1080. Bayes_correlation_results_nback_intr_rt <- rbind(Bayes_correlation_results_nback_intr_rt, data.frame(
  1081. Connectivity_Variable = paste0('n',as.character(n_level),'back_', var),
  1082. Bayesian_Factor = bf_value,
  1083. median_r = median_r,
  1084. CI_lower95_r = ci_r[1],
  1085. CI_upper95_r = ci_r[2],
  1086. Significance = significance
  1087. ))
  1088. }
  1089. # Print the updated correlation results with p-values and significance
  1090. Bayes_correlation_results_nback_intr_rt
  1091. ```
  1092. ```{r}
  1093. filtered_bay_nback<- Bayes_correlation_results_nback_intr_rt %>%
  1094. filter(Significance != "Null" )
  1095. kept_indices <- which(Bayes_correlation_results_nback_intr_rt$Significance != "Null")
  1096. colr = c("#0072B2","#009E73","#D55E00", "#CC79A7")
  1097. if (!is_empty(kept_indices)){
  1098. for (i in 1:nrow(filtered_bay_nback))
  1099. {
  1100. n_level <-'0123'
  1101. Bayes_intr_data_nback <-icombined_data
  1102. con_name = filtered_bay_nback[i,1]
  1103. area_name = substr(con_name, 11, nchar(con_name))
  1104. # Convert the Bayes Factor output to a data frame and extract the relevant value
  1105. bayes_factor_df_nback_intr <- as.data.frame(filtered_bay_nback[i,])
  1106. bayes_factor_nback_intr <- bayes_factor_df_nback_intr$Bayesian_Factor[1] # Adjust as necessary based on the output structure
  1107. r_bf = bayes_factor_df_nback_intr$median_r
  1108. conn = Bayes_intr_data_nback[[area_name]][c(1:4,6:20)]
  1109. dprime =Bayes_intr_data_nback$mean_d_prime[c(1:4,6:20)]
  1110. # Create the plot
  1111. ibplot <- ggplot(Bayes_intr_data_nback, aes(x = mean_cor_rt, y = .data[[area_name]])) +
  1112. geom_point(alpha = 0.6) + # Scatter plot points
  1113. geom_smooth(method = "lm", color = colr[4], se = FALSE) + # Regression line
  1114. labs(
  1115. title = paste0("Correlation of Sensitivity in the 0, 1 ,2 & 3 -back with \nIntrinsic Connectivity: from_", area_name), #as.character(n_level),
  1116. x = "Mean Reaction Time (sec)",
  1117. y = "Connection Strength (Hz)"
  1118. ) +
  1119. theme_modern() +
  1120. xlim(0.4, 0.8) +
  1121. ylim(-1, 1) +
  1122. theme(
  1123. plot.title = element_text(hjust = 0.5, size = 14, face = "bold"),
  1124. axis.title = element_text(size = 14)
  1125. ) +
  1126. # Add correlation and Bayes Factor text
  1127. annotate("text", x = Inf, y = Inf,
  1128. label = paste("BF:", round(bayes_factor_nback_intr, 3),"\nrho:",round(r_bf, 3)),
  1129. hjust = 1.1, vjust = 1.5, size = 4, color = "black", fontface = "italic")
  1130. #("r:", round(correlation_result_nback_intr, 3), "\nBF:", round(bayes_factor_nback_intr, 3),"\np:",round(p_val, 3), "\np-FDR:",round(p_adj, 3)),
  1131. print(ibplot)
  1132. # ggsave(paste0("/data/pt_02809/MeMoSLAP/p4_dcm/final_codes/DCM_true_concat_512max/Performance_correlations/Bayes_dprime",as.character(n_level), "back_intrinsic_", area_name , ".png"), width = 7, height = 5, dpi = 1000)
  1133. }
  1134. }else {
  1135. print('No evidence at all')
  1136. }
  1137. ```

31_analyse_plot_behavior_DCM.Rmd at commit b788fe4, no license · at the source

Overview

Authors: Sabrina Turker1,2,3, Gerasimos Gerardos1,2,4, Felix Büch1,5, Beatrice Fumagalli2, Philipp Kuhnke1,2, Gesa Hartwigsen1,2
  1. Cognitive and Biological Psychology, Wilhelm Wundt Institute for Psychology, Leipzig University, Leipzig, Germany
  2. Research Group Cognition and Plasticity, Max Planck Institute for Human Cognitive and Brain Sciences Leipzig, Leipzig, Germany
  3. Brain and Language Lab, Department for Behavioral and Cognitive Biology, University of Vienna, Vienna, Austria
  4. Interdisciplinary Graduate Program in the Brain and Mind Sciences, University of Crete, Heraklion, Crete, Greece
  5. Clinical Psychology and Psychotherapy, Wilhelm Wundt Institute for Psychology, Leipzig University, Leipzig, Germany
Journal: iScience, volume 29, issue 5, article 115502
Dates: received 30 September 2025; accepted 24 March 2026; published online 26 March 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1016/j.isci.2026.115502 · PMID 42004033 · PMCID PMC13091522 · OpenAlex W7140781893
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: cognitive (subfield)
Methods: Statistics, Smoothing, state filtering, decompositions, fMRI & imaging, Machine learning
Keywords: Neuroscience, Cognitive neuroscience
Topic: Neural and Behavioral Psychology Studies (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: European Research Council (101043747); Deutsche Forschungsgemeinschaft (467143400, HA 6314/10\u20131); Max Planck Society
Citations: not cited yet (Europe PMC); 77 references in the paper

Abstract

Verbal working memory (VWM) relies on frontal and parietal regions, yet their functional interactions, particularly with the cerebellum, remain underexplored. Prior studies link higher VWM load to increased parieto-prefrontal coupling and associate stronger interactions with better performance. This suggests that connectivity may underlie individual differences in efficiency. However, fronto-parieto-cerebellar dynamics have not been systematically examined to date. We investigated activation and directed functional coupling between six pre-selected regions of interest during a VWM task. Higher task load increased activity in fronto-parietal regions and the cerebellum. Connectivity analyses revealed bidirectional facilitatory interactions between fronto-parietal regions, but reduced cerebello-cortical coupling as demands increased. Positive left parieto-frontal coupling with increasing load showed links to performance, indicating that less interaction was required for good performance. These effects were consistent across two sessions. Our study highlights that fronto-parietal coupling adapts to support increasing task demands, whereas reduced cerebello-cortical interactions suggest a distinct role for the cerebellum.

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 10 matches between paragraphs and lines of code.

OSF x94c2

License: none: the authors keep all their rights
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Languages: MATLAB (28), R (3), Python (1)
Size: 117 files, 32 scripts
Software Heritage: not checked
Found in: “Data and code availability”
Holds: 2 notebooks
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: SPM (15 files), Statistics and Machine Learning Toolbox (3 files), lme4 (2 files), lmerTest (2 files), nlme (2 files), tidyverse (2 files), afex (1 file), BayesFactor (1 file), brms (1 file), car (1 file), data.table (1 file), easystats (1 file), ggplot2 (1 file), ggpubr (1 file), NiBabel (1 file), NumPy (1 file)
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
  • 30 September 2026: the link answers (HTTP 200)
32 files
At the source: osf.io/x94c2/

ggerardos/vwm-task-dcm-memoslap

License: none: the authors keep all their rights
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: b788fe4d84d2bfcfad6c31201c73ebdabdcccbc0, 3 March 2026
Languages: MATLAB (28), R (3), Python (1)
Size: 34 files, 32 scripts
Software Heritage: not archived
Found in: “Data and code availability”
Holds: 2 notebooks
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: SPM (15 files), Statistics and Machine Learning Toolbox (3 files), lme4 (2 files), lmerTest (2 files), nlme (2 files), tidyverse (2 files), afex (1 file), BayesFactor (1 file), brms (1 file), car (1 file), data.table (1 file), easystats (1 file), ggplot2 (1 file), ggpubr (1 file), NiBabel (1 file), NumPy (1 file)
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
32 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;
  • 64 scripts, each with its path and the digest of its content;
  • 10 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 and code availability

Data: All raw and processed data generated in this study have been deposited at the OSF Platform and are publicly available at https://osf.io/x94c2/. Additional data supporting the findings of this study are available upon request from the corresponding author.

Code: All custom code and scripts used for data processing and analysis have been deposited at GitHub at https://github.com/ggerardos/vwm-task-dcm-memoslap and are also publicly available through the OSF Platform at https://osf.io/x94c2/.

Other Items: No supplementary software, algorithms, or related materials were developed as part of this study. All known and used software is cited in 10.3 and 10.4. Any additional information required to reanalyze the data reported in this paper is available from the corresponding author upon request.

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

Recorded: type, language, journal, volume, issue, pages, dates, 6 authors, 2 keywords, 3 funders, 76 references.

Cite

This paper

Turker, S., Gerardos, G., Büch, F., Fumagalli, B., Kuhnke, P., & Hartwigsen, G. (2026). Task load modulates network interactions between bilateral fronto-parietal and cerebellar areas during verbal working memory. iScience, 29(5), 115502. https://doi.org/10.1016/j.isci.2026.115502

BibTeX

@article{turker2026task,
author = {Turker, Sabrina and Gerardos, Gerasimos and Büch, Felix and Fumagalli, Beatrice and Kuhnke, Philipp and Hartwigsen, Gesa},
title = {{Task load modulates network interactions between bilateral fronto-parietal and cerebellar areas during verbal working memory}},
journal = {iScience},
year = {2026},
month = mar,
volume = {29},
number = {5},
pages = {115502},
publisher = {Elsevier},
issn = {2589-0042},
doi = {10.1016/j.isci.2026.115502},
url = {https://doi.org/10.1016/j.isci.2026.115502},
pmid = {42004033},
pmcid = {PMC13091522}
}

RIS

TY - JOUR
AU - Turker, Sabrina
AU - Gerardos, Gerasimos
AU - Büch, Felix
AU - Fumagalli, Beatrice
AU - Kuhnke, Philipp
AU - Hartwigsen, Gesa
TI - Task load modulates network interactions between bilateral fronto-parietal and cerebellar areas during verbal working memory
T2 - iScience
J2 - iScience
PY - 2026
DA - 2026/03/26
VL - 29
IS - 5
SP - 115502
SN - 2589-0042
PB - Elsevier
DO - 10.1016/j.isci.2026.115502
UR - https://doi.org/10.1016/j.isci.2026.115502
LA - en
ER -

CSL-JSON

{
"id": "10.1016/j.isci.2026.115502",
"type": "article-journal",
"title": "Task load modulates network interactions between bilateral fronto-parietal and cerebellar areas during verbal working memory",
"container-title": "iScience",
"author": [
{
"family": "Turker",
"given": "Sabrina"
},
{
"family": "Gerardos",
"given": "Gerasimos"
},
{
"family": "Büch",
"given": "Felix"
},
{
"family": "Fumagalli",
"given": "Beatrice"
},
{
"family": "Kuhnke",
"given": "Philipp"
},
{
"family": "Hartwigsen",
"given": "Gesa"
}
],
"container-title-short": "iScience",
"volume": "29",
"issue": "5",
"page": "115502",
"DOI": "10.1016/j.isci.2026.115502",
"PMID": "42004033",
"PMCID": "PMC13091522",
"ISSN": "2589-0042",
"publisher": "Elsevier",
"URL": "https://doi.org/10.1016/j.isci.2026.115502",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
26
]
]
}
}

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.1016/j.neuroimage.2023.120373 [code]
Adaptive short-term plasticity in the typical reading network.
Journal: NeuroImage
In common: easystats, car, lmerTest, 2 other tools, cognitive, 6 references, author Sabrina Turker
[2] doi:10.1038/s41586-025-08888-1 [code]
Adversarial testing of global neuronal workspace and integrated information theories of consciousness.
Journal: Nature
In common: BayesFactor, afex, easystats, 8 other tools, cognitive, 4 references
[3] doi:10.1038/s41467-023-43747-5 [code]
Neural substrates of parallel devaluation-sensitive and devaluation-insensitive Pavlovian learning in humans.
Journal: Nature communications
In common: BayesFactor, brms, afex, 7 other tools, cognitive, 1 reference
[4] doi:10.1186/s11689-025-09651-3 [code]
The association between infant EEG aperiodic exponent and the trajectory of restricted and repetitive behaviors for toddlers with and without autism.
Journal: Journal of neurodevelopmental disorders
In common: brms, afex, nlme, 9 other tools
[5] doi:10.1038/s41514-024-00171-3 [code]
Mapping computational cognitive profiles of aging to dissociable brain and sociodemographic factors.
Journal: npj aging
In common: BayesFactor, brms, nlme, 9 other tools
[6] doi:10.1038/s41537-023-00333-4 [code]
Preserved electrophysiological markers of confidence in schizophrenia spectrum disorder.
Journal: Schizophrenia (Heidelberg, Germany)
In common: BayesFactor, brms, afex, 8 other tools
[7] doi:10.1038/s41366-023-01370-w [code]
A randomized controlled trial investigating the effect of liraglutide on self-reported liking and neural responses to food stimuli in participants with obesity.
Journal: International journal of obesity (2005)
In common: BayesFactor, brms, afex, 8 other tools, 1 reference
[8] doi:10.1016/j.nicl.2025.103881 [code]
Brain age gap reduction following exercise mirrors clinical improvements in schizophrenia spectrum disorders.
Journal: NeuroImage. Clinical
In common: BayesFactor, brms, easystats, 9 other tools
[9] doi:10.1038/s41467-026-73865-9 [code]
Histamine shapes the neurocomputational dynamics of human learning.
Journal: Nature communications
In common: BayesFactor, brms, easystats, 8 other tools, cognitive, 1 reference
[10] doi:10.1038/s41597-026-07377-y [code]
An open-access multi-site fMRI dataset for investigating conscious visual perception.
Journal: Scientific data
In common: BayesFactor, afex, easystats, 8 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.

Add the badge to the code's README

OSCR: the badge of this paper

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 -->
[![OSCR](https://openscicode.org/badge/doi/10.1016/j.isci.2026.115502.svg)](https://openscicode.org/badge/doi/10.1016/j.isci.2026.115502)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1016/j.isci.2026.115502.svg
   :target: https://openscicode.org/badge/doi/10.1016/j.isci.2026.115502
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1016/j.isci.2026.115502"><img src="https://openscicode.org/badge/doi/10.1016/j.isci.2026.115502.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".

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)

Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.

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