Predicting stress response trajectories: Differential contributions of limbic and prefrontal regions to cortisol and affective responses.
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
- # ==============================================================================
- # Analysis code for publication:
- # "Predicting stress response trajectories: Differential contributions of limbic
- # and prefrontal regions to cortisol and affective responses"
- #
- # Author: Renée Lipka
- # R version: 4.3.2 (2023-10-31)
- # ==============================================================================
- # ---------------------------------------------
- # Load libraries
- # ---------------------------------------------
- library(haven)
- library(dplyr)
- library(tidyr)
- library(lcmm)
- # ---------------------------------------------
- # Set working directory and load data
- # ---------------------------------------------
- setwd("/Users/reneelipka/Documents/PhD/06 GIH projects/Trajectory/01 Data")
- data <- read_spss(
- "ScanStress_trajectories_structure_betas_relevant_HR_NA_PA_ASI_BDI_TICS_CTQ_LEC.sav"
- )
- # ==============================================================================
- # 1. Preparing data
- # ==============================================================================
- # Convert to long format
- data_long <- data %>%
- gather(time, cort, Cort1_minus15:Cort1_plus110, factor_key = TRUE) %>%
- mutate(
- sex = factor(Geschlecht),
- age = Alter,
- time_n = case_when(
- time == "Cort1_minus15" ~ -15,
- time == "Cort1_minus1" ~ -1,
- time == "Cort1_plus15" ~ 15,
- time == "Cort1_plus30" ~ 30,
- time == "Cort1_plus50" ~ 50,
- time == "Cort1_plus65" ~ 65,
- time == "Cort1_plus80" ~ 80,
- time == "Cort1_plus95" ~ 95,
- time == "Cort1_plus110" ~ 110
- )
- ) %>%
- select(-Geschlecht, -Alter)
- # Standardize predictors
- predictors <- c(
- "left_amygdala_vol", "right_amygdala_vol",
- "left_hippocampus_vol", "right_hippocampus_vol",
- "left_mOFC_thick", "right_mOFC_thick",
- "left_rACC_thick", "right_rACC_thick"
- )
- data_long[predictors] <- lapply(data_long[predictors], scale)
- # Create averaged left-right structure parameters
- structure_params <- list(
- amygdala = c("vol", "var2", "delta_var2"),
- hippocampus= c("vol", "var2", "delta_var2"),
- mOFC = c("thick", "var2", "delta_var2"),
- rACC = c("thick", "var2", "delta_var2")
- )
- for (structure in names(structure_params)) {
- for (param in structure_params[[structure]]) {
- left_col <- paste0("left_", structure, "_", param)
- right_col <- paste0("right_", structure, "_", param)
- avg_col <- paste0(structure, "_", param, "_avg")
- data_long[[avg_col]] <- rowMeans(
- data_long[, c(left_col, right_col)],
- na.rm = TRUE
- )
- }
- }
- # ---------------------------------------------
- # 2. Determining link function
- # ---------------------------------------------
- # Common formulas
- formula_fixed <- cort ~ time_n + sex + age
- formula_random <- ~ time_n
- subject <- "VPNr"
- link_functions <- c("linear", "beta", "splines")
- for (link in link_functions) {
- model_name <- paste0("m1_", link)
- assign(
- model_name,
- lcmm(
- formula_fixed,
- random = formula_random,
- subject = subject,
- ng = 1,
- data = data_long,
- maxiter = 1000,
- link = link
- )
- )
- message("Completed model: ", model_name)
- }
- # Summary
- summarytable(
- m1_linear,
- m1_beta,
- m1_splines,
- which = c("loglik", "conv", "npm", "AIC")
- )
- # Plot link functions
- col <- rainbow(3)
- plot(m1_linear, which="linkfunction", bty='l', ylab="Cortisol",
- col=col[1], lwd=2, xlab="Latent process")
- plot(m1_beta, which="linkfunction", add=TRUE, col=col[2], lwd=2)
- plot(m1_splines, which="linkfunction", add=TRUE, col=col[3], lwd=2)
- legend(x="topleft", legend=c("linear", "beta", "splines"), lty=1,
- col=col, bty="n", lwd=2)
- # ---------------------------------------------
- # 3. Cortisol baseline models
- # ---------------------------------------------
- # Baseline model (1-class)
- m1_baseline <- lcmm(
- formula_fixed,
- random = formula_random,
- subject = subject,
- ng = 1,
- data = data_long,
- maxiter = 1000,
- link = 'splines'
- )
- # 2- to 4-class baseline models using gridsearch
- for (ng in 2:4) {
- model_name <- paste0("m", ng, "_baseline")
- assign(
- model_name,
- gridsearch(
- lcmm(
- formula_fixed,
- random = formula_random,
- mixture = formula_random,
- subject = subject,
- ng = ng,
- data = data_long,
- link = 'splines'
- ),
- maxiter = 30,
- rep = 100,
- minit = m1_baseline
- )
- )
- message("Completed model: ", model_name)
- }
- # Optional: Summary table for baseline models
- # summary_table <- summarytable(m1_baseline, m2_baseline, m3_baseline, m4_baseline,
- # which = c("G", "loglik", "conv", "npm", "AIC", "BIC", "SABIC", "entropy", "%class"))
- # ---------------------------------------------
- # 4. Cortisol brain models
- # ---------------------------------------------
- # Model configurations for different brain regions
- model_configurations <- list(
- list(model_extension = "_amy", formula_classmb = ~ amygdala_var2_avg + amygdala_delta_var2_avg + amygdala_vol_avg),
- list(model_extension = "_hippo", formula_classmb = ~ hippocampus_var2_avg + hippocampus_delta_var2_avg + hippocampus_vol_avg),
- list(model_extension = "_mOFC", formula_classmb = ~ mOFC_var2_avg + mOFC_delta_var2_avg + mOFC_thick_avg),
- list(model_extension = "_rACC", formula_classmb = ~ rACC_var2_avg + rACC_delta_var2_avg + rACC_thick_avg)
- )
- # Common model settings
- link <- 'splines'
- maxiter <- 30
- rep <- 100
- minit <- m1_baseline
- formula_mixture <- ~ time_n
- # Run brain models
- for (config in model_configurations) {
- model_extension <- config$model_extension
- formula_classmb <- config$formula_classmb
- for (ng in 2:4) {
- model_name <- paste0("m", ng, model_extension)
- assign(
- model_name,
- gridsearch(
- lcmm(
- formula_fixed,
- random = formula_random,
- mixture = formula_mixture,
- classmb = formula_classmb,
- subject = subject,
- ng = ng,
- data = data_long,
- link = link
- ),
- maxiter = maxiter,
- rep = rep,
- minit = minit
- )
- )
- message("Completed model: ", model_name)
- }
- }
- # Optional: Summary table for baseline models
- # summary_table <- summarytable(m1_baseline, m2_baseline, m3_baseline, m4_baseline,
- # m2_amy, m3_amy, m4_amy,
- # m2_hippo, m3_hippo, m4_hippo,
- # m2_mOFC, m3_mOFC, m4_mOFC,
- # m2_rACC, m3_rACC, m4_rACC,
- # which = c("G", "loglik", "conv", "npm", "AIC", "BIC", "SABIC", "entropy", "%class"))
Cort_traj_model_estimation.R, no license · at the source
Overview
- 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
- 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
- Berlin School of Mind and Brain, Humboldt Universität zu Berlin,Berlin, Germany
- German Center for Mental Health (DZPG), Partner Site Berlin - Potsdam,Berlin, Germany
- Institute of Psychology, University of Regensburg,Regensburg, Germany
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
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
- 27 September 2026: the link answers (HTTP 200)
2 files
- Cort_traj_model_estimati
on.R , R, 225 lines - NA_traj_model_estimation
.R , R, 230 lines
Code availability
The R code of lcmm analyses is provided here: https://
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/
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://
BibTeX
@article{lipka2026predic
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/
url = {https://
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/
VL - 16
IS - 1
SP - 310
SN - 2158-3188
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"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":
"volume": "16",
"issue": "1",
"page": "310",
"DOI": "10.1038/
"PMID": "42285949",
"PMCID": "PMC13263346",
"ISSN": "2158-3188",
"publisher": "Nature Publishing Group",
"URL": "https://
"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 medicineIn 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 psychiatryIn 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 advancesIn 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 - healthIn 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 NeuropsychopharmacologyIn 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 mappingIn 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 reportsIn 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 communicationsIn 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.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 2 scripts, and 0 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:dcfe16aaa6c00f73…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[.
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.
