Investigation of stress hormones across multiday seizure cycles.
3 blocks of code here have a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.
The 3 matches
- [1] § Materials and methods › Statistical analysis › Multiday seizure cycle and cortisol ↔ slopes_vs_features.R, lines 38 to 98 · score 0.72 · circadian seizure chronotype, circadian cycle strength, multiday cycle strength, slopes, fitted, morning · block
oscr:b:12AKQZESF52V0-4· Report a mismatch - [2] § Materials and methods › Statistical analysis › Linear mixed models ↔ cortisol_slopes.R, lines 47 to 91 · score 0.57 · Kenward Roger, lme4, ANOVA, model, Cortisol · block
oscr:b:1EGT63GP8211D-1· Report a mismatch - [3] § Materials and methods › Statistical analysis › Linear mixed models ↔ lmm_models.R, lines 84 to 154 · score 0.55 · Nelder Mead, allocated risk, PSS score, optimizers, predict, pre sample · block
oscr:b:9F0WDZV8T5WD1-B· Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
R · 98 lines · 3.8 KB · no license · 1 match
- library("tidyverse")
- library("lme4")
- library("lmerTest")
- library("broom.mixed")
- library("broom")
- library("patchwork")
- # Regresses per-patient cortisol-cycle slopes (from cortisol_slopes.R) against
- # patient-level features: multiday cycle strength, circadian cycle properties,
- # and within-patient hormone variability.
- #
- # Requires:
- # - tables/patient_slopes.csv (output of cortisol_slopes.R)
- # - patient_features.csv (one row per patient with cycle/circadian features)
- #
- # All paths are relative to the repository root directory.
- # Set your working directory to the repo root before running, e.g.:
- # setwd("/path/to/cortisol-study-brain-communications")
- patient_features <- read.csv("patient_features.csv")
- patient_slopes <- read_csv("tables/patient_slopes.csv")
- data <- patient_slopes %>%
- left_join(patient_features, by = "patient") %>%
- filter(!patient %in% c("P3", "P5", "P17"))
- # Define a function to fit model and extract tidy results
- fit_model <- function(data_subset, cortisol_type) {
- model <- lm(slope ~ cycle_strength_r + circadian_tod + circadian_rval +
- Var.of.cortisol_z + Var.of.dheas_,
- data = data_subset)
- tidy(model, conf.int = TRUE) %>%
- mutate(Cortisol_Type = cortisol_type)
- }
- # Fit models for Evening and Morning cortisol types
- evening_model <- fit_model(subset(data, cortisol_type == "Evening"), "Evening")
- morning_model <- fit_model(subset(data, cortisol_type == "Morning"), "Morning")
- # Print coefficients with confidence intervals and p-values
- evening_results <- evening_model %>% select(term, estimate, conf.low, conf.high, p.value)
- morning_results <- morning_model %>% select(term, estimate, conf.low, conf.high, p.value)
- print("Evening Model Coefficients:")
- print(evening_results)
- print("Morning Model Coefficients:")
- print(morning_results)
- # Save to CSV
- dir.create("tables", showWarnings = FALSE)
- write_csv(evening_results, "tables/evening_model_coefficients.csv")
- write_csv(morning_results, "tables/morning_model_coefficients.csv")
- # Build plotmath-safe labels from the raw term
- all_coefficients <- bind_rows(evening_model, morning_model) %>%
- filter(term != "(Intercept)") %>%
- mutate(term_raw = term) %>%
- mutate(term = case_when(
- term == "cycle_strength_r" ~ "Multiday Cycle Strength",
- term == "circadian_rval" ~ "Circadian Cycle Strength",
- term == "circadian_todMorning" ~ "Circadian Seizure Chronotype",
- TRUE ~ str_replace_all(term, "_", " ") %>% str_to_title()
- )) %>%
- mutate(term_plot = case_when(
- term_raw == "Var.of.dheas_" ~ "sigma^2(DHEAS)",
- term_raw == "Var.of.cortisol_z" ~ "sigma^2(Cortisol)",
- TRUE ~ paste0("'", term, "'")
- ))
- # Fixed order for the vertical axis
- custom <- c("sigma^2(Cortisol)", "sigma^2(DHEAS)",
- "'Multiday Cycle Strength'", "'Circadian Cycle Strength'",
- "'Circadian Seizure Chronotype'")
- other <- setdiff(unique(all_coefficients$term_plot), custom)
- all_coefficients <- all_coefficients %>%
- mutate(term_plot = factor(term_plot, levels = c(custom, other)))
- coefficient_plot <- all_coefficients %>%
- ggplot(aes(x = term_plot, y = estimate, ymin = conf.low, ymax = conf.high,
- color = Cortisol_Type)) +
- geom_hline(yintercept = 0, linetype = "dashed", color = "black") +
- geom_point(position = position_dodge(width = 0.5), size = 3) +
- geom_linerange(position = position_dodge(width = 0.5), size = 1) +
- coord_flip() +
- scale_x_discrete(labels = scales::label_parse()) +
- labs(title = "Coefficient Estimates with 95% CI",
- x = NULL, y = "Coefficient Estimate", color = "Slope model") +
- scale_color_manual(values = c("Evening" = "darkblue", "Morning" = "orange")) +
- theme_minimal(base_size = 14)
- dir.create("figures", showWarnings = FALSE)
- pdf("figures/coefficient_plot_cortisol_type.pdf", width = 7, height = 5)
- print(coefficient_plot)
- dev.off()
slopes_vs_features.R at commit dd1752a, no license · at the source
Overview
- Department of Biomedical Engineering, University of Melbourne, Melbourne, VIC 3010, Australia
- Graeme Clark Institute, University of Melbourne, Melbourne, VIC 3010, Australia
- Statistical Consulting Centre, The University of Melbourne, Melbourne, VIC 3010, Australia
- Department of Medicine, St. Vincent’s Hospital Melbourne, University of Melbourne, Melbourne, VIC 3010, Australia
Abstract
It is well established that most people with epilepsy experience cyclical fluctuations in seizure susceptibility. These seizure patterns have been associated with multiday oscillations in cortical excitability and autonomic changes, although the mechanistic drivers of these cycles are not well understood. In this study, we measured stress hormone levels at seizure cycle peaks and troughs (high and low risk, respectively) to investigate stress hormones as a possible co-oscillator with multiday cycles of seizure susceptibility. Thirteen participants with focal epilepsy were recruited for this longitudinal cohort study. Participants reported seizures in an electronic diary for at least 6 months prior to study commencement. Four 3-day salivary sampling periods were scheduled using a cycle forecasting algorithm trained on each participant’s historical seizure diary to prospectively identify high- and low-risk periods. Twenty-four saliva samples were collected per person across two predicted high-risk periods and two predicted low-risk periods (‘allocated risk’). Saliva samples were analysed for cortisol and dehydroepiandrosterone sulphate (DHEAS) levels. Linear mixed models were fitted to predict stress hormones with fixed effects: multiday seizure cycle (retrospective peak or trough), time of day, allocated risk, perceived stress scale score and pre- and post-sample seizure occurrence. Participants recorded an average of 47 (SD = 62) seizures between their first and final saliva collection (duration: 11.8 ± 8.0 months). Three hundred and twelve saliva samples were collected in total. Cortisol levels were significantly higher in the epilepsy cohort compared to the expected general population. On a group level, cortisol was significantly associated with fixed effects time of day, pre-sample seizure occurrence and multiday seizure cycle, with cortisol levels heightened at multiday cycle peaks compared to troughs, particularly evident in the morning saliva samples. These results provide new insights into cortisol as a possible mechanistic driver or co-oscillator of multiday seizure cycles in people with epilepsy. The novel methodology presented in this work may be used to explore interactions between other biomolecules of interest and multiday seizure cycles.
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.
RiPLresearch/cortisol-study-brain-communications
dd1752a76733f3002b189fb7f31d0c06fd90646c, 26 May 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
7 files
- Bayesian model.R, R, 229 lines
- correlation.R, R, 49 lines
- cortisol_slopes.R, R, 294 lines, 1 match
- lmm_models.R, R, 254 lines, 1 match
- other_plots.R, R, 356 lines
- slopes_vs_features.R, R, 98 lines, 1 match
- README.md, Text, 155 lines
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 6 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
Requests for data can be made to the corresponding author. Deidentified data will be made available upon reasonable request. Code used for analysis (statistics and figure generation) is available at: https://
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, 5 keywords, 2 funders, 55 references.
Cite
This paper
Stirling, R. E., Naim-Feil, J., Gordon, I., Grayden, D. B., D’Souza, W., Freestone, D. R., Nurse, E. S., Cook, M. J., & Karoly, P. J. (2026). Investigation of stress hormones across multiday seizure cycles. Brain communications, 8(3), fcag217. https://
BibTeX
@article{stirling2026inv
author = {Stirling, Rachel E and Naim-Feil, Jodie and Gordon, Ian and Grayden, David B and D’Souza, Wendyl and Freestone, Dean R and Nurse, Ewan S and Cook, Mark J and Karoly, Philippa J},
title = {{Investigation of stress hormones across multiday seizure cycles}},
journal = {Brain communications},
year = {2026},
month = jun,
volume = {8},
number = {3},
pages = {fcag217},
publisher = {Oxford University Press},
issn = {2632-1297},
doi = {10.1093/
url = {https://
pmid = {42311452},
pmcid = {PMC13270484}
}
RIS
TY - JOUR
AU - Stirling, Rachel E
AU - Naim-Feil, Jodie
AU - Gordon, Ian
AU - Grayden, David B
AU - D’Souza, Wendyl
AU - Freestone, Dean R
AU - Nurse, Ewan S
AU - Cook, Mark J
AU - Karoly, Philippa J
TI - Investigation of stress hormones across multiday seizure cycles
T2 - Brain communications
J2 - Brain Commun
PY - 2026
DA - 2026/
VL - 8
IS - 3
SP - fcag217
SN - 2632-1297
PB - Oxford University Press
DO - 10.1093/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1093/
"type": "article-journal",
"title": "Investigation of stress hormones across multiday seizure cycles",
"container-title": "Brain communications",
"author": [
{
"family": "Stirling",
"given": "Rachel E"
},
{
"family": "Naim-Feil",
"given": "Jodie"
},
{
"family": "Gordon",
"given": "Ian"
},
{
"family": "Grayden",
"given": "David B"
},
{
"family": "D’Souza",
"given": "Wendyl"
},
{
"family": "Freestone",
"given": "Dean R"
},
{
"family": "Nurse",
"given": "Ewan S"
},
{
"family": "Cook",
"given": "Mark J"
},
{
"family": "Karoly",
"given": "Philippa J"
}
],
"container-title-short":
"volume": "8",
"issue": "3",
"page": "fcag217",
"DOI": "10.1093/
"PMID": "42311452",
"PMCID": "PMC13270484",
"ISSN": "2632-1297",
"publisher": "Oxford University Press",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
6,
8
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1016/j.ebiom.2021.103619 [code]
- Multiday cycles of heart rate are associated with seizure likelihood: An observational cohort study.Journal: EBioMedicineIn common: epilepsy, 8 references, 4 authors
- [2] doi:10.1093/braincomms/fcaf364 [code]
- Cycles in seizure duration and their underlying dynamics in the tetanus toxin rat model.Journal: Brain communicationsIn common: epilepsy, 4 references, 2 authors
- [3] doi:10.1002/advs.202516802 [code]
- Structural Eigenmodes of the Brain to Improve the Source Localization of EEG: Application to Epileptiform Activity.Journal: Advanced science (Weinheim, Baden-Wurttemberg, Germany)In common: epilepsy, 3 authors
- [4] doi:10.1038/s41598-025-87929-1 [code]
- Dynamic multiday seizure cycles and evolving rhythms in a tetanus toxin rat model of epilepsy.Journal: Scientific reportsIn common: epilepsy, 6 references, author Mark J Cook
- [5] doi:10.1093/braincomms/fcad205 [code]
- Chronic intracranial EEG recordings and interictal spike rate reveal multiscale temporal modulations in seizure states.Journal: Brain communicationsIn common: epilepsy, 3 references, 2 authors
- [6] doi:10.1186/s11689-025-09651-3 [code]
- The association between infant EEG aperiodic exponent and the trajectory of restricted and repetitive behaviors for toddlers with and without autism.Journal: Journal of neurodevelopmental disordersIn common: glmmTMB, brms, broom, 7 other tools
- [7] doi:10.1016/j.celrep.2026.117505 [code]
- Impaired spatial coding and neuronal hyperactivity in the medial entorhinal cortex of aged APP knock-in mice.Journal: Cell reportsIn common: glmmTMB, brms, broom, 7 other tools
- [8] doi:10.1016/j.celrep.2024.115149 [code]
- Single-nucleus and spatial landscape of the sub-ventricular zone in human glioblastoma.Journal: Cell reportsIn common: glmmTMB, broom, lmerTest, 7 other tools
- [9] doi:10.1371/journal.pcbi.1010508 [code]
- Circadian distribution of epileptiform discharges in epilepsy: Candidate mechanisms of variability.Journal: PLoS computational biologyIn common: epilepsy, 5 references, author Mark J Cook
- [10] doi:10.64898/2026.03.02.709173 [code]
- Corpus Callosum Dysgenesis impairs metacognition: evidence from multi-modality and multi-cohort replicationsJournal: bioRxiv (preprint)In common: brms, broom, easystats, 6 other tools
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, 6 scripts, and 3 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:e64ecc8b98c4e46e…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1093/braincomms/fcag217)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1093/braincomms/fcag217.svg
:target: https://openscicode.org/badge/doi/10.1093/braincomms/fcag217
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1093/braincomms/fcag217"><img src="https://openscicode.org/badge/doi/10.1093/braincomms/fcag217.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
