OSCR

Effects of personalized transcranial magnetic stimulation on social cognitive network functional connectivity in schizophrenia spectrum disorders: A double-blind, randomized, sham-controlled target engagement trial.

Code ↔ Paper

5 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 5 matches
  1. [1] § Methods › MRI processing and individualized connectivity metrics ↔ notebooks/01_Modsoccs_EA_FC_paper.Rmd, lines 773–816 · score 0.64 · right premotor, right TPJ, correlations, transformed, ROIs, Fisher
  2. [2] § Methods › Statistical analyses › Primary Analyses: ↔ notebooks/01_Modsoccs_EA_FC_paper.Rmd, lines 988–1052 · score 0.60 · post pre treatment, right IFC, right TPJ, DMPFC, connectivity
  3. [3] § Results › Primary Outcomes: ↔ notebooks/01_Modsoccs_EA_FC_paper.Rmd, lines 1141–1202 · score 0.55 · DMPFC left IFC, DMPFC right IFC, SE, connectivity
  4. [4] § Methods › Statistical analyses › Secondary Analyses: ↔ notebooks/02_Modsoccs_tolerability.Rmd, lines 12–76 · score 0.52 · adverse events, ANOVA, ITT, pain, Fisher, Tolerability
  5. [5] § Methods › Stimulation parameters ↔ notebooks/02_Modsoccs_tolerability.Rmd, lines 12–76 · score 0.52 · motor threshold, intensity, stimulation, active, sham, treatment

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

R Markdown · 1,204 lines · 49 KB · no license · 3 matches

  1. ---
  2. title: "Modsoccs EA Connectivity"
  3. output: html_notebook
  4. ---
  5. This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. When you execute code within the notebook, the results appear beneath the code.
  6. Try executing this chunk by clicking the *Run* button within the chunk or by placing your cursor inside it and pressing *Ctrl+Shift+Enter*.
  7. ```{r, message=FALSE, warning=FALSE, results=FALSE}
  8. library(splitstackshape)
  9. library(stringr)
  10. library(tidyr)
  11. library(dplyr)
  12. library(corrr)
  13. library(psych)
  14. library(tableone)
  15. library(corrplot)
  16. library(ggplot2)
  17. #library(effsize)
  18. ```
  19. ```{r, warning=FALSE, results=FALSE}
  20. # find ses 1 EA time series files # pattern glob2rx("sub*_ses-01_EA_2mm_noGSR_individualized_rois_meants.csv")
  21. setwd("/projects/loliver/ModSoCCS/data/processed")
  22. files_ea_ts1 <- list.files(path= ".", recursive=T, full.names=F, pattern="^sub.*_ses-01_EA_2mm_noGSR_individualized_allrois_meants\\.csv$")
  23. # confirm csvs aren't empty
  24. files_ea_ts1[file.size(files_ea_ts1) == 0]
  25. # create list of IDs
  26. ptlist1 <- paste("SPN20", substring(files_ea_ts1,5,7), substring(files_ea_ts1,8,11), sep = "_")
  27. # read in time series files
  28. ea_ts1 <- lapply(files_ea_ts1, read.csv, header=F)
  29. # transpose dfs
  30. ea_ts1 <- lapply(ea_ts1, t)
  31. # Name dfs with participant IDs
  32. names(ea_ts1) <- ptlist1
  33. # drop last 13 time points from each EA run for MRP and ZHP participants (not CMH) to align with CMH; not losing any task
  34. for (i in names(ea_ts1[15:46])) {
  35. ea_ts1[[i]] <- ea_ts1[[i]][c(1:690,704:1393),]
  36. }
  37. ```
  38. ```{r}
  39. # find circles onsets for each participant for ses 1
  40. setwd("/projects/loliver/ModSoCCS/data/processed")
  41. # pattern glob2rx("sub*_circles.1D")
  42. files_circles <- list.files(path= ".", recursive=T, full.names=F, pattern="^sub.*_circles\\.1D$")
  43. # keep only ses-01
  44. files_circles1 <- str_subset(files_circles, pattern="ses-01")
  45. # create list of IDs
  46. circ_ptlist1 <- paste("SPN20", substring(files_circles1,5,7), substring(files_circles1,8,11), sep = "_")
  47. # read in circles files
  48. circles1 <- lapply(files_circles1, read.csv, header=F, sep=" ", colClasses=c(NA, NA, "NULL"))
  49. names(circles1) <- circ_ptlist1
  50. # get circles onset times into same row, adding 552 s per run (690 TRs/run), dividing by 0.8 (as TRs are 0.8s) to get TR onsets
  51. circles_times1 <- list()
  52. for (i in names(circles1)) {
  53. circles_times1[[i]] <- round(((cbind(circles1[[i]][1,],(circles1[[i]][2,])+552))/0.8))
  54. }
  55. # remove circles from time series data (circles runs are 50 TRs or 40 s - this way we are removing 50 TRs - the onset + 49)
  56. ea_resid_ts1 <- list()
  57. for (i in names(ea_ts1)) {
  58. ea_resid_ts1[[i]] <- ea_ts1[[i]][-c(circles_times1[[i]][1,1]:(circles_times1[[i]][1,1]+49),circles_times1[[i]][1,2]:(circles_times1[[i]][1,2]+49),
  59. circles_times1[[i]][1,3]:(circles_times1[[i]][1,3]+49),circles_times1[[i]][1,4]:(circles_times1[[i]][1,4]+49)),]
  60. }
  61. # check dims
  62. #lapply(ea_resid_ts1, dim)
  63. # check for NAs
  64. #for (i in names(ea_resid_ts1)) {
  65. # print (i)
  66. # print(which(is.na(ea_resid_ts1[[i]])))
  67. #}
  68. ```
  69. ```{r, warning=FALSE, results=FALSE}
  70. # find ses 2 EA time series files
  71. setwd("/projects/loliver/ModSoCCS/data/processed")
  72. files_ea_ts2 <- list.files(path= ".", recursive=T, full.names=F, pattern="^sub.*_ses-02_EA_2mm_noGSR_individualized_allrois_meants\\.csv$")
  73. # confirm csvs aren't empty
  74. files_ea_ts2[file.size(files_ea_ts2) == 0]
  75. # create list of IDs
  76. ptlist2 <- paste("SPN20", substring(files_ea_ts2,5,7), substring(files_ea_ts2,8,11), sep = "_")
  77. # read in time series files
  78. ea_ts2 <- lapply(files_ea_ts2, read.csv, header=F)
  79. # transpose dfs
  80. ea_ts2 <- lapply(ea_ts2, t)
  81. # Name dfs with participant IDs
  82. names(ea_ts2) <- ptlist2
  83. # drop last 13 time points from each EA run for MRP and ZHP participants (not CMH) to align with CMH; not losing any task
  84. for (i in names(ea_ts2[15:46])) {
  85. ea_ts2[[i]] <- ea_ts2[[i]][c(1:690,704:1393),]
  86. }
  87. # keep only those with both baseline and longitudinal data
  88. #ea_ts2 <- ea_ts2[names(ea_ts2) %in% names(ea_ts1)]
  89. ```
  90. ```{r}
  91. # find circles onsets for each participant for ses 2
  92. setwd("/projects/loliver/ModSoCCS/data/processed")
  93. # pattern glob2rx("sub*_circles.1D")
  94. files_circles <- list.files(path= ".", recursive=T, full.names=F, pattern="^sub.*_circles\\.1D$")
  95. # keep only ses-02
  96. files_circles2 <- str_subset(files_circles, pattern="ses-02")
  97. # create list of IDs
  98. circ_ptlist2 <- paste("SPN20", substring(files_circles2,5,7), substring(files_circles2,8,11), sep = "_")
  99. # read in circles files
  100. circles2 <- lapply(files_circles2, read.csv, header=F, sep=" ", colClasses=c(NA, NA, "NULL"))
  101. names(circles2) <- circ_ptlist2
  102. # get circles onset times into same row, adding 552 s per run (690 TRs/run), dividing by 0.8 (as TRs are 0.8s) to get TR onsets
  103. circles_times2 <- list()
  104. for (i in names(circles2)) {
  105. circles_times2[[i]] <- round(((cbind(circles2[[i]][1,],(circles2[[i]][2,])+552))/0.8))
  106. }
  107. # remove circles from time series data (circles runs are 50 TRs or 40 s - this way we are removing 50 TRs - the onset + 49)
  108. ea_resid_ts2 <- list()
  109. for (i in names(ea_ts2)) {
  110. ea_resid_ts2[[i]] <- ea_ts2[[i]][-c(circles_times2[[i]][1,1]:(circles_times2[[i]][1,1]+49),circles_times2[[i]][1,2]:(circles_times2[[i]][1,2]+49),
  111. circles_times2[[i]][1,3]:(circles_times2[[i]][1,3]+49),circles_times2[[i]][1,4]:(circles_times2[[i]][1,4]+49)),]
  112. }
  113. # check dims
  114. #lapply(ea_resid_ts2, dim)
  115. # check for NAs
  116. #for (i in names(ea_resid_ts2)) {
  117. # print (i)
  118. # print(which(is.na(ea_resid_ts2[[i]])))
  119. #}
  120. ```
  121. ```{r}
  122. # read in Modsoccs behavioural data
  123. mod_data <- read.csv(file = "/projects/loliver/ModSoCCS/data/behavioural/ModSoCCS_data_09-10-2024.csv", header=T) %>%
  124. mutate(site = as.factor(site),
  125. demo_sex_birth = as.factor(demo_sex_birth),
  126. scid5_cat3_scz = as.factor(scid5_cat3_scz))
  127. # change sex at birth to female for ZHP0002 (randomized before this info was recorded in Redcap)
  128. mod_data[mod_data$record_id=="SPN20_ZHP_0002","demo_sex_birth"] <- "female"
  129. # data for those who started treatment (N=49 vs N=46 completers) - ITT table
  130. mod_data_ITT <- mod_data[mod_data$term_premature_yn == 0 | mod_data$record_id=="SPN20_MRP_0014" | mod_data$record_id=="SPN20_ZHP_0009" | mod_data$record_id=="SPN20_ZHP_0026",]
  131. # filter based on early termination (keep completers only)
  132. mod_data <- mod_data[mod_data$term_premature_yn == 0,]
  133. # read in days between ea mris and days since final treatment
  134. mod_mri_data <- read.csv(file = "/projects/loliver/ModSoCCS/data/behavioural/ModSoCCS_data_03-01-2023_days_between_ea_treat.csv", header=T)
  135. # add to mod_data
  136. mod_data <- merge(mod_data,mod_mri_data[,c(1,4:5)],by="record_id")
  137. # read in blinded groups
  138. mod_gr_data <- read.csv(file = "/projects/loliver/ModSoCCS/data/behavioural/Modsoccs_group_labels_blinded.csv", header=T)
  139. # add to mod_data
  140. mod_data <- merge(mod_data,mod_gr_data,by="record_id")
  141. mod_data$Label <- factor(mod_data$Label, levels= c("A","B","C"), labels = c("Sham","rTMS","iTBS"))
  142. # add to mod_data_ITT
  143. mod_data_ITT <- merge(mod_data_ITT,mod_gr_data,by="record_id")
  144. mod_data_ITT$Label <- factor(mod_data_ITT$Label, levels= c("A","B","C"), labels = c("Sham","rTMS","iTBS"))
  145. ```
  146. ```{r, warning=FALSE}
  147. # add mean EA to df
  148. mod_data_behav <- mod_data
  149. # find EA regressor files for ses 1
  150. setwd("/projects/loliver/ModSoCCS/data/processed")
  151. # pattern glob2rx("sub*_circles.1D")
  152. files_ea <- list.files(path= ".", recursive=T, full.names=F, pattern="^.*_EA\\.1D$")
  153. # keep only ses-01
  154. files_ea1 <- str_subset(files_ea, pattern="ses-01")
  155. # create list of IDs
  156. ea_ptlist1 <- paste("SPN20", substring(files_ea1,5,7), substring(files_ea1,8,11), sep = "_")
  157. # read in ea regressor files
  158. ea1 <- lapply(files_ea1, read.csv, header=F, sep="*")
  159. ea1 <- lapply(ea1, cSplit, splitCols=2:4, sep=":")
  160. names(ea1) <- ea_ptlist1
  161. # calculate mean EA and add to spins_behav_conn
  162. mod_data_behav$pre_scog_mean_ea <- NA
  163. for (i in names(ea1)) {
  164. mod_data_behav[mod_data_behav$record_id==i,"pre_scog_mean_ea"] <- mean(c(ea1[[i]][[1,"V2_1"]],ea1[[i]][[1,"V3_1"]],ea1[[i]][[1,"V4_1"]],
  165. ea1[[i]][[2,"V2_1"]],ea1[[i]][[2,"V3_1"]],ea1[[i]][[2,"V4_1"]]), na.rm=T)
  166. }
  167. # fisher z transform EA values
  168. mod_data_behav$pre_scog_mean_ea <- fisherz(mod_data_behav$pre_scog_mean_ea)
  169. # same for ses 2
  170. files_ea2 <- str_subset(files_ea, pattern="ses-02")
  171. # create list of IDs
  172. ea_ptlist2 <- paste("SPN20", substring(files_ea2,5,7), substring(files_ea2,8,11), sep = "_")
  173. # read in ea regressor files
  174. ea2 <- lapply(files_ea2, read.csv, header=F, sep="*")
  175. ea2 <- lapply(ea2, cSplit, splitCols=2:4, sep=":")
  176. names(ea2) <- ea_ptlist2
  177. # calculate mean EA and add to spins_behav_conn
  178. mod_data_behav$post_scog_mean_ea <- NA
  179. for (i in names(ea2)) {
  180. mod_data_behav[mod_data_behav$record_id==i,"post_scog_mean_ea"] <- mean(c(ea2[[i]][[1,"V2_1"]],ea2[[i]][[1,"V3_1"]],ea2[[i]][[1,"V4_1"]],
  181. ea2[[i]][[2,"V2_1"]],ea2[[i]][[2,"V3_1"]],ea2[[i]][[2,"V4_1"]]), na.rm=T)
  182. }
  183. # fisher z transform EA values
  184. mod_data_behav$post_scog_mean_ea <- fisherz(mod_data_behav$post_scog_mean_ea)
  185. ```
  186. ```{r}
  187. # examine changes in behavioural metrics
  188. # generate difference scores
  189. mod_data_behav$diff_scog_er40_cr_columnpcr_value <- mod_data_behav$post_scog_er40_cr_columnpcr_value-mod_data_behav$pre_scog_er40_cr_columnpcr_value
  190. mod_data_behav$diff_scog_rmet_total <- mod_data_behav$post_scog_rmet_total-mod_data_behav$pre_scog_rmet_total
  191. mod_data_behav$diff_scog_tasit_p1_total <- mod_data_behav$post_scog_tasit_p1_total-mod_data_behav$pre_scog_tasit_p1_total
  192. mod_data_behav$diff_scog_tasit_p2_sin <- mod_data_behav$post_scog_tasit_p2_sin-mod_data_behav$pre_scog_tasit_p2_sin
  193. mod_data_behav$diff_scog_tasit_p2_sscar <- mod_data_behav$post_scog_tasit_p2_sscar-mod_data_behav$pre_scog_tasit_p2_sscar
  194. mod_data_behav$diff_scog_tasit_p2_psar <- mod_data_behav$post_scog_tasit_p2_psar-mod_data_behav$pre_scog_tasit_p2_psar
  195. mod_data_behav$diff_scog_tasit_p3_lie <- mod_data_behav$post_scog_tasit_p3_lie-mod_data_behav$pre_scog_tasit_p3_lie
  196. mod_data_behav$diff_scog_tasit_p3_sar <- mod_data_behav$post_scog_tasit_p3_sar-mod_data_behav$pre_scog_tasit_p3_sar
  197. mod_data_behav$diff_scog_mean_ea <- mod_data_behav$post_scog_mean_ea-mod_data_behav$pre_scog_mean_ea
  198. mod_data_behav$diff_np_domain_process_speed <- mod_data_behav$post_np_domain_tscore_process_speed-mod_data_behav$pre_np_domain_tscore_process_speed
  199. mod_data_behav$diff_np_domain_work_mem <- mod_data_behav$post_np_domain_tscore_work_mem-mod_data_behav$pre_np_domain_tscore_work_mem
  200. mod_data_behav$diff_np_domain_verbal_learning <- mod_data_behav$post_np_domain_tscore_verbal_learning-mod_data_behav$pre_np_domain_tscore_verbal_learning
  201. ```
  202. ```{r}
  203. # examine changes in clinical metrics
  204. # generate difference scores
  205. mod_data_behav$diff_bprs_total <- mod_data_behav$tx10_bprs_factor_total-mod_data_behav$pre_bprs_factor_total
  206. mod_data_behav$diff_cdss_total <- mod_data_behav$tx10_cdss_total-mod_data_behav$pre_cdss_total
  207. mod_data_behav$diff_cdss_depLV1 <- (mod_data_behav$tx10_cdss_001 + mod_data_behav$tx10_cdss_002 + mod_data_behav$tx10_cdss_003 + mod_data_behav$tx10_cdss_006 +
  208. mod_data_behav$tx10_cdss_008) - (mod_data_behav$pre_cdss_001 + mod_data_behav$pre_cdss_002 + mod_data_behav$pre_cdss_003 +
  209. mod_data_behav$pre_cdss_006 + mod_data_behav$pre_cdss_008)
  210. mod_data_behav$diff_sans_total <- mod_data_behav$post_sans_total_sc-mod_data_behav$pre_sans_total_sc
  211. ```
  212. ```{r}
  213. # exclude CMH0001 for EA metrics - didn't engage in EA task # Sham
  214. mod_data_behav[mod_data_behav$record_id=="SPN20_CMH_0001",c("pre_scog_mean_ea","post_scog_mean_ea","diff_scog_mean_ea")] <- NA
  215. # look at NAs per diff measure
  216. summary(mod_data_behav[,c(234,237:249,252,250)])
  217. ```
  218. ```{r, fig.height=9, fig.width=11}
  219. # check out distributions and check for outliers
  220. library(reshape2)
  221. summary(mod_data_behav)
  222. # melt data
  223. mod_data_behav_melt <- melt(mod_data_behav[,c(1,234,237:252)])
  224. # plots
  225. ggplot(data = mod_data_behav_melt, mapping = aes(x = value)) +
  226. geom_histogram(bins = 10) + facet_wrap(~variable, scales = 'free_x')
  227. # shapiro-wilks
  228. sapply(mod_data_behav[,c(237:252)], shapiro.test)
  229. ```
  230. ```{r}
  231. # check for outliers
  232. outfunc <- function(x) {abs(scale(x)) > 3}
  233. outlist_behav <- list()
  234. for (i in colnames(mod_data_behav[,c(237:252)])) {
  235. outlist_behav[[i]] <-
  236. as.vector(mod_data_behav[which(outfunc(mod_data_behav[[i]])),1])
  237. } # 1 to see IDs; i to see values
  238. print(outlist_behav)
  239. # remove outliers with 3 SD criteria - leave in as using non-parametric tests and these scores still seem reasonable/possible
  240. #for (i in names(outlist_behav)) {
  241. # mod_data_behav[mod_data_behav$record_id %in% outlist_behav[[i]], i] <- NA
  242. #}
  243. ```
  244. ```{r, fig.height=9, fig.width=11}
  245. # check out distributions after outlier removal (if remove)
  246. # melt data
  247. mod_data_behav_melt <- melt(mod_data_behav[,c(1,234,237:252)])
  248. # plots
  249. ggplot(data = mod_data_behav_melt, mapping = aes(x = value)) +
  250. geom_histogram(bins = 10) + facet_wrap(~variable, scales = 'free_x')
  251. # shapiro-wilks
  252. sapply(mod_data_behav[,c(237:252)], shapiro.test)
  253. ```
  254. ```{r, fig.height=9, fig.width=11}
  255. # check out T1 distributions
  256. # melt data
  257. mod_data_behav_times_melt <- melt(mod_data_behav[,c(1,10,125,124,138:141,147:148,235,121:123,107,90,105,100,112)])
  258. # plots
  259. ggplot(data = mod_data_behav_times_melt, mapping = aes(x = value)) +
  260. geom_histogram(bins = 10) + facet_wrap(~variable, scales = 'free_x')
  261. # shapiro-wilks
  262. sapply(mod_data_behav[,c(10,125,124,138:141,147:148,235,121:123,107,90,105,100,112)], shapiro.test)
  263. ```
  264. ```{r}
  265. # table to look at baseline behav diffs - Sham N=16, rTMS N=15, iTBS N=15
  266. table_one_beh <- CreateTableOne(strata="Label", testNonNormal = kruskal.test, data=mod_data_behav[,c(234,6,10,125,124,138:141,147:148,235,121:123,107,90,105,100,112)])
  267. table_one_beh_print <- print(table_one_beh)
  268. #write.csv(table_one_beh_print,file="/projects/loliver/ModSoCCS/results/modsoccs_table_beh_base_kw_09-07-2025.csv")
  269. ```
  270. ```{r}
  271. # table to look at pre-post behav diffs - Sham N=16, rTMS N=15, iTBS N=15
  272. table_one_beh_diff <- CreateTableOne(strata="Label", testNonNormal = kruskal.test, data=mod_data_behav[,c(234,237:249,252,250)])
  273. table_one_beh_diff_print <- print(table_one_beh_diff)
  274. #write.csv(table_one_beh_diff_print,file="/projects/loliver/ModSoCCS/results/modsoccs_table_beh_diff_kw_09-07-2025.csv")
  275. ```
  276. ```{r}
  277. # table to look at post behav diffs - Sham N=16, rTMS N=15, iTBS N=15
  278. table_one_beh_post <- CreateTableOne(strata="Label", testNonNormal = kruskal.test, data=mod_data_behav[,c(234,6,10,203,202,216:219,225:226,236,199:201,175,190,185)])
  279. table_one_beh_post_print <- print(table_one_beh_post)
  280. #write.csv(table_one_beh_post_print,file="/projects/loliver/ModSoCCS/results/modsoccs_table_beh_post_kw_09-07-2025.csv")
  281. ```
  282. ```{r Exploratory analyses behaviour}
  283. # exploratory analyses - linear models
  284. for (i in colnames(mod_data_behav[,237:252])) {
  285. print(i)
  286. assign(paste0("lm_",i), lm(get(i) ~ Label,
  287. data = mod_data_behav)) %>% summary() %>% print()
  288. }
  289. # with covariates
  290. for (i in colnames(mod_data_behav[,237:252])) {
  291. print(i)
  292. assign(paste0("lmcov_",i), lm(get(i) ~ Label + demo_sex_birth + demo_age_study_entry + site,
  293. data = mod_data_behav)) %>% summary() %>% print()
  294. }
  295. ```
  296. ```{r}
  297. # set up for treatment group comparisons
  298. mod_data_ShamTBS <- mod_data_behav[mod_data_behav$Label!="rTMS",]
  299. mod_data_ShamTBS$Label <- factor(mod_data_ShamTBS$Label, levels=c("iTBS","Sham"))
  300. mod_data_ShamTMS <- mod_data_behav[mod_data_behav$Label!="iTBS",]
  301. mod_data_ShamTMS$Label <- factor(mod_data_ShamTMS$Label, levels=c("rTMS","Sham"))
  302. mod_data_TBSTMS <- mod_data_behav[mod_data_behav$Label!="Sham",]
  303. mod_data_TBSTMS$Label <- factor(mod_data_TBSTMS$Label, levels=c("iTBS","rTMS"))
  304. ```
  305. ```{r}
  306. # effect sizes
  307. library(effsize)
  308. # ER40
  309. cliff.delta(mod_data_ShamTBS$diff_scog_er40_cr_columnpcr_value, mod_data_ShamTBS$Label, na.rm=T)
  310. cliff.delta(mod_data_ShamTMS$diff_scog_er40_cr_columnpcr_value, mod_data_ShamTMS$Label, na.rm=T)
  311. # RMET
  312. cliff.delta(mod_data_ShamTBS$diff_scog_rmet_total, mod_data_ShamTBS$Label)
  313. cliff.delta(mod_data_ShamTMS$diff_scog_rmet_total, mod_data_ShamTMS$Label)
  314. # TASIT 1
  315. cliff.delta(mod_data_ShamTBS$diff_scog_tasit_p1_total, mod_data_ShamTBS$Label)
  316. cliff.delta(mod_data_ShamTMS$diff_scog_tasit_p1_total, mod_data_ShamTMS$Label)
  317. # TASIT 2
  318. cliff.delta(mod_data_ShamTBS$diff_scog_tasit_p2_sin, mod_data_ShamTBS$Label)
  319. cliff.delta(mod_data_ShamTMS$diff_scog_tasit_p2_sin, mod_data_ShamTMS$Label)
  320. cliff.delta(mod_data_ShamTBS$diff_scog_tasit_p2_sscar, mod_data_ShamTBS$Label)
  321. cliff.delta(mod_data_ShamTMS$diff_scog_tasit_p2_sscar, mod_data_ShamTMS$Label)
  322. cliff.delta(mod_data_ShamTBS$diff_scog_tasit_p2_psar, mod_data_ShamTBS$Label)
  323. cliff.delta(mod_data_ShamTMS$diff_scog_tasit_p2_psar, mod_data_ShamTMS$Label)
  324. # TASIT 3
  325. cliff.delta(mod_data_ShamTBS$diff_scog_tasit_p3_lie, mod_data_ShamTBS$Label)
  326. cliff.delta(mod_data_ShamTMS$diff_scog_tasit_p3_lie, mod_data_ShamTMS$Label)
  327. cliff.delta(mod_data_ShamTBS$diff_scog_tasit_p3_sar, mod_data_ShamTBS$Label)
  328. cliff.delta(mod_data_ShamTMS$diff_scog_tasit_p3_sar, mod_data_ShamTMS$Label)
  329. # mean EA
  330. cliff.delta(mod_data_ShamTBS$diff_scog_mean_ea, mod_data_ShamTBS$Label, na.rm=T)
  331. cliff.delta(mod_data_ShamTMS$diff_scog_mean_ea, mod_data_ShamTMS$Label, na.rm=T)
  332. # processing speed
  333. cliff.delta(mod_data_ShamTBS$diff_np_domain_process_speed, mod_data_ShamTBS$Label)
  334. cliff.delta(mod_data_ShamTMS$diff_np_domain_process_speed, mod_data_ShamTMS$Label)
  335. # working mem
  336. cliff.delta(mod_data_ShamTBS$diff_np_domain_work_mem, mod_data_ShamTBS$Label)
  337. cliff.delta(mod_data_ShamTMS$diff_np_domain_work_mem, mod_data_ShamTMS$Label)
  338. # verbal learning
  339. cliff.delta(mod_data_ShamTBS$diff_np_domain_verbal_learning, mod_data_ShamTBS$Label)
  340. cliff.delta(mod_data_ShamTMS$diff_np_domain_verbal_learning, mod_data_ShamTMS$Label)
  341. # BPRS total
  342. cliff.delta(mod_data_ShamTBS$diff_bprs_total, mod_data_ShamTBS$Label, na.rm=T)
  343. cliff.delta(mod_data_ShamTMS$diff_bprs_total, mod_data_ShamTMS$Label, na.rm=T)
  344. # CDSS total
  345. cliff.delta(mod_data_ShamTBS$diff_cdss_total, mod_data_ShamTBS$Label)
  346. cliff.delta(mod_data_ShamTMS$diff_cdss_total, mod_data_ShamTMS$Label)
  347. # SANS total
  348. cliff.delta(mod_data_ShamTBS$diff_sans_total, mod_data_ShamTBS$Label)
  349. cliff.delta(mod_data_ShamTMS$diff_sans_total, mod_data_ShamTMS$Label)
  350. ```
  351. ```{r Exploratory behavioural box plots, fig.height=5, fig.width=6}
  352. # box plots
  353. ggplot(mod_data_behav,aes(x=Label,y=diff_scog_er40_cr_columnpcr_value,fill=Label)) +
  354. geom_boxplot()+ scale_fill_brewer(palette="BuPu") +
  355. geom_jitter(size=1.2,alpha=0.5) + #aes(colour = Label),
  356. geom_point(shape = 21)+
  357. ggtitle("ER40 Change by Treatment Group") +
  358. ylab("Post-Pre ER40") +
  359. xlab("Treatment Group")
  360. ggplot(mod_data_behav,aes(x=Label,y=diff_scog_rmet_total,fill=Label)) +
  361. geom_boxplot()+ scale_fill_brewer(palette="BuPu") +
  362. geom_jitter(size=1.2,alpha=0.5) + #aes(colour = Label),
  363. geom_point(shape = 21)+
  364. ggtitle("RMET Change by Treatment Group") +
  365. ylab("Post-Pre RMET") +
  366. xlab("Treatment Group")
  367. ggplot(mod_data_behav,aes(x=Label,y=diff_scog_tasit_p1_total,fill=Label)) +
  368. geom_boxplot()+ scale_fill_brewer(palette="BuPu") +
  369. geom_jitter(size=1.2,alpha=0.5) + #aes(colour = Label),
  370. geom_point(shape = 21)+
  371. ggtitle("TASIT 1 Change by Treatment Group") +
  372. ylab("Post-Pre TASIT 1") +
  373. xlab("Treatment Group")
  374. ggplot(mod_data_behav,aes(x=Label,y=diff_scog_tasit_p2_sscar,fill=Label)) +
  375. geom_boxplot()+ scale_fill_brewer(palette="BuPu") +
  376. geom_jitter(size=1.2,alpha=0.5) + #aes(colour = Label),
  377. geom_point(shape = 21)+
  378. ggtitle("TASIT 2 Simple Sarcasm Change by Treatment Group") +
  379. ylab("Post-Pre TASIT 2") +
  380. xlab("Treatment Group")
  381. ggplot(mod_data_behav,aes(x=Label,y=diff_scog_tasit_p3_lie,fill=Label)) +
  382. geom_boxplot()+ scale_fill_brewer(palette="BuPu") +
  383. geom_jitter(size=1.2,alpha=0.5) + #aes(colour = Label),
  384. geom_point(shape = 21)+
  385. ggtitle("TASIT 3 Lies Change by Treatment Group") +
  386. ylab("Post-Pre TASIT 3") +
  387. xlab("Treatment Group")
  388. ggplot(mod_data_behav,aes(x=Label,y=diff_scog_tasit_p3_sar,fill=Label)) +
  389. geom_boxplot()+ scale_fill_brewer(palette="BuPu") +
  390. geom_jitter(size=1.2,alpha=0.5) + #aes(colour = Label),
  391. geom_point(shape = 21)+
  392. ggtitle("TASIT 3 Sarcasm Change by Treatment Group") +
  393. ylab("Post-Pre TASIT 3") +
  394. xlab("Treatment Group")
  395. ggplot(mod_data_behav,aes(x=Label,y=diff_np_domain_verbal_learning,fill=Label)) +
  396. geom_boxplot()+ scale_fill_brewer(palette="BuPu") +
  397. geom_jitter(size=1.2,alpha=0.5) + #aes(colour = Label),
  398. geom_point(shape = 21)+
  399. ggtitle("Verbal Learning Change by Treatment Group") +
  400. ylab("Post-Pre Verbal Learning") +
  401. xlab("Treatment Group")
  402. ggplot(mod_data_behav,aes(x=Label,y=diff_bprs_total,fill=Label)) +
  403. geom_boxplot()+ scale_fill_brewer(palette="BuPu") +
  404. geom_jitter(size=1.2,alpha=0.5) + #aes(colour = Label),
  405. geom_point(shape = 21)+
  406. ggtitle("BPRS Total Change by Treatment Group") +
  407. ylab("Post-Pre BPRS Total") +
  408. xlab("Treatment Group")
  409. ggplot(mod_data_behav,aes(x=Label,y=diff_cdss_total,fill=Label)) +
  410. geom_boxplot()+ scale_fill_brewer(palette="BuPu") +
  411. geom_jitter(size=1.2,alpha=0.5) + #aes(colour = Label),
  412. geom_point(shape = 21)+
  413. ggtitle("CDSS Total Change by Treatment Group") +
  414. ylab("Post-Pre CDSS Total") +
  415. xlab("Treatment Group")
  416. ggplot(mod_data_behav,aes(x=Label,y=diff_cdss_depLV1,fill=Label)) +
  417. geom_boxplot()+ scale_fill_brewer(palette="BuPu") +
  418. geom_jitter(size=1.2,alpha=0.5) + #aes(colour = Label),
  419. geom_point(shape = 21)+
  420. ggtitle("CDSS Dep LV1 Change by Treatment Group") +
  421. ylab("Post-Pre CDSS Dep LV1") +
  422. xlab("Treatment Group")
  423. ggplot(mod_data_behav,aes(x=Label,y=diff_sans_total,fill=Label)) +
  424. geom_boxplot()+ scale_fill_brewer(palette="BuPu") +
  425. geom_jitter(size=1.2,alpha=0.5) + #aes(colour = Label),
  426. geom_point(shape = 21)+
  427. ggtitle("SANS Total Change by Treatment Group") +
  428. ylab("Post-Pre SANS Total") +
  429. xlab("Treatment Group")
  430. ```
  431. ```{r}
  432. # change behav data to long format for line plots
  433. mod_behav_long1 <- mod_data_behav[,c(1,2,234,85:105,115:133,136:153,235)]
  434. mod_behav_long1$time <- rep("t1",nrow(mod_data_behav))
  435. colnames(mod_behav_long1)[4:62] <- sub("pre_", "", colnames(mod_behav_long1)[4:62])
  436. mod_behav_long2 <- mod_data_behav[,c(1,2,234,170:190,193:211,214:231,236)]
  437. mod_behav_long2$time <- rep("t2",nrow(mod_data_behav))
  438. colnames(mod_behav_long2)[4:19] <- sub("tx10_", "", colnames(mod_behav_long2)[4:19])
  439. colnames(mod_behav_long2)[20:62] <- sub("post_", "", colnames(mod_behav_long2)[20:62])
  440. mod_behav_long <- rbind(mod_behav_long1, mod_behav_long2)
  441. ```
  442. ```{r fig.height=4, fig.width=7}
  443. # line plots behav x time
  444. ggplot(mod_behav_long, aes(x=time, y=scog_er40_cr_columnpcr_value, colour=Label)) +
  445. geom_point(aes(colour=Label)) + # aes(shape = PlotLabel)
  446. geom_line(aes(group=record_id), alpha = 0.5) + # color=Label #color=rep(ment_conn_diff$colour,2)
  447. stat_smooth(aes(group = Label, colour=Label), method = "lm", se = TRUE, fill = "lightgrey", alpha = 0.6, size=1) +
  448. stat_summary(aes(group = Label, colour=Label), geom = "point", fun = mean) +
  449. labs(x ="Time",
  450. y = "ER40 Total") +
  451. guides(fill=FALSE, color=FALSE) +
  452. facet_wrap(~Label) +
  453. scale_x_discrete(expand=c(0.1, 0.1)) + # add space between time points
  454. theme_bw() +
  455. theme(strip.background = element_rect(fill="white")) +
  456. theme(panel.grid.minor = element_blank(), panel.grid.major = element_blank(),text=element_text(size=15))
  457. ggplot(mod_behav_long, aes(x=time, y=scog_rmet_total, colour=Label)) + #record_id
  458. geom_point(aes(colour=Label)) + # aes(shape = PlotLabel)
  459. geom_line(aes(group=record_id), alpha = 0.5) + # color=Label #color=rep(ment_conn_diff$colour,2)
  460. stat_smooth(aes(group = Label, colour=Label), method = "lm", se = TRUE, fill = "lightgrey", alpha = 0.6, size=1) +
  461. stat_summary(aes(group = Label, colour=Label), geom = "point", fun = mean) +
  462. labs(x ="Time",
  463. y = "RMET Total") +
  464. guides(fill=FALSE, color=FALSE) +
  465. facet_wrap(~Label) +
  466. scale_x_discrete(expand=c(0.1, 0.1)) + # add space between time points
  467. theme_bw() +
  468. theme(strip.background = element_rect(fill="white")) +
  469. theme(panel.grid.minor = element_blank(), panel.grid.major = element_blank(),text=element_text(size=15))
  470. ggplot(mod_behav_long, aes(x=time, y=scog_mean_ea, colour=Label)) + #record_id
  471. geom_point(aes(colour=Label)) + # aes(shape = PlotLabel)
  472. geom_line(aes(group=record_id), alpha = 0.5) + # color=Label #color=rep(ment_conn_diff$colour,2)
  473. stat_smooth(aes(group = Label, colour=Label), method = "lm", se = TRUE, fill = "lightgrey", alpha = 0.6, size=1) +
  474. stat_summary(aes(group = Label, colour=Label), geom = "point", fun = mean) +
  475. labs(x ="Time",
  476. y = "Mean EA") +
  477. guides(fill=FALSE, color=FALSE) +
  478. facet_wrap(~Label) +
  479. scale_x_discrete(expand=c(0.1, 0.1)) + # add space between time points
  480. theme_bw() +
  481. theme(strip.background = element_rect(fill="white")) +
  482. theme(panel.grid.minor = element_blank(), panel.grid.major = element_blank(),text=element_text(size=15))
  483. ggplot(mod_behav_long, aes(x=time, y=scog_tasit_p3_sar, colour=Label)) + #record_id
  484. geom_point(aes(colour=Label)) + # aes(shape = PlotLabel)
  485. geom_line(aes(group=record_id), alpha = 0.5) + # color=Label #color=rep(ment_conn_diff$colour,2)
  486. stat_smooth(aes(group = Label, colour=Label), method = "lm", se = TRUE, fill = "lightgrey", alpha = 0.6, size=1) +
  487. stat_summary(aes(group = Label, colour=Label), geom = "point", fun = mean) +
  488. labs(x ="Time",
  489. y = "TASIT 3 Sarcasm") +
  490. guides(fill=FALSE, color=FALSE) +
  491. facet_wrap(~Label) +
  492. scale_x_discrete(expand=c(0.1, 0.1)) + # add space between time points
  493. theme_bw() +
  494. theme(strip.background = element_rect(fill="white")) +
  495. theme(panel.grid.minor = element_blank(), panel.grid.major = element_blank(),text=element_text(size=15))
  496. ggplot(mod_behav_long, aes(x=time, y=np_domain_tscore_verbal_learning, colour=Label)) + #record_id
  497. geom_point(aes(colour=Label)) + # aes(shape = PlotLabel)
  498. geom_line(aes(group=record_id), alpha = 0.5) + # color=Label #color=rep(ment_conn_diff$colour,2)
  499. stat_smooth(aes(group = Label, colour=Label), method = "lm", se = TRUE, fill = "lightgrey", alpha = 0.6, size=1) +
  500. stat_summary(aes(group = Label, colour=Label), geom = "point", fun = mean) +
  501. labs(x ="Time",
  502. y = "Verbal Learning") +
  503. guides(fill=FALSE, color=FALSE) +
  504. facet_wrap(~Label) +
  505. scale_x_discrete(expand=c(0.1, 0.1)) + # add space between time points
  506. theme_bw() +
  507. theme(strip.background = element_rect(fill="white")) +
  508. theme(panel.grid.minor = element_blank(), panel.grid.major = element_blank(),text=element_text(size=15))
  509. ggplot(mod_behav_long, aes(x=time, y=bprs_factor_total, colour=Label)) + #record_id
  510. geom_point(aes(colour=Label)) + # aes(shape = PlotLabel)
  511. geom_line(aes(group=record_id), alpha = 0.5) + # color=Label #color=rep(ment_conn_diff$colour,2)
  512. stat_smooth(aes(group = Label, colour=Label), method = "lm", se = TRUE, fill = "lightgrey", alpha = 0.6, size=1) +
  513. stat_summary(aes(group = Label, colour=Label), geom = "point", fun = mean) +
  514. labs(x ="Time",
  515. y = "BPRS Total") +
  516. guides(fill=FALSE, color=FALSE) +
  517. facet_wrap(~Label) +
  518. scale_x_discrete(expand=c(0.1, 0.1)) + # add space between time points
  519. theme_bw() +
  520. theme(strip.background = element_rect(fill="white")) +
  521. theme(panel.grid.minor = element_blank(), panel.grid.major = element_blank(),text=element_text(size=15))
  522. ggplot(mod_behav_long, aes(x=time, y=sans_total_sc, colour=Label)) + #record_id
  523. geom_point(aes(colour=Label)) + # aes(shape = PlotLabel)
  524. geom_line(aes(group=record_id), alpha = 0.5) + # color=Label #color=rep(ment_conn_diff$colour,2)
  525. stat_smooth(aes(group = Label, colour=Label), method = "lm", se = TRUE, fill = "lightgrey", alpha = 0.6, size=1) +
  526. stat_summary(aes(group = Label, colour=Label), geom = "point", fun = mean) +
  527. labs(x ="Time",
  528. y = "SANS Total") +
  529. guides(fill=FALSE, color=FALSE) +
  530. facet_wrap(~Label) +
  531. scale_x_discrete(expand=c(0.1, 0.1)) + # add space between time points
  532. theme_bw() +
  533. theme(strip.background = element_rect(fill="white")) +
  534. theme(panel.grid.minor = element_blank(), panel.grid.major = element_blank(),text=element_text(size=15))
  535. ggplot(mod_behav_long, aes(x=time, y=cdss_total, colour=Label)) + #record_id
  536. geom_point(aes(colour=Label)) + # aes(shape = PlotLabel)
  537. geom_line(aes(group=record_id), alpha = 0.5) + # color=Label #color=rep(ment_conn_diff$colour,2)
  538. stat_smooth(aes(group = Label, colour=Label), method = "lm", se = TRUE, fill = "lightgrey", alpha = 0.6, size=1) +
  539. stat_summary(aes(group = Label, colour=Label), geom = "point", fun = mean) +
  540. labs(x ="Time",
  541. y = "CDSS Total") +
  542. guides(fill=FALSE, color=FALSE) +
  543. facet_wrap(~Label) +
  544. scale_x_discrete(expand=c(0.1, 0.1)) + # add space between time points
  545. theme_bw() +
  546. theme(strip.background = element_rect(fill="white")) +
  547. theme(panel.grid.minor = element_blank(), panel.grid.major = element_blank(),text=element_text(size=15))
  548. ```
  549. ```{r}
  550. # sensitivity analyses
  551. # excluding those with 17 days since last treatment
  552. #mod_data_behav <- mod_data_behav[mod_data_behav$days_since_treat!=17,] # SPN20_CMH_0012 and SPN20_MRP_0010
  553. # excluding CMH0001 as didn't engage in EA task
  554. #mod_data_behav <- mod_data_behav[mod_data_behav$record_id!="SPN20_CMH_0001",]
  555. # excluding those with mean FD in either session > 0.5
  556. #mod_data_behav <- mod_data_behav[!(mod_data_behav$record_id %in% c("SPN20_CMH_0003","SPN20_MRP_0002","SPN20_ZHP_0002")),] # N=40 - Sham N=11, rTMS N=14, iTBS N=15
  557. ```
  558. ```{r}
  559. # make roi list
  560. rois <- c("dmpfc","precuneus","left_tpj","right_tpj","left_premotor","right_premotor","left_ips","right_ips")
  561. # generate ses 01 correlation matrices for each participant
  562. cor_ea1 <- lapply(ea_resid_ts1, cor)
  563. # fisher z transform corrs to normalize dist
  564. cor_ea1_z <- lapply(cor_ea1, fisherz)
  565. # add ROI names and replace inf values with 0
  566. for (i in names(cor_ea1_z)) {
  567. colnames(cor_ea1_z[[i]]) <- as.vector(rois)
  568. rownames(cor_ea1_z[[i]]) <- as.vector(rois)
  569. cor_ea1_z[[i]][is.infinite(cor_ea1_z[[i]])] <- 0
  570. }
  571. # generate df with dmpfc to other ROIs, and mean within network conn for each participant (across the four ROIs)
  572. ment_conn1 <- data.frame()
  573. for (i in names(cor_ea1_z)) {
  574. ment_conn1[i,"pre_dmpfc_precuneus"] <- cor_ea1_z[[i]][1,2]
  575. ment_conn1[i,"pre_dmpfc_left_tpj"] <- cor_ea1_z[[i]][1,3]
  576. ment_conn1[i,"pre_dmpfc_right_tpj"] <- cor_ea1_z[[i]][1,4]
  577. ment_conn1[i,"pre_dmpfc_ment_mean"] <- mean(cor_ea1_z[[i]][1,2:4])
  578. ment_conn1[i,"pre_mentalizing"] <- mean(cor_ea1_z[[i]][1:4,1:4][upper.tri(cor_ea1_z[[i]][1:4,1:4], diag=F)])
  579. ment_conn1[i,"pre_dmpfc_left_premotor"] <- cor_ea1_z[[i]][1,5]
  580. ment_conn1[i,"pre_dmpfc_right_premotor"] <- cor_ea1_z[[i]][1,6]
  581. ment_conn1[i,"pre_dmpfc_left_ips"] <- cor_ea1_z[[i]][1,7]
  582. ment_conn1[i,"pre_dmpfc_right_ips"] <- cor_ea1_z[[i]][1,8]
  583. ment_conn1[i,"pre_dmpfc_sim_mean"] <- mean(cor_ea1_z[[i]][1,5:8])
  584. ment_conn1[i,"pre_simulation"] <- mean(cor_ea1_z[[i]][5:8,5:8][upper.tri(cor_ea1_z[[i]][5:8,5:8], diag=F)])
  585. ment_conn1[i,"pre_ment_sim"] <- mean(cor_ea1_z[[i]][1:4,5:8])
  586. }
  587. ment_conn1$record_id <- rownames(ment_conn1)
  588. ment_conn1 <- ment_conn1[,c(13,1:12)]
  589. ```
  590. ```{r}
  591. # generate ses 02 correlation matrices for each participant
  592. cor_ea2 <- lapply(ea_resid_ts2, cor)
  593. # fisher z transform corrs to normalize dist
  594. cor_ea2_z <- lapply(cor_ea2, fisherz)
  595. # add ROI names and replace inf values with 0
  596. for (i in names(cor_ea2_z)) {
  597. colnames(cor_ea2_z[[i]]) <- as.vector(rois)
  598. rownames(cor_ea2_z[[i]]) <- as.vector(rois)
  599. cor_ea2_z[[i]][is.infinite(cor_ea2_z[[i]])] <- 0
  600. }
  601. # generate df with dmpfc to other ROIs, and mean within network conn for each participant (across the four ROIs)
  602. ment_conn2 <- data.frame()
  603. for (i in names(cor_ea2_z)) {
  604. ment_conn2[i,"post_dmpfc_precuneus"] <- cor_ea2_z[[i]][1,2]
  605. ment_conn2[i,"post_dmpfc_left_tpj"] <- cor_ea2_z[[i]][1,3]
  606. ment_conn2[i,"post_dmpfc_right_tpj"] <- cor_ea2_z[[i]][1,4]
  607. ment_conn2[i,"post_dmpfc_ment_mean"] <- mean(cor_ea2_z[[i]][1,2:4])
  608. ment_conn2[i,"post_mentalizing"] <- mean(cor_ea2_z[[i]][1:4,1:4][upper.tri(cor_ea2_z[[i]][1:4,1:4], diag=F)])
  609. ment_conn2[i,"post_dmpfc_left_premotor"] <- cor_ea2_z[[i]][1,5]
  610. ment_conn2[i,"post_dmpfc_right_premotor"] <- cor_ea2_z[[i]][1,6]
  611. ment_conn2[i,"post_dmpfc_left_ips"] <- cor_ea2_z[[i]][1,7]
  612. ment_conn2[i,"post_dmpfc_right_ips"] <- cor_ea2_z[[i]][1,8]
  613. ment_conn2[i,"post_dmpfc_sim_mean"] <- mean(cor_ea2_z[[i]][1,5:8])
  614. ment_conn2[i,"post_simulation"] <- mean(cor_ea2_z[[i]][5:8,5:8][upper.tri(cor_ea2_z[[i]][5:8,5:8], diag=F)])
  615. ment_conn2[i,"post_ment_sim"] <- mean(cor_ea2_z[[i]][1:4,5:8])
  616. }
  617. ment_conn2$record_id <- rownames(ment_conn2)
  618. ment_conn2 <- ment_conn2[,c(13,1:12)]
  619. # merge pre and post conn data
  620. ment_conn <- merge(ment_conn1, ment_conn2, by="record_id")
  621. # merge behav and conn data
  622. mod_data_conn <- merge(mod_data_behav, ment_conn, by="record_id")
  623. # write out csv
  624. #write.csv(mod_data_conn, '/projects/loliver/ModSoCCS/data/behavioural/modsoccs_behav_conn_data_07-22-2025.csv', row.names = FALSE)
  625. ```
  626. ```{r}
  627. # generate conn difference scores (post-pre)
  628. mod_data_conn$diff_dmpfc_precuneus <- mod_data_conn$post_dmpfc_precuneus-mod_data_conn$pre_dmpfc_precuneus
  629. mod_data_conn$diff_dmpfc_left_tpj <- mod_data_conn$post_dmpfc_left_tpj-mod_data_conn$pre_dmpfc_left_tpj
  630. mod_data_conn$diff_dmpfc_right_tpj <- mod_data_conn$post_dmpfc_right_tpj-mod_data_conn$pre_dmpfc_right_tpj
  631. mod_data_conn$diff_dmpfc_ment_mean <- mod_data_conn$post_dmpfc_ment_mean-mod_data_conn$pre_dmpfc_ment_mean
  632. mod_data_conn$diff_mentalizing <- mod_data_conn$post_mentalizing-mod_data_conn$pre_mentalizing
  633. mod_data_conn$diff_dmpfc_left_premotor <- mod_data_conn$post_dmpfc_left_premotor-mod_data_conn$pre_dmpfc_left_premotor
  634. mod_data_conn$diff_dmpfc_right_premotor <- mod_data_conn$post_dmpfc_right_premotor-mod_data_conn$pre_dmpfc_right_premotor
  635. mod_data_conn$diff_dmpfc_left_ips <- mod_data_conn$post_dmpfc_left_ips-mod_data_conn$pre_dmpfc_left_ips
  636. mod_data_conn$diff_dmpfc_right_ips <- mod_data_conn$post_dmpfc_right_ips-mod_data_conn$pre_dmpfc_right_ips
  637. mod_data_conn$diff_dmpfc_sim_mean <- mod_data_conn$post_dmpfc_sim_mean-mod_data_conn$pre_dmpfc_sim_mean
  638. mod_data_conn$diff_simulation <- mod_data_conn$post_simulation-mod_data_conn$pre_simulation
  639. mod_data_conn$diff_ment_sim <- mod_data_conn$post_ment_sim-mod_data_conn$pre_ment_sim
  640. ```
  641. ```{r, fig.height=8, fig.width=11}
  642. # check out distributions and check for outliers
  643. library(reshape2)
  644. # melt conn data
  645. mod_data_melt <- melt(mod_data_conn[,c(1,234,277:288)])
  646. # plots
  647. ggplot(data = mod_data_melt, mapping = aes(x = value)) +
  648. geom_histogram(bins = 10) + facet_wrap(~variable, scales = 'free_x')
  649. # shapiro-wilks
  650. sapply(mod_data_conn[,c(277:288)], shapiro.test)
  651. ```
  652. ```{r}
  653. # check for outliers
  654. outfunc <- function(x) {abs(scale(x)) > 3}
  655. outlist <- list()
  656. for (i in colnames(mod_data_conn[,c(277:288)])) {
  657. outlist[[i]] <-
  658. as.vector(mod_data_conn[which(outfunc(mod_data_conn[[i]])),1])
  659. } # 1 to see IDs; i to see values
  660. print(outlist)
  661. # remove outliers with 3 SD criteria
  662. for (i in names(outlist)) {
  663. mod_data_conn[mod_data_conn$record_id %in% outlist[[i]], i] <- NA
  664. }
  665. # change pre and post values to NAs too, for conn table and spaghetti plots
  666. mod_data_conn[mod_data_conn$record_id == "SPN20_MRP_0002", c("pre_dmpfc_left_tpj","post_dmpfc_left_tpj","pre_dmpfc_right_tpj","post_dmpfc_right_tpj","pre_dmpfc_ment_mean","post_dmpfc_ment_mean","pre_mentalizing","post_mentalizing","pre_dmpfc_right_ips","post_dmpfc_right_ips")] <- NA
  667. ment_conn1[ment_conn1$record_id == "SPN20_MRP_0002", c("pre_dmpfc_left_tpj","pre_dmpfc_right_tpj","pre_dmpfc_ment_mean","pre_mentalizing","pre_dmpfc_right_ips")] <- NA
  668. ment_conn2[ment_conn2$record_id == "SPN20_MRP_0002", c("post_dmpfc_left_tpj","post_dmpfc_right_tpj","post_dmpfc_ment_mean","post_mentalizing","post_dmpfc_right_ips")] <- NA
  669. ```
  670. ```{r, fig.height=8, fig.width=11}
  671. # check out distributions after outlier removal
  672. # melt conn data
  673. mod_data_melt <- melt(mod_data_conn[,c(1,234,277:288)])
  674. # plots
  675. ggplot(data = mod_data_melt, mapping = aes(x = value)) +
  676. geom_histogram(bins = 10) + facet_wrap(~variable, scales = 'free_x')
  677. # shapiro-wilks
  678. sapply(mod_data_conn[,c(277:288)], shapiro.test)
  679. ```
  680. ```{r Primary analyses FC - change}
  681. # primary analyses - linear models
  682. for (i in colnames(mod_data_conn[,277:288])) {
  683. print(i)
  684. assign(paste0("lm_",i), lm(get(i) ~ Label + days_since_treat,
  685. data = mod_data_conn)) %>% summary() %>% print()
  686. }
  687. # with covariates
  688. for (i in colnames(mod_data_conn[,277:288])) {
  689. print(i)
  690. assign(paste0("lmcov_",i), lm(get(i) ~ Label + demo_sex_birth + demo_age_study_entry + site + days_since_treat,
  691. data = mod_data_conn)) %>% summary() %>% print()
  692. }
  693. ```
  694. ```{r}
  695. # post hoc and effect size comparisons
  696. library(emmeans)
  697. library(effectsize)
  698. # DMPFC-precuneus
  699. # post-hoc comparisons
  700. em_dmpfc_precuneus <- emmeans(lmcov_diff_dmpfc_precuneus, ~ Label)
  701. # Compare each treatment to sham only
  702. pw_dmpfc_precuneus <- contrast(em_dmpfc_precuneus, method = "trt.vs.ctrl", ref = "Sham", adjust = "fdr")
  703. # effect size
  704. eff_size(em_dmpfc_precuneus, sigma = sigma(lmcov_diff_dmpfc_precuneus), edf = df.residual(lmcov_diff_dmpfc_precuneus), type = "d")
  705. # DMPFC-left TPJ
  706. # post-hoc comparisons
  707. em_dmpfc_left_tpj <- emmeans(lmcov_diff_dmpfc_left_tpj, ~ Label)
  708. # Compare each treatment to sham only
  709. pw_dmpfc_left_tpj <- contrast(em_dmpfc_left_tpj, method = "trt.vs.ctrl", ref = "Sham", adjust = "fdr")
  710. print(pw_dmpfc_left_tpj)
  711. # effect size
  712. eff_size(em_dmpfc_left_tpj, sigma = sigma(lmcov_diff_dmpfc_left_tpj), edf = df.residual(lmcov_diff_dmpfc_left_tpj), type = "d")
  713. # DMPFC-right TPJ
  714. # post-hoc comparisons
  715. em_dmpfc_right_tpj <- emmeans(lmcov_diff_dmpfc_right_tpj, ~ Label)
  716. # Compare each treatment to sham only
  717. pw_dmpfc_right_tpj <- contrast(em_dmpfc_right_tpj, method = "trt.vs.ctrl", ref = "Sham", adjust = "fdr")
  718. print(pw_dmpfc_right_tpj)
  719. # effect size
  720. eff_size(em_dmpfc_right_tpj, sigma = sigma(lmcov_diff_dmpfc_right_tpj), edf = df.residual(lmcov_diff_dmpfc_right_tpj), type = "d")
  721. # DMPFC-mentalizing mean
  722. em_dmpfc_ment_mean <- emmeans(lmcov_diff_dmpfc_ment_mean, ~ Label)
  723. pw_dmpfc_ment_mean <- contrast(em_dmpfc_ment_mean, method = "trt.vs.ctrl", ref = "Sham", adjust = "fdr")
  724. eff_size(em_dmpfc_ment_mean, sigma = sigma(lmcov_diff_dmpfc_ment_mean), edf = df.residual(lmcov_diff_dmpfc_ment_mean), type = "d")
  725. # mentalizing mean
  726. em_mentalizing <- emmeans(lmcov_diff_mentalizing, ~ Label)
  727. pw_mentalizing <- contrast(em_mentalizing, method = "trt.vs.ctrl", ref = "Sham", adjust = "fdr")
  728. eff_size(em_mentalizing, sigma = sigma(lmcov_diff_mentalizing), edf = df.residual(lmcov_diff_mentalizing), type = "d")
  729. # DMPFC-left premotor
  730. em_dmpfc_left_premotor <- emmeans(lmcov_diff_dmpfc_left_premotor, ~ Label)
  731. pw_dmpfc_left_premotor <- contrast(em_dmpfc_left_premotor, method = "trt.vs.ctrl", ref = "Sham", adjust = "fdr")
  732. print(pw_dmpfc_left_premotor)
  733. eff_size(em_dmpfc_left_premotor, sigma = sigma(lmcov_diff_dmpfc_left_premotor), edf = df.residual(lmcov_diff_dmpfc_left_premotor), type = "d")
  734. # DMPFC-right premotor
  735. em_dmpfc_right_premotor <- emmeans(lmcov_diff_dmpfc_right_premotor, ~ Label)
  736. pw_dmpfc_right_premotor <- contrast(em_dmpfc_right_premotor, method = "trt.vs.ctrl", ref = "Sham", adjust = "fdr")
  737. print(pw_dmpfc_right_premotor)
  738. eff_size(em_dmpfc_right_premotor, sigma = sigma(lmcov_diff_dmpfc_right_premotor), edf = df.residual(lmcov_diff_dmpfc_right_premotor), type = "d")
  739. ```
  740. ```{r Primary FC box plots, fig.height=4, fig.width=4}
  741. # box plots for change in conn by treatment group
  742. ggplot(mod_data_conn,aes(x=Label,y=diff_dmpfc_left_tpj,fill=Label)) +
  743. geom_boxplot() + scale_fill_brewer(palette="BuPu") +
  744. geom_jitter(size=1.4,alpha=0.5) + #aes(colour = Label),
  745. #geom_point(shape = 21)+
  746. ggtitle("DMPFC-left TPJ Connectivity Change") +
  747. ylab("Post - Pre-treatment Connectivity") +
  748. xlab("Treatment Group") +
  749. theme_bw() +
  750. theme(legend.position = "none",
  751. axis.text=element_text(size=12),
  752. axis.title=element_text(size=14)) #face="bold"
  753. ggplot(mod_data_conn,aes(x=Label,y=diff_dmpfc_right_tpj,fill=Label)) +
  754. geom_boxplot() + scale_fill_brewer(palette="BuPu") +
  755. geom_jitter(size=1.4,alpha=0.5) + #aes(colour = Label),
  756. #geom_point(shape = 21)+
  757. ggtitle("DMPFC-right TPJ Connectivity Change") +
  758. ylab("Post - Pre-treatment Connectivity") +
  759. xlab("Treatment Group") +
  760. theme_bw() +
  761. theme(legend.position = "none",
  762. axis.text=element_text(size=12),
  763. axis.title=element_text(size=14)) #face="bold"
  764. ggplot(mod_data_conn,aes(x=Label,y=diff_dmpfc_left_premotor,fill=Label)) +
  765. geom_boxplot() + scale_fill_brewer(palette="BuPu") +
  766. geom_jitter(size=1.4,alpha=0.5) + #aes(colour = Label),
  767. #geom_point(shape = 21)+
  768. ggtitle("DMPFC-left IFC Connectivity Change") +
  769. ylab("Post - Pre-treatment Connectivity") +
  770. xlab("Treatment Group") +
  771. theme_bw() +
  772. theme(legend.position = "none",
  773. axis.text=element_text(size=12),
  774. axis.title=element_text(size=14)) #face="bold"
  775. ggplot(mod_data_conn,aes(x=Label,y=diff_dmpfc_right_premotor,fill=Label)) +
  776. geom_boxplot() + scale_fill_brewer(palette="BuPu") +
  777. geom_jitter(size=1.4,alpha=0.5) + #aes(colour = Label),
  778. #geom_point(shape = 21)+
  779. ggtitle("DMPFC-right IFC Connectivity Change") +
  780. ylab("Post - Pre-treatment Connectivity") +
  781. xlab("Treatment Group") +
  782. theme_bw() +
  783. theme(legend.position = "none",
  784. axis.text=element_text(size=12),
  785. axis.title=element_text(size=14)) #face="bold"
  786. # old
  787. ggplot(mod_data_conn,aes(x=Label,y=diff_dmpfc_right_premotor,fill=Label)) +
  788. geom_boxplot(alpha = 0.8) + scale_fill_brewer(palette="BuPu") +
  789. geom_dotplot(binaxis = 'y', stackdir = 'center', alpha = 1, dotsize=.5) +
  790. #geom_point(shape = 21)+
  791. ggtitle("DMPFC-right Premotor Connectivity Change") +
  792. ylab("Post - Pre-treatment Connectivity") +
  793. xlab("Treatment Group") +
  794. theme_bw() +
  795. theme(legend.position = "none",
  796. axis.text=element_text(size=12),
  797. axis.title=element_text(size=14))
  798. ```
  799. ```{r}
  800. # generate Table 1 ITT - demographics
  801. mod_demo_ITT <- mod_data_ITT[,c(1:2,232,6,10,13:21,30:37,90,105,100,107,112)]
  802. mod_demo_ITT$demo_race_white <- as.factor(rowSums(mod_demo_ITT[,c("demo_race_ca___1_white","demo_race_us___1_white")]))
  803. mod_demo_ITT$demo_race_black <- as.factor(rowSums(mod_demo_ITT[,c("demo_race_ca___2_black","demo_race_us___2_black")]))
  804. mod_demo_ITT$demo_race_asian <- as.factor(rowSums(mod_demo_ITT[,c("demo_race_ca___3_asian","demo_race_us___3_asian")]))
  805. mod_demo_ITT$demo_race_native <- as.factor(rowSums(mod_demo_ITT[,c("demo_race_ca___4_native","demo_race_us___4_native")]))
  806. mod_demo_ITT$demo_race_mixed <- as.factor(rowSums(mod_demo_ITT[,c("demo_race_ca___7_mixed","demo_race_us___7_mixed")]))
  807. mod_demo_ITT$demo_race_other <- as.factor(rowSums(mod_demo_ITT[,c("demo_race_ca___8_other","demo_race_us___6_other")]))
  808. mod_demo_ITT$demo_race_unknown <- as.factor(rowSums(mod_demo_ITT[,c("demo_race_ca___9_unknown","demo_race_us___8_unknown")]))
  809. mod_demo_ITT <- mod_demo_ITT[,c(1:5,28:34,23:27)]
  810. # for those who endorsed mixed race, change other endorsed races to 0 so sum equals total N (just for this table)
  811. mod_demo_ITT[mod_demo_ITT$demo_race_mixed!=0,c("demo_race_white","demo_race_black","demo_race_asian","demo_race_native")] <- 0
  812. table_one_ITT <- CreateTableOne(strata="Label", testNonNormal = kruskal.test, testExact = fisher.test, data=mod_demo_ITT[,c(3:17)])
  813. table_one_ITT_print <- print(table_one_ITT)
  814. #write.csv(table_one_ITT_print,file="/projects/loliver/ModSoCCS/results/modsoccs_ITT_table1_demo_kw_09-07-2025.csv")
  815. # write out mod_demo_ITT
  816. #write.csv(mod_demo_ITT,file="/projects/loliver/ModSoCCS/results/mod_demo_ITT.csv", row.names = F)
  817. ```
  818. ```{r}
  819. # generate Table 2 - connectivity (use for baseline)
  820. mod_conn <- mod_data_conn[,c("record_id","site","Label","days_since_treat","pre_dmpfc_left_tpj","post_dmpfc_left_tpj","pre_dmpfc_right_tpj","post_dmpfc_right_tpj","pre_dmpfc_left_premotor","post_dmpfc_left_premotor","pre_dmpfc_right_premotor","post_dmpfc_right_premotor")]
  821. table_two <- CreateTableOne(strata="Label", data=mod_conn[,c(3:12)])
  822. table_two_print <- print(table_two)
  823. #write.csv(table_two_print,file="/projects/loliver/ModSoCCS/results/modsoccs_table2_conn_09-07-2025.csv") # probably use this as it's reflected in the main analyses
  824. #write.csv(table_two_print,file="/projects/loliver/ModSoCCS/results/modsoccs_table2_conn_woutlier_09-07-2025.csv") # all NS before and after outlier removal
  825. ```
  826. ```{r}
  827. # add diff vars and generate table with those values
  828. mod_conn$diff_dmpfc_left_tpj <- mod_conn$post_dmpfc_left_tpj - mod_conn$pre_dmpfc_left_tpj
  829. mod_conn$diff_dmpfc_right_tpj <- mod_conn$post_dmpfc_right_tpj - mod_conn$pre_dmpfc_right_tpj
  830. table_two_diff <- CreateTableOne(strata="Label", data=mod_conn[,c(3,13:14)])
  831. table_two_diff_print <- print(table_two_diff)
  832. ```
  833. ```{r}
  834. # merge data to plot connectivity data by time
  835. ment_conn_long1 <- ment_conn1[ment_conn1$record_id %in% mod_data_conn$record_id,]
  836. ment_conn_long1$time <- rep("t1",nrow(mod_data_behav))
  837. colnames(ment_conn_long1)[2:13] <- sub("pre_", "", colnames(ment_conn_long1)[2:13])
  838. ment_conn_long1 <- merge(ment_conn_long1, mod_data[,c("record_id","site","Label")], by="record_id")
  839. ment_conn_long2 <- ment_conn2[ment_conn2$record_id %in% mod_data_conn$record_id,]
  840. ment_conn_long2$time <- rep("t2",nrow(mod_data_behav))
  841. colnames(ment_conn_long2)[2:13] <- sub("post_", "", colnames(ment_conn_long2)[2:13])
  842. ment_conn_long2 <- merge(ment_conn_long2, mod_data[,c("record_id","site","Label")], by="record_id")
  843. ment_conn_long <- rbind(ment_conn_long1,ment_conn_long2)
  844. ```
  845. ```{r}
  846. # check out distributions by timepoint
  847. # melt conn data
  848. ment_conn_melt <- melt(ment_conn_long)
  849. # T1
  850. # plot
  851. ggplot(data = ment_conn_melt[ment_conn_melt$time=="t1",], mapping = aes(x = value)) +
  852. geom_histogram(bins = 10) + facet_wrap(~variable, scales = 'free_x')
  853. # shapiro-wilks
  854. sapply(ment_conn_long[ment_conn_long$time=="t1",c(2:13)], shapiro.test)
  855. # T2
  856. # plot
  857. ggplot(data = ment_conn_melt[ment_conn_melt$time=="t2",], mapping = aes(x = value)) +
  858. geom_histogram(bins = 10) + facet_wrap(~variable, scales = 'free_x')
  859. # shapiro-wilks
  860. sapply(ment_conn_long[ment_conn_long$time=="t2",c(2:13)], shapiro.test)
  861. ```
  862. ```{r Primary FC spaghetti plots, fig.height=4, fig.width=6}
  863. # spaghetti plot DMPFC-left TPJ conn x time
  864. ggplot(ment_conn_long, aes(x=time, y=dmpfc_left_tpj, colour=Label)) + #record_id
  865. geom_point(aes(colour=Label)) + # aes(shape = PlotLabel)
  866. geom_line(aes(group=record_id), alpha = 0.5) + # color=Label #color=rep(ment_conn_diff$colour,2)
  867. stat_smooth(aes(group = Label, colour=Label), method = "lm", se = TRUE, fill = "lightgrey", alpha = 0.3, size=1) +
  868. stat_summary(aes(group = Label, colour=Label), geom = "point", fun = mean) +
  869. labs(x ="Time",
  870. y = "DMPFC-left TPJ Connectivity") +
  871. guides(fill=FALSE, color=FALSE) +
  872. facet_wrap(~Label) +
  873. scale_x_discrete(expand=c(0.1, 0.1)) + # add space between time points
  874. theme_bw() +
  875. theme(strip.background = element_rect(fill="white")) +
  876. theme(panel.grid.minor = element_blank(), panel.grid.major = element_blank(),text=element_text(size=15))
  877. # DMPFC-right TPJ conn x time
  878. ggplot(ment_conn_long, aes(x=time, y=dmpfc_right_tpj, colour=Label)) + #record_id
  879. geom_point(aes(colour=Label)) + # aes(shape = PlotLabel)
  880. geom_line(aes(group=record_id), alpha = 0.5) +
  881. stat_smooth(aes(group = Label, colour=Label), method = "lm", se = TRUE, fill = "lightgrey", alpha = 0.3, size=1) +
  882. stat_summary(aes(group = Label, colour=Label), geom = "point", fun = mean) +
  883. labs(x ="Time",
  884. y = "DMPFC-right TPJ Connectivity") +
  885. guides(fill=FALSE, color=FALSE) +
  886. facet_wrap(~Label) +
  887. scale_x_discrete(expand=c(0.1, 0.1)) + # add space between time points
  888. theme_bw() +
  889. theme(strip.background = element_rect(fill="white")) +
  890. theme(panel.grid.minor = element_blank(), panel.grid.major = element_blank(),text=element_text(size=15))
  891. # DMPFC-left premotor
  892. ggplot(ment_conn_long, aes(x=time, y=dmpfc_left_premotor, colour=Label)) + #record_id
  893. geom_point(aes(colour=Label)) +
  894. geom_line(aes(group=record_id), alpha = 0.5) +
  895. stat_smooth(aes(group = Label, colour=Label), method = "lm", se = TRUE, fill = "lightgrey", alpha = 0.3, size=1) +
  896. stat_summary(aes(group = Label, colour=Label), geom = "point", fun = mean) +
  897. labs(x ="Time",
  898. y = "DMPFC-left IFC Connectivity") +
  899. guides(fill=FALSE, color=FALSE) +
  900. facet_wrap(~Label) +
  901. scale_x_discrete(expand=c(0.1, 0.1)) + # add space between time points
  902. theme_bw() +
  903. theme(strip.background = element_rect(fill="white")) +
  904. theme(panel.grid.minor = element_blank(), panel.grid.major = element_blank(),text=element_text(size=15))
  905. # DMPFC-right premotor
  906. ggplot(ment_conn_long, aes(x=time, y=dmpfc_right_premotor, colour=Label)) + #record_id
  907. geom_point(aes(colour=Label)) +
  908. geom_line(aes(group=record_id), alpha = 0.5) +
  909. stat_smooth(aes(group = Label, colour=Label), method = "lm", se = TRUE, fill = "lightgrey", alpha = 0.3, size=1) +
  910. stat_summary(aes(group = Label, colour=Label), geom = "point", fun = mean) +
  911. labs(x ="Time",
  912. y = "DMPFC-right IFC Connectivity") +
  913. guides(fill=FALSE, color=FALSE) +
  914. facet_wrap(~Label) +
  915. scale_x_discrete(expand=c(0.1, 0.1)) + # add space between time points
  916. theme_bw() +
  917. theme(strip.background = element_rect(fill="white")) +
  918. theme(panel.grid.minor = element_blank(), panel.grid.major = element_blank(),text=element_text(size=15))
  919. ```

01_Modsoccs_EA_FC_paper.Rmd at commit 7f39509, no license · at the source

Overview

Authors: Lindsay D. Oliver1,2, Daniel M. Blumberger1,2, Zhi-De Deng3, Colin Hawco1,2, Erin W. Dickie1,2, Julia Gallucci1,4, Jerrold Jeyachandra1, Salim Mansour1, Stephanie M. Hare5, James M. Gold5, George Foussias1,2, Miklos Argyelan6,7,8, Zafiris J. Daskalakis9, Robert W. Buchanan5, Anil K. Malhotra6,7,8, Aristotle N. Voineskos1,2
  1. Campbell Family Mental Health Research Institute, Centre for Addiction and Mental Health, Toronto, ON, Canada
  2. Department of Psychiatry, Temerty Faculty of Medicine, University of Toronto, Toronto, ON, Canada
  3. Computational Neurostimulation Research Program, Experimental Therapeutics and Pathophysiology Branch, National Institute of Mental Health, Bethesda, MD, USA
  4. Institute of Medical Science, University of Toronto, Toronto, ON, Canada
  5. Maryland Psychiatric Research Center, Department of Psychiatry, University of Maryland School of Medicine, Baltimore, MD, USA
  6. Division of Psychiatry Research, The Zucker Hillside Hospital, Division of Northwell Health, Glen Oaks, NY, USA
  7. The Donald and Barbara Zucker School of Medicine at Hofstra/Northwell, Department of Psychiatry, Hempstead, NY, USA
  8. Center for Psychiatric Neuroscience, The Feinstein Institute for Medical Research, Manhasset, NY, USA
  9. Department of Psychiatry, University of California San Diego, San Diego, CA, USA
Journal: Brain stimulation, volume 19, issue 5, article 103172
Dates: published online 29 July 2026; in print 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1016/j.brs.2026.103172 · PMID 42526755 · PMCID PMC13551969 · OpenAlex W7171616946
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: fMRI (modality), other (modality), human (organism), schizophrenia / psychosis (population)
Methods: Connectivity, Statistics, fMRI & imaging
Keywords: rTMS, Schizophrenia spectrum disorders, Social cognition, fMRI, Individualized targeting, Electric field modelling, Functional connectivity mapping
MeSH: Nerve Net*, Prefrontal Cortex*, Schizophrenia*, Social Cognition*, Transcranial Magnetic Stimulation*, Adult, Double-Blind Method, Female, Humans, Magnetic Resonance Imaging, Male, Middle Aged (* major topic)
Topic: Transcranial Magnetic Stimulation Studies (Neurology, Neuroscience), according to OpenAlex
Funding: Brain and Behavior Research Foundation; Wellcome Trust; Intramural Research Program (ZIAMH002955); National Institute of Mental Health (R61 MH120188); Intramural NIH HHS (ZIA MH002955); NIMH NIH HHS (R61 MH120188)
Citations: not cited yet (Europe PMC); 98 references in the paper

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repository

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

loliver4/ModSoCCS

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 7f39509966bfc8b1e3e3a78bf372ba125dc282ee, 9 January 2026
Languages: Shell (7), Python (3), R (3)
Size: 22 files, 13 scripts
Software Heritage: not archived
Found in: the text, “Exploratory Analyses:”
Holds: README, environment (requirements.txt), documentation, 3 notebooks
Not found: license file, CITATION.cff, tests, continuous integration
Tools: Connectome Workbench (3 files), AFNI (2 files), pandas (2 files), tidyverse (2 files), easystats (1 file), emmeans (1 file), ggplot2 (1 file), Nipype (1 file), NumPy (1 file), psych (1 file), reshape2 (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
14 files

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 13 scripts, each with its path and the digest of its content;
  • 5 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.

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 2, 28 September 2026

  • Publisher: n/a → Elsevier BV

Version 1, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 16 authors, 7 keywords, 12 MeSH terms, 6 funders, 92 references.

Cite

This paper

Oliver, L. D., Blumberger, D. M., Deng, Z.-D., Hawco, C., Dickie, E. W., Gallucci, J., Jeyachandra, J., Mansour, S., Hare, S. M., Gold, J. M., Foussias, G., Argyelan, M., Daskalakis, Z. J., Buchanan, R. W., Malhotra, A. K., & Voineskos, A. N. (2026). Effects of personalized transcranial magnetic stimulation on social cognitive network functional connectivity in schizophrenia spectrum disorders: A double-blind, randomized, sham-controlled target engagement trial. Brain stimulation, 19(5), 103172. https://doi.org/10.1016/j.brs.2026.103172

BibTeX

@article{oliver2026effects,
author = {Oliver, Lindsay D. and Blumberger, Daniel M. and Deng, Zhi-De and Hawco, Colin and Dickie, Erin W. and Gallucci, Julia and Jeyachandra, Jerrold and Mansour, Salim and Hare, Stephanie M. and Gold, James M. and Foussias, George and Argyelan, Miklos and Daskalakis, Zafiris J. and Buchanan, Robert W. and Malhotra, Anil K. and Voineskos, Aristotle N.},
title = {{Effects of personalized transcranial magnetic stimulation on social cognitive network functional connectivity in schizophrenia spectrum disorders: A double-blind, randomized, sham-controlled target engagement trial}},
journal = {Brain stimulation},
year = {2026},
month = jul,
volume = {19},
number = {5},
pages = {103172},
publisher = {Elsevier BV},
issn = {1935-861X},
doi = {10.1016/j.brs.2026.103172},
url = {https://doi.org/10.1016/j.brs.2026.103172},
pmid = {42526755},
pmcid = {PMC13551969}
}

RIS

TY - JOUR
AU - Oliver, Lindsay D.
AU - Blumberger, Daniel M.
AU - Deng, Zhi-De
AU - Hawco, Colin
AU - Dickie, Erin W.
AU - Gallucci, Julia
AU - Jeyachandra, Jerrold
AU - Mansour, Salim
AU - Hare, Stephanie M.
AU - Gold, James M.
AU - Foussias, George
AU - Argyelan, Miklos
AU - Daskalakis, Zafiris J.
AU - Buchanan, Robert W.
AU - Malhotra, Anil K.
AU - Voineskos, Aristotle N.
TI - Effects of personalized transcranial magnetic stimulation on social cognitive network functional connectivity in schizophrenia spectrum disorders: A double-blind, randomized, sham-controlled target engagement trial
T2 - Brain stimulation
J2 - Brain Stimul
PY - 2026
DA - 2026/07/29
VL - 19
IS - 5
SP - 103172
SN - 1935-861X
PB - Elsevier BV
DO - 10.1016/j.brs.2026.103172
UR - https://doi.org/10.1016/j.brs.2026.103172
LA - en
ER -

CSL-JSON

{
"id": "10.1016/j.brs.2026.103172",
"type": "article-journal",
"title": "Effects of personalized transcranial magnetic stimulation on social cognitive network functional connectivity in schizophrenia spectrum disorders: A double-blind, randomized, sham-controlled target engagement trial",
"container-title": "Brain stimulation",
"author": [
{
"family": "Oliver",
"given": "Lindsay D."
},
{
"family": "Blumberger",
"given": "Daniel M."
},
{
"family": "Deng",
"given": "Zhi-De"
},
{
"family": "Hawco",
"given": "Colin"
},
{
"family": "Dickie",
"given": "Erin W."
},
{
"family": "Gallucci",
"given": "Julia"
},
{
"family": "Jeyachandra",
"given": "Jerrold"
},
{
"family": "Mansour",
"given": "Salim"
},
{
"family": "Hare",
"given": "Stephanie M."
},
{
"family": "Gold",
"given": "James M."
},
{
"family": "Foussias",
"given": "George"
},
{
"family": "Argyelan",
"given": "Miklos"
},
{
"family": "Daskalakis",
"given": "Zafiris J."
},
{
"family": "Buchanan",
"given": "Robert W."
},
{
"family": "Malhotra",
"given": "Anil K."
},
{
"family": "Voineskos",
"given": "Aristotle N."
}
],
"container-title-short": "Brain Stimul",
"volume": "19",
"issue": "5",
"page": "103172",
"DOI": "10.1016/j.brs.2026.103172",
"PMID": "42526755",
"PMCID": "PMC13551969",
"ISSN": "1935-861X",
"publisher": "Elsevier BV",
"URL": "https://doi.org/10.1016/j.brs.2026.103172",
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
29
]
]
}
}

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.1222 [code]
Network-based near-scalp personalized brain stimulation targets.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: Connectome Workbench, AFNI, NumPy, other, 12 references
[2] doi:10.1002/hbm.70496 [code]
Transdiagnostic Profiles of BOLD Signal Variability in Autism and Schizophrenia Spectrum Disorders: Associations With Cognition and Functioning.
Journal: Human brain mapping
In common: tidyverse, pandas, NumPy, schizophrenia / psychosis, fMRI, 9 references
[3] doi:10.1038/s41467-026-74565-0 [code]
The functional neurobiology of dispositions towards negative emotions.
Journal: Nature communications
In common: Connectome Workbench, AFNI, psych, 6 other tools, 1 reference
[4] doi:10.1162/imag.a.1245 [code]
Towards precision EEG connectomics: Evaluating the benefits of dense sampling.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: Nipype, AFNI, psych, 5 other tools, 2 references
[5] doi:10.1162/imag.a.1347 [code]
Neural and behavioural correlates of theory of mind reasoning in five-year-old children born preterm.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: Nipype, easystats, reshape2, 4 other tools, fMRI, 2 references
[6] doi:10.1002/hbm.70512 [code]
Precision Imaging for Intraindividual Investigation of the Reward Response.
Journal: Human brain mapping
In common: AFNI, psych, easystats, 4 other tools, fMRI, 2 references
[7] doi:10.1038/s41398-026-04025-2 [code]
Brain energetic landscapes shape state dysregulation in major depressive disorder: a morphological network controllability perspective.
Journal: Translational psychiatry
In common: Nipype, Connectome Workbench, AFNI, 4 other tools, 1 reference
[8] doi:10.1038/s41467-026-71151-2 [code]
Common and distinct neural correlates of social interaction processing and theory of mind in narratives.
Journal: Nature communications
In common: Nipype, Connectome Workbench, AFNI, 2 other tools, 3 references
[9] 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: AFNI, easystats, emmeans, 4 other tools, fMRI, 1 reference
[10] doi:10.1093/braincomms/fcag279 [code]
Network flexibility facilitates treatment-induced recovery in post-stroke aphasia.
Journal: Brain communications
In common: psych, easystats, emmeans, 3 other tools, fMRI, 1 reference

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.