OSCR

Predicting stress response trajectories: Differential contributions of limbic and prefrontal regions to cortisol and affective responses.

Code ↔ Paper

The paper beside its authors' code: matches between them have not been computed for this paper yet.

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 · 225 lines · 6.6 KB · no license

  1. # ==============================================================================
  2. # Analysis code for publication:
  3. # "Predicting stress response trajectories: Differential contributions of limbic
  4. # and prefrontal regions to cortisol and affective responses"
  5. #
  6. # Author: Renée Lipka
  7. # R version: 4.3.2 (2023-10-31)
  8. # ==============================================================================
  9. # ---------------------------------------------
  10. # Load libraries
  11. # ---------------------------------------------
  12. library(haven)
  13. library(dplyr)
  14. library(tidyr)
  15. library(lcmm)
  16. # ---------------------------------------------
  17. # Set working directory and load data
  18. # ---------------------------------------------
  19. setwd("/Users/reneelipka/Documents/PhD/06 GIH projects/Trajectory/01 Data")
  20. data <- read_spss(
  21. "ScanStress_trajectories_structure_betas_relevant_HR_NA_PA_ASI_BDI_TICS_CTQ_LEC.sav"
  22. )
  23. # ==============================================================================
  24. # 1. Preparing data
  25. # ==============================================================================
  26. # Convert to long format
  27. data_long <- data %>%
  28. gather(time, cort, Cort1_minus15:Cort1_plus110, factor_key = TRUE) %>%
  29. mutate(
  30. sex = factor(Geschlecht),
  31. age = Alter,
  32. time_n = case_when(
  33. time == "Cort1_minus15" ~ -15,
  34. time == "Cort1_minus1" ~ -1,
  35. time == "Cort1_plus15" ~ 15,
  36. time == "Cort1_plus30" ~ 30,
  37. time == "Cort1_plus50" ~ 50,
  38. time == "Cort1_plus65" ~ 65,
  39. time == "Cort1_plus80" ~ 80,
  40. time == "Cort1_plus95" ~ 95,
  41. time == "Cort1_plus110" ~ 110
  42. )
  43. ) %>%
  44. select(-Geschlecht, -Alter)
  45. # Standardize predictors
  46. predictors <- c(
  47. "left_amygdala_vol", "right_amygdala_vol",
  48. "left_hippocampus_vol", "right_hippocampus_vol",
  49. "left_mOFC_thick", "right_mOFC_thick",
  50. "left_rACC_thick", "right_rACC_thick"
  51. )
  52. data_long[predictors] <- lapply(data_long[predictors], scale)
  53. # Create averaged left-right structure parameters
  54. structure_params <- list(
  55. amygdala = c("vol", "var2", "delta_var2"),
  56. hippocampus= c("vol", "var2", "delta_var2"),
  57. mOFC = c("thick", "var2", "delta_var2"),
  58. rACC = c("thick", "var2", "delta_var2")
  59. )
  60. for (structure in names(structure_params)) {
  61. for (param in structure_params[[structure]]) {
  62. left_col <- paste0("left_", structure, "_", param)
  63. right_col <- paste0("right_", structure, "_", param)
  64. avg_col <- paste0(structure, "_", param, "_avg")
  65. data_long[[avg_col]] <- rowMeans(
  66. data_long[, c(left_col, right_col)],
  67. na.rm = TRUE
  68. )
  69. }
  70. }
  71. # ---------------------------------------------
  72. # 2. Determining link function
  73. # ---------------------------------------------
  74. # Common formulas
  75. formula_fixed <- cort ~ time_n + sex + age
  76. formula_random <- ~ time_n
  77. subject <- "VPNr"
  78. link_functions <- c("linear", "beta", "splines")
  79. for (link in link_functions) {
  80. model_name <- paste0("m1_", link)
  81. assign(
  82. model_name,
  83. lcmm(
  84. formula_fixed,
  85. random = formula_random,
  86. subject = subject,
  87. ng = 1,
  88. data = data_long,
  89. maxiter = 1000,
  90. link = link
  91. )
  92. )
  93. message("Completed model: ", model_name)
  94. }
  95. # Summary
  96. summarytable(
  97. m1_linear,
  98. m1_beta,
  99. m1_splines,
  100. which = c("loglik", "conv", "npm", "AIC")
  101. )
  102. # Plot link functions
  103. col <- rainbow(3)
  104. plot(m1_linear, which="linkfunction", bty='l', ylab="Cortisol",
  105. col=col[1], lwd=2, xlab="Latent process")
  106. plot(m1_beta, which="linkfunction", add=TRUE, col=col[2], lwd=2)
  107. plot(m1_splines, which="linkfunction", add=TRUE, col=col[3], lwd=2)
  108. legend(x="topleft", legend=c("linear", "beta", "splines"), lty=1,
  109. col=col, bty="n", lwd=2)
  110. # ---------------------------------------------
  111. # 3. Cortisol baseline models
  112. # ---------------------------------------------
  113. # Baseline model (1-class)
  114. m1_baseline <- lcmm(
  115. formula_fixed,
  116. random = formula_random,
  117. subject = subject,
  118. ng = 1,
  119. data = data_long,
  120. maxiter = 1000,
  121. link = 'splines'
  122. )
  123. # 2- to 4-class baseline models using gridsearch
  124. for (ng in 2:4) {
  125. model_name <- paste0("m", ng, "_baseline")
  126. assign(
  127. model_name,
  128. gridsearch(
  129. lcmm(
  130. formula_fixed,
  131. random = formula_random,
  132. mixture = formula_random,
  133. subject = subject,
  134. ng = ng,
  135. data = data_long,
  136. link = 'splines'
  137. ),
  138. maxiter = 30,
  139. rep = 100,
  140. minit = m1_baseline
  141. )
  142. )
  143. message("Completed model: ", model_name)
  144. }
  145. # Optional: Summary table for baseline models
  146. # summary_table <- summarytable(m1_baseline, m2_baseline, m3_baseline, m4_baseline,
  147. # which = c("G", "loglik", "conv", "npm", "AIC", "BIC", "SABIC", "entropy", "%class"))
  148. # ---------------------------------------------
  149. # 4. Cortisol brain models
  150. # ---------------------------------------------
  151. # Model configurations for different brain regions
  152. model_configurations <- list(
  153. list(model_extension = "_amy", formula_classmb = ~ amygdala_var2_avg + amygdala_delta_var2_avg + amygdala_vol_avg),
  154. list(model_extension = "_hippo", formula_classmb = ~ hippocampus_var2_avg + hippocampus_delta_var2_avg + hippocampus_vol_avg),
  155. list(model_extension = "_mOFC", formula_classmb = ~ mOFC_var2_avg + mOFC_delta_var2_avg + mOFC_thick_avg),
  156. list(model_extension = "_rACC", formula_classmb = ~ rACC_var2_avg + rACC_delta_var2_avg + rACC_thick_avg)
  157. )
  158. # Common model settings
  159. link <- 'splines'
  160. maxiter <- 30
  161. rep <- 100
  162. minit <- m1_baseline
  163. formula_mixture <- ~ time_n
  164. # Run brain models
  165. for (config in model_configurations) {
  166. model_extension <- config$model_extension
  167. formula_classmb <- config$formula_classmb
  168. for (ng in 2:4) {
  169. model_name <- paste0("m", ng, model_extension)
  170. assign(
  171. model_name,
  172. gridsearch(
  173. lcmm(
  174. formula_fixed,
  175. random = formula_random,
  176. mixture = formula_mixture,
  177. classmb = formula_classmb,
  178. subject = subject,
  179. ng = ng,
  180. data = data_long,
  181. link = link
  182. ),
  183. maxiter = maxiter,
  184. rep = rep,
  185. minit = minit
  186. )
  187. )
  188. message("Completed model: ", model_name)
  189. }
  190. }
  191. # Optional: Summary table for baseline models
  192. # summary_table <- summarytable(m1_baseline, m2_baseline, m3_baseline, m4_baseline,
  193. # m2_amy, m3_amy, m4_amy,
  194. # m2_hippo, m3_hippo, m4_hippo,
  195. # m2_mOFC, m3_mOFC, m4_mOFC,
  196. # m2_rACC, m3_rACC, m4_rACC,
  197. # which = c("G", "loglik", "conv", "npm", "AIC", "BIC", "SABIC", "entropy", "%class"))

Cort_traj_model_estimation.R, no license · at the source

Overview

  1. Department of Psychiatry and Neurosciences CCM, Charité – Universitätsmedizin Berlin, Corporate Member of Freie Universität Berlin and Humboldt-Universität zu Berlin,Berlin, Germany
  2. Department of Psychiatry and Neuroscience CBF, Charité – Universitätsmedizin Berlin, Corporate Member of Freie Universität Berlin and Humboldt-Universität zu Berlin,Berlin, Germany
  3. Berlin School of Mind and Brain, Humboldt Universität zu Berlin,Berlin, Germany
  4. German Center for Mental Health (DZPG), Partner Site Berlin - Potsdam,Berlin, Germany
  5. Institute of Psychology, University of Regensburg,Regensburg, Germany
Journal: Translational psychiatry, volume 16, issue 1, article 310
Dates: received 15 November 2025; accepted 22 May 2026; published online 12 June 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1038/s41398-026-04140-0 · PMID 42285949 · PMCID PMC13263346 · OpenAlex W4416332069
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: human (organism), systems (subfield)
Methods: Connectivity, Smoothing, state filtering, decompositions, Machine learning, Preprocessing, Statistics, fMRI & imaging
Keywords: Molecular neuroscience, Predictive markers, Human behaviour
MeSH: Affect*, Amygdala*, Hippocampus*, Hydrocortisone*, Prefrontal Cortex*, Stress, Psychological*, Adult, Female, Humans, Limbic System, Magnetic Resonance Imaging, Male, Saliva, Young Adult (* major topic)
Topic: Stress Responses and Cortisol (Behavioral Neuroscience, Neuroscience), according to OpenAlex
Funding: Deutsche Forschungsgemeinschaft (DFG) (513531314); School of Mind and Brain (Stipend)
Citations: not cited yet (Europe PMC); 90 references in the paper

Abstract

Why do individuals respond differently to stress? Since rodent studies indicated that stress regulation relies on limbic and medial prefrontal cortex (mPFC) outputs, we aimed to investigate whether data from these regions could also predict cortisol and affect trajectories following psychosocial stress in humans. In this pre-registered study, 281 healthy adults (145 female) were exposed to ScanSTRESS. Repeated assessments of salivary cortisol and negative affect were used to identify response trajectories (i.e. groups of participants) using latent class mixture modelling (LCMM). LCMMs without brain predictors were compared to LCMMs including structural (volume, thickness) and functional (activation, exposure-time effect) predictors from the amygdala, hippocampus, or mPFC regions, using common fit indices including the Akaike Information Criterion. Results showed that cortisol LCMMs without brain predictors exhibited a single mean trajectory, indicative of homogeneous cortisol responses across the sample. Adding brain predictors resulted in three to four response trajectories, depending on region and outcome. Within identified models, cortisol ‘hyper-response’ trajectories were predicted by larger amygdala and hippocampus volumes. Cortisol ‘non-responses’ were predicted by greater amygdala activation and volume. ‘Elevated baseline’ cortisol was predicted by higher hippocampal activation. mPFC markers did not predict cortisol trajectories, however, medial orbitofrontal cortex parameters identified negative affect response profiles mirroring measures of long-term stress exposure and affect. Together, our findings suggest dissociated roles of limbic and mPFC regions in stress regulation: While limbic structures predicted cortisol responses, the mPFC shaped affective experience.

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

Repository

Its files are read in the Code ↔ Paper reader above.

OSF gk6w9

License: none: the authors keep all their rights
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Languages: R (2)
Size: 6 files, 2 scripts
Software Heritage: not checked
Found in: “Code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: tidyverse (2 files)
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
  • 27 September 2026: the link answers (HTTP 200)
2 files
At the source: osf.io/gk6w9/

Code availability

The R code of lcmm analyses is provided here: https://osf.io/gk6w9/.

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

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;
  • 2 scripts, each with its path and the digest of its content;
  • no match between paragraphs and code yet;
  • neither the text of the paper nor the code itself.

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

Data

Datasets cited

Data availability

The datasets generated and/or analyzed during the current study are available from the corresponding author on reasonable request. A repository of studies that have already used and published the data is available here: https://osf.io/echja/.

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, 12 authors, 3 keywords, 14 MeSH terms, 2 funders, 85 references.

Cite

This paper

Lipka, R., Kreuzpointner, L., Bärtl, C., Giglberger, M., Konzok, J., Peter, H. L., Speicher, N., Waller, L., Kudielka, B. M., Wüst, S., Walter, H., & Henze, G.-I. (2026). Predicting stress response trajectories: Differential contributions of limbic and prefrontal regions to cortisol and affective responses. Translational psychiatry, 16(1), 310. https://doi.org/10.1038/s41398-026-04140-0

BibTeX

@article{lipka2026predicting,
author = {Lipka, Renée and Kreuzpointner, Ludwig and Bärtl, Christoph and Giglberger, Marina and Konzok, Julian and Peter, Hannah L. and Speicher, Nina and Waller, Lea and Kudielka, Brigitte M. and Wüst, Stefan and Walter, Henrik and Henze, Gina-Isabelle},
title = {{Predicting stress response trajectories: Differential contributions of limbic and prefrontal regions to cortisol and affective responses}},
journal = {Translational psychiatry},
year = {2026},
month = jun,
volume = {16},
number = {1},
pages = {310},
publisher = {Nature Publishing Group},
issn = {2158-3188},
doi = {10.1038/s41398-026-04140-0},
url = {https://doi.org/10.1038/s41398-026-04140-0},
pmid = {42285949},
pmcid = {PMC13263346}
}

RIS

TY - JOUR
AU - Lipka, Renée
AU - Kreuzpointner, Ludwig
AU - Bärtl, Christoph
AU - Giglberger, Marina
AU - Konzok, Julian
AU - Peter, Hannah L.
AU - Speicher, Nina
AU - Waller, Lea
AU - Kudielka, Brigitte M.
AU - Wüst, Stefan
AU - Walter, Henrik
AU - Henze, Gina-Isabelle
TI - Predicting stress response trajectories: Differential contributions of limbic and prefrontal regions to cortisol and affective responses
T2 - Translational psychiatry
J2 - Transl Psychiatry
PY - 2026
DA - 2026/06/12
VL - 16
IS - 1
SP - 310
SN - 2158-3188
PB - Nature Publishing Group
DO - 10.1038/s41398-026-04140-0
UR - https://doi.org/10.1038/s41398-026-04140-0
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41398-026-04140-0",
"type": "article-journal",
"title": "Predicting stress response trajectories: Differential contributions of limbic and prefrontal regions to cortisol and affective responses",
"container-title": "Translational psychiatry",
"author": [
{
"family": "Lipka",
"given": "Renée"
},
{
"family": "Kreuzpointner",
"given": "Ludwig"
},
{
"family": "Bärtl",
"given": "Christoph"
},
{
"family": "Giglberger",
"given": "Marina"
},
{
"family": "Konzok",
"given": "Julian"
},
{
"family": "Peter",
"given": "Hannah L."
},
{
"family": "Speicher",
"given": "Nina"
},
{
"family": "Waller",
"given": "Lea"
},
{
"family": "Kudielka",
"given": "Brigitte M."
},
{
"family": "Wüst",
"given": "Stefan"
},
{
"family": "Walter",
"given": "Henrik"
},
{
"family": "Henze",
"given": "Gina-Isabelle"
}
],
"container-title-short": "Transl Psychiatry",
"volume": "16",
"issue": "1",
"page": "310",
"DOI": "10.1038/s41398-026-04140-0",
"PMID": "42285949",
"PMCID": "PMC13263346",
"ISSN": "2158-3188",
"publisher": "Nature Publishing Group",
"URL": "https://doi.org/10.1038/s41398-026-04140-0",
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
12
]
]
}
}

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.1017/s0033291726104103 [code]
Linking brain structure to stress reactivity: cingulate surface area predicts acute cortisol responses.
Journal: Psychological medicine
In common: OSF echja, 20 references, 9 authors
[2] doi:10.1038/s41398-026-04010-9 [code]
Bullying victimization and brain development: a longitudinal structural magnetic resonance imaging study from adolescence to early adulthood.
Journal: Translational psychiatry
In common: tidyverse, 2 references, author Henrik Walter
[3] doi:10.1126/sciadv.aed0772 [code]
Deep learning reveals a neurocomputational mechanism predicting depression risk in adolescents.
Journal: Science advances
In common: tidyverse, author Henrik Walter
[4] doi:10.1016/j.bbih.2026.101299 [code]
Multimodal approach to identify neuropsychophysiological subgroups in myalgic encephalomyelitis/chronic fatigue syndrome and their relevance for rehabilitation: protocol for a mechanistic cross-sectional and longitudinal study.
Journal: Brain, behavior, & immunity - health
In common: 4 references
[5] doi:10.1038/s41386-026-02401-6 [code]
Model-based analysis of stop-signal data reveals robust neural and clinical correlates of evidence accumulation but not inhibition.
Journal: Neuropsychopharmacology : official publication of the American College of Neuropsychopharmacology
In common: tidyverse, author Henrik Walter
[6] doi:10.1162/imag.a.1235 [code]
Intracranial volume: To adjust or not to adjust? It is not a matter of if, but how.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: tidyverse, 3 references
[7] doi:10.1002/hbm.70515 [code]
From Low Field to High Value: Robust Cortical Mapping From Low-Field MRI.
Journal: Human brain mapping
In common: 4 references
[8] doi:10.1162/nol.a.265 [code]
Structural Brain Correlates of Poor Reading Comprehension.
Journal: Neurobiology of language (Cambridge, Mass.)
In common: tidyverse, 3 references
[9] doi:10.1038/s41598-026-49678-7
Clinical validation pipeline of a deep learning model for segmenting and quantifying intracranial and ventricular volumes on computed tomography.
Journal: Scientific reports
In common: 3 references
[10] doi:10.1038/s41467-026-71414-y [code]
Bed nucleus of the stria terminalis connectivity during food cue and taste processing under stress.
Journal: Nature communications
In common: systems, 2 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

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

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