OSCR

Longitudinal changes in amygdala-supplementary motor area connectivity and their association with recurrent self-harm in adolescents with mood disorders.

Code ↔ Paper

3 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 3 matches · 1 of them tie a paragraph to a whole file, not to given lines: a weak match, whose lines are not tinted
  1. [1] § Method › Statistical analyses ↔ R/fastInferences4-eigen-CA.R, lines 1–119 · score 0.55 · cross validation, data4PCCAR, resampling, permutation, bootstrap, sum
  2. [2] § Method › Statistical analyses ↔ R/tepCCA.R, the whole file · a weak match · score 0.54 · TExPosition, latent variable, component, squared, sum, scores
  3. [3] § Method › Participants ↔ R/dimensionsOfDepression.R, lines 1–62 · score 0.51 · Affective Disorders, Children, head, adolescent

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 · 447 lines · 16 KB · no license · 1 match

  1. #___________________________________________________________
  2. # file fastInferences4CA.R
  3. # Created 09/27/2020
  4. # Fast inferences for CA based on multinomial distribution
  5. # includes bootstrap and permutation tests.
  6. # Current Version 09/27/2020
  7. # __________________________________________________________
  8. # Preamble ----
  9. # File for fast Inferences in CA
  10. # An example on how to compute (fast)
  11. # permuted and bootstrap values
  12. # for the CA of a data table
  13. # Functions to be ported to data4PCCAR
  14. # Current functions ----
  15. # eigCA
  16. # malinvaudQ4CA.perm
  17. # eigCA4Multinom
  18. # multinomCV4CA
  19. # print.Inference4CA
  20. #
  21. # **********************************************************
  22. # The functions starts here ----
  23. # __________________________________________________________
  24. # Preamble eigCA ----
  25. # First a nice function to get only the CA eigenvalues
  26. # from a data matrix
  27. #
  28. #___________________________________________________________
  29. # eigCA a function to compute
  30. # the CA-eigenvalues for a matrix
  31. # if eig.only is FALSE, eigCA will also give Fi and Fj
  32. # (Useful for Booststraping Fi & Fj)
  33. # help starts here
  34. # ________________
  35. # eigCA
  36. #' @title A bare-bone function to compute the
  37. #' eigen-values (and if asked row and column factor scores)
  38. #' of a matrix suitable for correspondence analysis.
  39. #' @description \code{eigCA}:
  40. #' A very fast and bare-bone function that computes
  41. #' the eigenvalues
  42. #' (and possibly the row and column factor scores)
  43. #' of the Correspondence Analysis (CA)
  44. #' of a data matrix suitable for CA
  45. #' (i.e., a matrix whose all entries are non-negative).
  46. #' \code{eigCA} is mainly used for cross-validation
  47. #' and resampling methods (e.g., permutation and
  48. #' bootstrap tests).
  49. #' @param Xdata a data matrix
  50. #' (whose all entries are non-negative) suitable
  51. #' for correspondence analysis.
  52. #' @param eig.only when \code{TRUE} (Default)
  53. #' compute only the CA- eigen-values of \code{X}.
  54. #' Otherwise compute also the row and column
  55. #' CA factor scores (i.e., \code{fi} and \code{fj}).
  56. #' @return if \code{eig.only} is \code{TRUE}
  57. #' \code{eigCA} returns the CA-eigenvalues of
  58. #' \code{X};
  59. #' if \code{eig.only} is \code{FALSE}
  60. #' \code{eigCA} returns
  61. #' a list with: \code{$eigen}: the CA-eigenvalues of
  62. #' \code{X}, \code{$fi}: the CA row factor scores,
  63. #' and \code{$fi}: the CA column factor scores.
  64. #' @details As a fast bare-bones CA based computations
  65. #' \code{eigCA} is mainly used for
  66. #' cross-validation for CA methods.
  67. #' @author Hervé Abdi
  68. #' @examples
  69. #' \dontrun{
  70. #' set.seed(87) # set the seed
  71. #' X <- matrix(round(runif(21)*20), ncol = 3) # good for CA
  72. #' eigenOfX <- eigCA(X)
  73. #' }
  74. #' @rdname eigCA
  75. #' @export
  76. eigCA <- function(Xdata, # data matrix
  77. eig.only = TRUE # we just want the eigenvalues
  78. ){# function starts here
  79. nI <- nrow(Xdata)
  80. nJ <- ncol(Xdata)
  81. Fliped = FALSE # Did we flip the matrix?
  82. # make sure that we work on the smallest side
  83. if (nI > nJ){Xdata <- t(Xdata)
  84. truc <- nI
  85. nI <- nJ
  86. nJ <- truc
  87. Fliped <- TRUE}
  88. Y <- Xdata / sum(Xdata) # stochastic matrix
  89. y.ip <- rowSums(Y)
  90. y.pj <- colSums(Y)
  91. # long way with diag to check computation
  92. # Y4eig = diag(1/sqrt(y.ip))%*% Y %*% diag(1/sqrt(y.pj))
  93. # rewrite Y4eig in a better way a la repmat!
  94. Y4eig <- matrix((1/sqrt(y.ip)),nI,nJ) * Y *
  95. matrix((1/sqrt(y.pj)),nI,nJ,byrow = TRUE)
  96. # ^ this could be done faster I think
  97. if (eig.only){
  98. S4eig <- Y4eig %*% t(Y4eig)
  99. Y.eig <- eigen(S4eig, symmetric = TRUE,
  100. only.values = TRUE)
  101. # check.svd = svd(Y4eig) to double check
  102. return(Y.eig$values[-1]) # ignore the first trivial eigenvalue
  103. } else {# go for ze svd
  104. Y.svd <- svd(Y4eig,nu = min(c(nI,nJ)))
  105. Y.eig <- Y.svd$d^2 # eigenvalue
  106. nL <- length(Y.eig)
  107. Fi <- matrix((1/sqrt(y.ip)),nI,nL) * Y.svd$u[,1:nL] *
  108. matrix(Y.svd$d,nI,nL,byrow = TRUE)
  109. Fj <- matrix((1/sqrt(y.pj)),nJ,nL) * Y.svd$v[,1:nL] *
  110. matrix(Y.svd$d,nJ,nL,byrow = TRUE)
  111. if (Fliped){ truc <- Fj
  112. Fj <- Fi
  113. Fi <- truc} # if Fliped, unFliped
  114. ShortCA = list(eigen = Y.eig[-1],
  115. Fi = Fi[,-1],
  116. Fj = Fj[,-1]) # drop first dim
  117. return(ShortCA)
  118. }
  119. } # end of function eigCA
  120. # eof eigCA ----
  121. #___________________________________________________________
  122. # Preamble malinvaudQ4CA.perm ----
  123. # malinvaudQ4CA.perm computes the Malinvaud/Saporta test for CA
  124. # with asymptotic and permutation derived p-values
  125. # Help here
  126. # ___________
  127. #
  128. #' @title Compute the Malinvaud/Saporta test for
  129. #' the omnibus and dimensions of a correspondence
  130. #' analysis.
  131. #' @description \code{malinvaudQ4CA.perm}:
  132. #' Computes the Malinvaud / Saporta test for
  133. #' the omnibus and dimensions of a correspondence
  134. #' analysis. \code{malinvaudQ4CA.perm} gives
  135. #' the asymptotic Chi2 values and their associated
  136. #' \emph{p}-value under the usual assumptions.
  137. #' If provided with permuted
  138. #' CA-eigenvalues, \code{malinvaudQ4CA.perm}
  139. #' will report the \emph{p}-value obtained from
  140. #' the permutation test.
  141. #' @param Data A matrix suitable for
  142. #' correspondence analysis
  143. #' (i.e., with all non-negative elements).
  144. #' @param LesEigPerm
  145. #' the permuted eigenvalues
  146. #' as a \code{niteration} times rank of the
  147. #' data matrix.
  148. #' if \code{LesEigPerm} is \code{NULL}
  149. #' (Default), \code{malinvaudQ4CA.perm}
  150. #' will only compute the normal
  151. #' (i.e., chi2 based) approximation.
  152. #' @param ndigit4print (Default: 4),
  153. #' number of significant
  154. #' digits to use to report the results.
  155. #' @return A (self-explanatory)
  156. #' table with the results of the test
  157. #' @details DETAILS
  158. #' @author Hervé Abdi
  159. #' @references
  160. #' The original work is described in a rather
  161. #' hard to find paper (published in the proceeding
  162. #' of a meeting) by Malinvaud:
  163. #'
  164. #' Malinvaud, E. (1987).
  165. #' Data Analysis in applied socio-economic statistics
  166. #' with special considerations of correspondence analysis.
  167. #' \emph{Marketing Science Conference Proceedings},
  168. #' HEC-ISA, Jouy-en-Josas.
  169. #'
  170. #' A synthesis of the method with additional information
  171. #' can be found
  172. #' in
  173. #'
  174. #' Saporta (2011). \emph{Probabilité
  175. #' et Analyse des Données (3rd Ed)}.
  176. #' Technip, Paris. p. 209.
  177. #' @examples
  178. #' \dontrun{
  179. #' set.seed(87) # set the seed
  180. #' X <- matrix(round(runif(21)*20), ncol = 3) # good for CA
  181. #' resMalin <- malinvaudQ4CA.perm(X)
  182. #' }
  183. #' @importFrom stats pchisq
  184. #' @rdname malinvaudQ4CA.perm
  185. #' @export
  186. malinvaudQ4CA.perm <- function(
  187. Data, # The original Data Table
  188. # Val.P = NULL, # fixed eigenvalues
  189. # e.g. resFromExposition$ExPosition.Data$eigs
  190. # Output from ExPosition
  191. LesEigPerm = NULL, # the permuted eigenvalues
  192. # as a niteration * rank of X matrix
  193. # -> to add if LesEigPerm is NULL skip
  194. # the permutation part
  195. # and compute normal approximation
  196. ndigit4print = 4 # how many digits for printing
  197. ){# Function begins here
  198. # References:
  199. # Malinvaud, E. (1987). Data Analysis in applied socio-economic statistics
  200. # with special considerations of correspondence analysis.
  201. # Marketing Science Conference Proceedings, HEC-ISA, Jouy-en-Josas.
  202. # Also cited in Saporta (2011). Probabilité et Analyse des Données (3rd Ed).
  203. # Technip, Paris. p. 209.
  204. # Val.P <- ResFromExposition$ExPosition.Data$eigs
  205. N.pp <- sum(Data) # Grand Total of the data table
  206. # if(is.null(Val.P)){Val.P = eigCA(Data)}
  207. # OLd Version
  208. # Compute eigenvalues if not given
  209. Val.P = eigCA(Data) # Now compute the eigenvalues
  210. nL <- length(Val.P) # how many eigenvalues
  211. nI <- nrow(Data)
  212. nJ <- ncol(Data)
  213. Q <- N.pp * cumsum(Val.P[nL:1])[nL:1]
  214. Q.nu <- (nI - 1:nL)*(nJ - 1:nL)
  215. # Get the values from Chi Square
  216. pQ = 1 - stats::pchisq(Q,Q.nu)
  217. # Add NA to make clear that the last
  218. # dimension is not tested
  219. Le.Q = c(Q,NA)
  220. Le.pQ = c(pQ,NA)
  221. Le.Q.nu = c(Q.nu,0)
  222. #
  223. NamesOf.Q = c('Ho: Omnibus', paste0('Dim-',seq(1:nL)))
  224. names(Le.Q) <- NamesOf.Q
  225. names(Le.pQ) <- NamesOf.Q
  226. names(Le.Q.nu) <- NamesOf.Q
  227. # Now compute the probability from permutation test
  228. # from InPosition
  229. # LesEigPerm <- Eigen.perm
  230. # ^ to make life easier
  231. if (!is.null(LesEigPerm)){# If LesEigPerm exist get p-values
  232. Q.perm <- N.pp * t(apply( LesEigPerm[,nL:1], 1, cumsum) )[,nL:1]
  233. #
  234. Logical.Q.perm = t(t(Q.perm) > (Q))
  235. pQ.perm = colMeans(Logical.Q.perm)
  236. pQ.perm[pQ.perm == 0] = 1 / nrow(Q.perm)
  237. Le.pQ.perm = c(pQ.perm,NA)
  238. # return the table
  239. Malinvaud.Q = data.frame(matrix(c(
  240. c(round(c(sum(Val.P),Val.P),digits = ndigit4print) ),
  241. round(Le.Q, digits = ndigit4print),
  242. round(Le.pQ, digits = ndigit4print),
  243. round(Le.Q.nu, digits = ndigit4print),
  244. round(Le.pQ.perm,digits = ndigit4print)),
  245. nrow = 5, byrow = TRUE))
  246. colnames(Malinvaud.Q) = NamesOf.Q
  247. rownames(Malinvaud.Q) = c('Inertia / sum lambda',
  248. 'Chi2',
  249. 'p-Chi2','df',
  250. 'p-perm')
  251. } else {
  252. Malinvaud.Q = data.frame(matrix(c(
  253. c(round(c(sum(Val.P),Val.P),digits = ndigit4print) ),
  254. round(Le.Q, digits = ndigit4print),
  255. round(Le.pQ, digits = ndigit4print),
  256. round(Le.Q.nu, digits = ndigit4print)
  257. # ,round(Le.pQ.perm,digit = ndigit4print)
  258. ),
  259. nrow = 4, byrow = TRUE))
  260. colnames(Malinvaud.Q) = NamesOf.Q
  261. rownames(Malinvaud.Q) = c('Inertia / sum lambda',
  262. 'Chi2',
  263. 'p-Chi2','df'
  264. #,'p-perm'
  265. )
  266. }
  267. # test p for chi2 to avoid 0
  268. for (k in 1:(ncol(Malinvaud.Q)-1)){
  269. if((Malinvaud.Q[3,k]) == 0){
  270. Malinvaud.Q[3, k] <- round(
  271. 1/(10^ndigit4print), ndigit4print) }
  272. }
  273. return(Malinvaud.Q)
  274. } # End of function MalinvaudQ4CA here
  275. # eof malinvaudQ4CA.perm ----
  276. #___________________________________________________________
  277. # Preamble eigCA4Multinom ----
  278. # Function eigCA4ultinom starts here
  279. # Sample from a multinomial distribution
  280. # and compute the eigenvalues
  281. # of a CA.
  282. # NB needs the function eigCA
  283. # Examples of calls
  284. # 1. Bootstrap of X:
  285. # Boot.eig <- eigCA4Multinom(sum(X),X,nrow(X),ncol(X))))
  286. # 2. Permutation of X
  287. # X4H0 <- (1/sum(X)^2)*(as.matrix(rowSums(X))%*%t(as.matrix(colSums(X))))
  288. # Perm.eig <- eigCA4Multinom(sum(X),X4H0,nrow(X),ncol(X))))
  289. #___________________________________________________________
  290. # Help for eigCA4Multinom starts here
  291. #' @title
  292. #' Sample from a multinomial distribution
  293. #' (with a given probability distribution)
  294. #' and compute the eigenvalues
  295. #' of a correpondence analysis of the simulated
  296. #' matrix..
  297. #' @description \code{eigCA4Multinom}:
  298. #' Sample from a multinomial distribution
  299. #' (with a given probability distribution)
  300. #' and compute the eigenvalues
  301. #' of the CA of an \code{nrow*ncol}
  302. #' (see below for these parameters).
  303. #' data matrix simulating correspondence analysis.
  304. #'
  305. #' @param nobs grand total of the table to be simulated.
  306. #' @param prob probability distribution
  307. #' for the cells. Should be length = \code{nrow*ncol}
  308. #' (see below for these parameters).
  309. #'
  310. #' @param nrow The number of rows of the matrix
  311. #' to be simulated.
  312. #' @param ncol The number of columns of the matrix
  313. #' to be simulated.
  314. #' @return OUTPUT_DESCRIPTION
  315. #' @details \code{eigCA4Multinom}
  316. #' is mostly used for computing eigenvalues
  317. #' of
  318. #' created data matrices
  319. #' simulating permutation and bootstrap procedures
  320. #' for correspondence analysis.
  321. #'
  322. #' @examples
  323. #' \dontrun{
  324. #' set.seed(87) # set the seed
  325. #' X <- matrix(round(runif(21)*20), ncol = 3) # good for CA
  326. #' nobs <- sum(X) # grand total
  327. #' nI <- nrow(X)
  328. #' nJ <- ncol(X)
  329. #' pI <- as.matrix(rowSums(X) / nobs) # marginal I & J
  330. #' pJ <- as.matrix(colSums(X) / nobs) # probabilites
  331. #' p4Permutation <- pI %*% t(pJ) # Independence <=> permutation
  332. #' # Simulated Permutation Probabilities
  333. #' permEigen <- eigCA4Multinom(nobs, p4Permutation, nI, nJ)
  334. #' p4Bootstrap <- X / nobs # Actual prob <=> Bootstrap
  335. #' permBoots <- eigCA4Multinom(nobs, p4Bootstrap, nI, nJ)
  336. #' }
  337. #' @importFrom stats rmultinom
  338. #' @rdname eigCA4Multinom
  339. #' @export
  340. #' @author Hervé Abdi
  341. eigCA4Multinom <- function(nobs, # grandtotal of the table
  342. prob, # probability distribution
  343. # for the cells. Should be length = nI*nJ
  344. nrow, ncol# nrow & ncol of the matrix
  345. ){ # function starts here
  346. CA.Valp <- eigCA(matrix(
  347. as.vector(stats::rmultinom(1, nobs, prob)),
  348. nrow = nrow, ncol = ncol, byrow = FALSE))
  349. return(CA.Valp)
  350. } # eof eigCA4Multinom ----
  351. #___________________________________________________________
  352. # Preamble multinomCV4CA ----
  353. # function multinomCV4CA
  354. # Multinomial distribution Based
  355. # Cross Validation for Correspondence Analysis
  356. # Assumes a plain model for CA as a contingency table
  357. #___________________________________________________________
  358. # Help multinomCV4CA starts here
  359. #' @title Compute the permuted and bootstrapped eigenvalues
  360. #' of the correspondence analysis (CA) of a matrix suitable
  361. #' for CA (i.e., a matrix with non negative elements).
  362. #'
  363. #' @description \code{multinomCV4CA}:
  364. #' a very fast routine that
  365. #' computes the permuted and bootstrapped eigenvalues
  366. #' of the correspondence analysis (CA) of a matrix suitable
  367. #' for CA (i.e., a matrix with non negative elements).
  368. #' @param Data a matrix suitable
  369. #' for CA (i.e., a matrix with non negative elements).
  370. #' @param niter number of Bootstrapped/Permutations
  371. #' (Default: \code{1000}).
  372. #' @return A list with two elements: 1)
  373. #' \code{$Permuted.ValP}: The matrix of the
  374. #' \code{niter} by \code{rank(Data)} permuted
  375. #' eigenvalues of the data matrix \code{Data}, and
  376. #' \code{$Bootstraped.ValP}: The matrix of the
  377. #' \code{niter} by \code{rank(Data)} bootstrapped
  378. #' eigenvalues of the data matrix \code{Data}.
  379. #'
  380. #' @details \code{multinomCV4CA}
  381. #' uses the multinomial distribution to
  382. #' simulate bootstrap and permutation resampling
  383. #' for a correspondence analysis.
  384. #' @examples
  385. #' \dontrun{
  386. #' set.seed(87) # set the seed
  387. #' X <- matrix(round(runif(21)*20), ncol = 3) # good for CA
  388. #' ResCV <- multinomCV4CA(X)
  389. #' }
  390. #' @rdname multinomCV4CA
  391. #' @export
  392. multinomCV4CA <- function(Data, # The contingency Table
  393. # data frame or matrix
  394. niter = 1000 # How Many Iterations
  395. ){
  396. X = as.matrix(Data)
  397. nN = sum(X)
  398. nI = nrow(X)
  399. nJ = ncol(X)
  400. # Get permutated eigenvalues from multinomial distribution
  401. # Probability distribution under H0 for permutation
  402. X4H0 <- (1/sum(X)^2)*
  403. (as.matrix(rowSums(X))%*%t(as.matrix(colSums(X))))
  404. Perm.ValP <- t(replicate(niter,eigCA4Multinom(nN,X4H0,nI,nJ)))
  405. # Get bootstraped eigenvalues from multinomial distribution
  406. Boot.ValP <- t(replicate(niter,
  407. eigCA4Multinom(nN, X, nI, nJ)))
  408. nL <- ncol(Boot.ValP)
  409. colnames(Perm.ValP) <- paste0('Dimension ',1:nL) -> colnames(Boot.ValP)
  410. return.list <- structure(
  411. list(Permuted.ValP = Perm.ValP,
  412. Bootstrapped.ValP = Boot.ValP),
  413. class = 'Inference4CA')
  414. return(return.list)
  415. } # eof multinomCV4CA ----
  416. # Print routines ----
  417. # print routines ----
  418. # #_____________________________________________________________________
  419. # print.Inference4CA ----
  420. #
  421. #' Change the print function for Inference4CA
  422. #'
  423. #' Change the print function for Inference4CA
  424. #'
  425. #' @param x a list: output of, e.g., multinomCV4CA
  426. #' @param ... everything else for the functions
  427. #' @author Hervé Abdi
  428. #' @export
  429. print.Inference4CA <- function(x, ...) {
  430. ndash = 78 # How many dashes for separation lines
  431. cat(rep("-", ndash), sep = "")
  432. cat("\n Inferences for the Eigenvalues of Correspondence Analysis \n")
  433. # cat("\n List name: ", deparse(eval(substitute(substitute(x)))),"\n")
  434. cat(rep("-", ndash), sep = "")
  435. cat("\n$Permuted.ValP : ", "The matrix of permuted eigenvalues.")
  436. cat("\n$ Bootstrapped.ValP: ", "The matrix of bootstrapped eigenvalues.")
  437. cat("\n",rep("-", ndash), sep = "")
  438. cat("\n")
  439. invisible(x)
  440. } # end of function print.Inference4CA ----
  441. # ____________________________________________________________________
  442. #___________________________________________________________
  443. #******************** End of Functions Here ***************
  444. #***********************************************************

fastInferences4-eigen-CA.R at commit 996d175, no license · at the source

Overview

Authors: Jiayi Feng1,2,3, Ran Zhang2,3, Yongxia Ren2,3, Jingshuai Zhou2,3,4, Junjie Zheng2,3, Yufei Wu2,3, Yuenan Yu2,3,5, Rongxin Zhu2,3, Fei Wang1,2,3,5
  1. School of Psychology, Henan Medical University,Xinxiang, 453003 China
  2. Early Intervention Unit, Department of Psychiatry, The Affiliated Brain Hospital of Nanjing Medical University,Nanjing, 210029 China
  3. Functional Brain Imaging Institute of Nanjing Medical University,Nanjing, China
  4. School of Public Health, Southeast University,Nanjing, China
  5. Department of Mental Health, School of Public Health, Nanjing Medical University,Nanjing, China
Journal: BMC psychiatry, volume 26, issue 1, article 617
Dates: received 25 June 2025; accepted 27 May 2026; published online 5 June 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1186/s12888-026-08253-0 · PMID 42249288 · PMCID PMC13471583 · OpenAlex W7163660127
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: fMRI (modality), human (organism), developmental (subfield)
Methods: Spectral & time-frequency, Connectivity, Statistics, Machine learning, Preprocessing, fMRI & imaging
Keywords: Mood disorder, Adolescent, Longitudinal, Neuroimaging, Resting-state, Functional connectivity, Repeated self-harm behavior
MeSH: Amygdala*, Mood Disorders*, Motor Cortex*, Self-Injurious Behavior*, Adolescent, Female, Humans, Longitudinal Studies, Magnetic Resonance Imaging, Male, Neural Pathways, Recurrence (* major topic)
Topic: Suicide and Self-Harm Studies (Clinical Psychology, Psychology), according to OpenAlex
Funding: Natural Science Foundation of Jiangsu Province (BK20231126); National Key Research and Development Program (2024YFC3308402;2022YFC2405605); National Natural Science Foundation of China (U24A20701)
Citations: not cited yet (Europe PMC); 50 references in the paper

Abstract

Background: Adolescents hospitalized with mood disorders face a heightened risk of repeated self-harm (SH) after discharge. Neuroimaging phenotype may complement traditional symptom-based approaches by revealing neural mechanisms of SH vulnerability. This study aimed to investigate longitudinal changes in functional connectivity (FC) in adolescents with repeated SH and to examine how these neural dynamics relate to SH-related symptoms.

Methods: We recruited 201 adolescent inpatients with mood disorders and SH behaviors, who were classified into repeated (RESH; n = 63) and non-repeated (NRESH; n = 138) SH groups based on a six-month follow-up. Resting-state fMRI and clinical assessments were conducted at three time points: acute (T1, admission ≤ 1 week), subacute (T2, 1–2 weeks), and discharge (T3). Voxel-wise ANCOVA identified regions showing significant group-by-time interaction effects in amygdala functional connectivity. Partial least squares correlation (PLSC) was used to examine associations between changes in FC (ΔFC) and suicidal symptoms, while logistic regression tested whether baseline and dynamic FC predicted SH recurrence at follow-up.

Results: ANCOVA revealed significant group-by-time interaction effects in amygdala-cortical connectivity, particularly with the left supplementary motor area (L-SMA) (Gaussian random field, GRF corrected, P < 0.05). PLSC showed that ΔFC between the amygdala and L-SMA was significantly associated with suicidal measures. Logistic regression indicated that both baseline (AUC = 0.75, 95% CI: 0.63–0.79) and ΔFC (AUC = 0.76, 95% CI: 0.68–0.82) between the amygdala and L-SMA, along with sex and Beck Scale for Suicide Ideation (BSS) item 3(“Reasons for Living or Dying”), were significant predictors of SH behavior.

Conclusions: Longitudinal changes in amygdala-L-SMA connectivity are associated with suicidal symptoms and predict SH recurrence, supporting the integration of neurobiological and clinical indicators for early suicide risk stratification.

Clinical trial number: Not applicable.

Supplementary Information: The online version contains supplementary material available at 10.1186/s12888-026-08253-0.

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

Repository

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

HerveAbdi/data4PCCAR

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: 996d175096270f2f2a8da53bdb6df8a2103f2ff1, 19 January 2026
Languages: R (51)
Size: 200 files, 51 scripts
Software Heritage: not archived
Found in: the text, “Statistical analyses”
Holds: README, environment (DESCRIPTION), documentation
Not found: license file, CITATION.cff, tests, continuous integration
Tools: ggplot2 (3 files), tidyverse (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
52 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;
  • 51 scripts, each with its path and the digest of its content;
  • 3 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Data availability

The data that support the findings of this study are available from the corresponding author upon reasonable 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, 27 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 9 authors, 7 keywords, 12 MeSH terms, 3 funders, 49 references.

Cite

This paper

Feng, J., Zhang, R., Ren, Y., Zhou, J., Zheng, J., Wu, Y., Yu, Y., Zhu, R., & Wang, F. (2026). Longitudinal changes in amygdala-supplementary motor area connectivity and their association with recurrent self-harm in adolescents with mood disorders. BMC psychiatry, 26(1), 617. https://doi.org/10.1186/s12888-026-08253-0

BibTeX

@article{feng2026longitudinal,
author = {Feng, Jiayi and Zhang, Ran and Ren, Yongxia and Zhou, Jingshuai and Zheng, Junjie and Wu, Yufei and Yu, Yuenan and Zhu, Rongxin and Wang, Fei},
title = {{Longitudinal changes in amygdala-supplementary motor area connectivity and their association with recurrent self-harm in adolescents with mood disorders}},
journal = {BMC psychiatry},
year = {2026},
month = jun,
volume = {26},
number = {1},
pages = {617},
publisher = {BMC},
issn = {1471-244X},
doi = {10.1186/s12888-026-08253-0},
url = {https://doi.org/10.1186/s12888-026-08253-0},
pmid = {42249288},
pmcid = {PMC13471583}
}

RIS

TY - JOUR
AU - Feng, Jiayi
AU - Zhang, Ran
AU - Ren, Yongxia
AU - Zhou, Jingshuai
AU - Zheng, Junjie
AU - Wu, Yufei
AU - Yu, Yuenan
AU - Zhu, Rongxin
AU - Wang, Fei
TI - Longitudinal changes in amygdala-supplementary motor area connectivity and their association with recurrent self-harm in adolescents with mood disorders
T2 - BMC psychiatry
J2 - BMC Psychiatry
PY - 2026
DA - 2026/06/05
VL - 26
IS - 1
SP - 617
SN - 1471-244X
PB - BMC
DO - 10.1186/s12888-026-08253-0
UR - https://doi.org/10.1186/s12888-026-08253-0
LA - en
ER -

CSL-JSON

{
"id": "10.1186/s12888-026-08253-0",
"type": "article-journal",
"title": "Longitudinal changes in amygdala-supplementary motor area connectivity and their association with recurrent self-harm in adolescents with mood disorders",
"container-title": "BMC psychiatry",
"author": [
{
"family": "Feng",
"given": "Jiayi"
},
{
"family": "Zhang",
"given": "Ran"
},
{
"family": "Ren",
"given": "Yongxia"
},
{
"family": "Zhou",
"given": "Jingshuai"
},
{
"family": "Zheng",
"given": "Junjie"
},
{
"family": "Wu",
"given": "Yufei"
},
{
"family": "Yu",
"given": "Yuenan"
},
{
"family": "Zhu",
"given": "Rongxin"
},
{
"family": "Wang",
"given": "Fei"
}
],
"container-title-short": "BMC Psychiatry",
"volume": "26",
"issue": "1",
"page": "617",
"DOI": "10.1186/s12888-026-08253-0",
"PMID": "42249288",
"PMCID": "PMC13471583",
"ISSN": "1471-244X",
"publisher": "BMC",
"URL": "https://doi.org/10.1186/s12888-026-08253-0",
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
5
]
]
}
}

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.3389/fpsyt.2026.1803658
Comparative meta-analysis of task-related functional brain abnormalities in nonsuicidal self-injury and suicide attempt.
Journal: Frontiers in psychiatry
In common: fMRI, 6 references
[2] doi:10.31083/ap48336
Brain Functional Network Alterations in Adolescents With Major Depressive Disorder and Suicidal Attempt: A Resting-State fMRI Study.
Journal: Alpha psychiatry
In common: developmental, fMRI, 3 references
[3] doi:10.1093/psyrad/kkag009 [code]
Brain entropy as a biomarker of major depression in adolescents and young adults: insights from multimodal resting-state functional magentic resonance imaging.
Journal: Psychoradiology
In common: developmental, fMRI, 3 references
[4] doi:10.1371/journal.pbio.3003666 [code]
Emotion regulation success involves systematic gradient-based reconfigurations of large-scale activation patterns in the human brain.
Journal: PLoS biology
In common: ggplot2, tidyverse, fMRI, 1 reference
[5] doi:10.1186/s12916-026-04957-y [code]
Thyroid-stimulating hormone receptor mediates peripheral-central neuroimmune crosstalk in autoimmune thyroid diseases.
Journal: BMC medicine
In common: ggplot2, tidyverse, fMRI, 1 reference
[6] doi:10.1038/s41598-026-46182-w [code]
How the influence of cingulate-lingual interactions on event segmentation changes from early to late adolescence.
Journal: Scientific reports
In common: ggplot2, tidyverse, developmental, 1 reference
[7] doi:10.1162/imag.a.1308 [code]
Functional connectome signature of general psychopathology in middle-aged and older adults: Evidence from multi-cohort, multi-ethnic analyses.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: ggplot2, tidyverse, fMRI, 1 reference
[8] doi:10.1038/s41398-026-03965-z [code]
Disentangling individual heterogeneity reveals robust network and molecular signatures of major depressive disorder with suicidal ideation.
Journal: Translational psychiatry
In common: 2 references
[9] doi:10.1038/s41398-026-04135-x
Sad emotion processing-related theta oscillation patterns link suicide attempt to childhood trauma in depression: evidence from MEG.
Journal: Translational psychiatry
In common: 2 references
[10] doi:10.1192/bjp.2026.10664 [code]
Early effects of a novel 5-HT&lt;sub&gt;4&lt;/sub&gt;R agonist (PF-04995274) and the SSRI citalopram on emotional cognition in unmedicated depression: RESTAND study.
Journal: The British journal of psychiatry : the journal of mental science
In common: ggplot2, tidyverse, 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.