pith. sign in

arxiv: 2604.12536 · v1 · submitted 2026-04-14 · 📊 stat.AP · stat.ML

MCAnalysis: An Open-Source Package for Preprocessing, Modelling, and Visualisation of Menstrual Cycle Effects in Digital Health Data

Pith reviewed 2026-05-10 14:35 UTC · model grok-4.3

classification 📊 stat.AP stat.ML
keywords menstrual cyclegeneralised additive modelopen-source softwaredigital healthwearable dataFourier basisreproducible analysiscycle effects
0
0 comments X

The pith

A new open-source package provides a complete pipeline for modeling menstrual cycle effects on physiological and psychological outcomes using wearable and self-reported data.

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The paper develops mcanalysis, an R and Python package that processes period tracking data, labels cycle days, filters cycles, normalizes outcomes, and fits Fourier-basis generalised additive models to detect cyclic patterns. It demonstrates this on data from over 2,800 users across 15 outcomes in domains like heart rate variability, sleep, mood, and activity. Nine outcomes showed statistically significant associations with the menstrual cycle, offering a reproducible method where none was standardized before. This matters because the menstrual cycle influences many health metrics, yet prior analyses lacked consistent, accessible tools for quantifying these effects.

Core claim

The package implements a Fourier-basis generalised additive model for menstrual cycle research, providing preprocessing, modeling with bootstrap confidence intervals, and phase-specific trend identification, as shown by significant cyclic associations in nine of fifteen tested health outcomes from real-world digital health data.

What carries the argument

Fourier-basis generalised additive model (GAM) that captures periodic patterns in outcomes over standardized menstrual cycle days with bootstrap-derived confidence intervals.

If this is right

  • Significant associations found in physiological measures like HRV and oxygen saturation, as well as sleep, symptoms, mood, and activity.
  • Cycle-normalised outcomes showed no significant links to tested confounders.
  • The pipeline enables identification of turning points for phase-specific linear trend estimates.
  • Freely available with a no-code web interface for broad accessibility.

Where Pith is reading between the lines

These are editorial extensions of the paper, not claims the author makes directly.

  • Researchers could apply the package to larger datasets to explore interactions between cycle phases and other factors like age or health conditions.
  • Integration into consumer health apps might allow users to receive personalized insights into how their cycle affects daily metrics.
  • Future extensions could incorporate additional basis functions or machine learning for better handling of irregular cycles.

Load-bearing premise

The chosen Fourier basis order and smoothing parameters in the GAM adequately represent true menstrual cycle effects without introducing bias from cycle labeling or data filtering choices.

What would settle it

Re-running the analysis on the same data but with a different cycle day labeling method or basis order that yields substantially different significant outcomes or turning points.

Figures

Figures reproduced from arXiv: 2604.12536 by Bola Grace, Glyn Lewis, Joseph Hayes, Kyra Delray, Robin Evans.

Figure 1
Figure 1. Figure 1: Overview of the mcanalysis analytical pipeline. The package accepts period dates, outcome data, and optional confounder data as inputs and produces statistical results, turning point estimates, phase-specific slopes, and publication-ready visualisations as outputs. All steps are implemented identically in both R and Python. 2.3 Web-based interface For researchers without programming expertise, a web-based … view at source ↗
Figure 2
Figure 2. Figure 2: Menstrual cycle effects on physiological outcomes (Juli dataset). [PITH_FULL_IMAGE:figures/full_fig_p015_2.png] view at source ↗
Figure 3
Figure 3. Figure 3: Menstrual cycle effects on pain and symptom outcomes (Juli dataset). [PITH_FULL_IMAGE:figures/full_fig_p016_3.png] view at source ↗
Figure 4
Figure 4. Figure 4: Menstrual cycle effects on mental health outcomes (Juli dataset). [PITH_FULL_IMAGE:figures/full_fig_p017_4.png] view at source ↗
Figure 5
Figure 5. Figure 5: Menstrual cycle effects on sleep and activity outcomes (Juli dataset). [PITH_FULL_IMAGE:figures/full_fig_p018_5.png] view at source ↗
read the original abstract

The menstrual cycle influences numerous physiological and psychological outcomes, yet standardised, open-source statistical methods for quantifying these cyclic effects remain lacking. We developed mcanalysis, an open-source package in R and Python implementing a Fourier-basis generalised additive model (GAM) for menstrual cycle research. The package provides a complete pipeline: processing period dates, labelling cycle days relative to menstruation onset, filtering physiologically plausible cycles, normalising outcomes to individual means, fitting cyclic GAMs with bootstrap confidence intervals, and identifying turning points to generate phase-specific linear trend estimates. We demonstrate the package on 15 wearable and self-reported outcomes using data from the Juli chronic health management application (N = 2,816 users). Nine of 15 outcomes showed evidence of association with the menstrual cycle (p < 0.05), spanning physiological (HRV p < 0.001, oxygen saturation p = 0.002), sleep (p = 0.003), symptom (migraine p < 0.001, headache p = 0.005), mood (EMA mood p = 0.024, PHQ-8 lack of energy p = 0.008, mania p = 0.041), and activity (hours outside p = 0.019) domains. No tested confounders were significantly associated with cycle-normalised outcomes. mcanalysis provides a standardised, reproducible approach to menstrual cycle analysis for users at all levels of statistical expertise. The package is freely available at https://github.com/kyradelray/mcanalysis, with a no-code web interface at https://kyradelray.shinyapps.io/mcanalysis/.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, simulated authors' rebuttal, and a circularity audit. Tearing a paper down is the easy half of reading it; the pith above is the substance, this is the friction.

Referee Report

3 major / 1 minor

Summary. The paper presents MCAnalysis, an open-source R/Python package implementing a Fourier-basis generalized additive model (GAM) pipeline for analyzing menstrual cycle effects on digital health outcomes. The pipeline covers period date processing, cycle day labeling, filtering of plausible cycles, per-user normalization, GAM fitting with bootstrap confidence intervals, turning point identification, and visualization. Applied to 15 outcomes from 2,816 Juli app users, it reports significant menstrual cycle associations (p < 0.05) for 9 outcomes across physiological, sleep, symptom, mood, and activity domains, with no significant confounders identified.

Significance. If validated, this provides a much-needed standardized, reproducible tool for menstrual cycle research in digital health, lowering barriers for users with varying statistical expertise via the no-code interface. The open-source availability and demonstration on real-world data represent a practical contribution. The empirical findings, if robust, underscore the pervasive effects of the menstrual cycle on diverse health metrics, which could guide future studies and personalized health applications.

major comments (3)
  1. [Abstract] The report of 9/15 significant associations at p<0.05 does not mention correction for multiple comparisons; given 15 tests, this risks false positives and weakens the claim without FDR or Bonferroni adjustment.
  2. [Methods] No sensitivity analyses to the Fourier basis order, cycle filtering criteria ('physiologically plausible'), or normalization steps are described. These choices directly affect cycle labeling and model fits in heterogeneous self-reported data, making the p-values and turning points potentially sensitive to preprocessing decisions.
  3. [Results] The manuscript lacks details on GAM model diagnostics (e.g., residual analysis, smoothing parameter selection) and does not compare the Fourier basis to alternative models such as B-splines or non-parametric approaches, leaving the adequacy of the chosen model unverified for capturing non-sinusoidal patterns.
minor comments (1)
  1. [Abstract] The package availability links are provided, but the manuscript could benefit from a brief description of the web interface functionality for clarity.

Simulated Author's Rebuttal

3 responses · 0 unresolved

We thank the referee for their constructive comments on our manuscript. We address each major comment point by point below, indicating the revisions we will incorporate.

read point-by-point responses
  1. Referee: [Abstract] The report of 9/15 significant associations at p<0.05 does not mention correction for multiple comparisons; given 15 tests, this risks false positives and weakens the claim without FDR or Bonferroni adjustment.

    Authors: We agree that multiple testing correction is required to control error rates across the 15 outcomes. In the revised manuscript we will apply the Benjamini-Hochberg FDR procedure, report both unadjusted and adjusted p-values in the abstract and results, and update the count of significant associations accordingly. revision: yes

  2. Referee: [Methods] No sensitivity analyses to the Fourier basis order, cycle filtering criteria ('physiologically plausible'), or normalization steps are described. These choices directly affect cycle labeling and model fits in heterogeneous self-reported data, making the p-values and turning points potentially sensitive to preprocessing decisions.

    Authors: We acknowledge that these preprocessing decisions can influence results. The revised Methods section will describe and report sensitivity analyses varying the Fourier basis order (k = 3, 4, 5), cycle-length filtering thresholds, and normalization methods, with outcomes presented in supplementary materials to assess robustness of p-values and turning points. revision: yes

  3. Referee: [Results] The manuscript lacks details on GAM model diagnostics (e.g., residual analysis, smoothing parameter selection) and does not compare the Fourier basis to alternative models such as B-splines or non-parametric approaches, leaving the adequacy of the chosen model unverified for capturing non-sinusoidal patterns.

    Authors: We agree that model adequacy should be verified. The revised manuscript will add GAM diagnostics (residual plots, Q-Q plots, REML-based smoothing parameter selection) and a supplementary comparison of the Fourier basis against B-splines and a non-parametric smoother, using AIC and visual fit to confirm suitability for the observed cyclic patterns. revision: yes

Circularity Check

0 steps flagged

No circularity: empirical associations arise from direct model fits to external user data

full rationale

The paper describes an open-source package implementing a Fourier-basis GAM pipeline (cycle labeling, filtering, per-user normalization, model fitting with bootstrap CIs) and applies it to 2816 users' data from an external app. Reported associations (9/15 outcomes at p<0.05) are statistical outputs from fitting the model to observed outcomes; no equations, parameters, or results reduce by construction to quantities defined solely by the authors' prior fits or self-citations. Preprocessing choices are explicit but do not create self-referential loops. The derivation chain is self-contained against external benchmarks.

Axiom & Free-Parameter Ledger

2 free parameters · 2 axioms · 0 invented entities

The approach rests on standard statistical assumptions for GAMs and periodic modeling of cycles, plus domain-specific preprocessing rules. No new physical entities are introduced. Free parameters are implicit in basis selection and smoothing.

free parameters (2)
  • Fourier basis order
    Number of sine/cosine terms chosen to represent the cycle shape; controls model flexibility.
  • GAM smoothing parameters
    Penalty terms estimated during fitting to balance fit and smoothness.
axioms (2)
  • domain assumption Menstrual cycle effects are adequately captured by a periodic Fourier basis expansion.
    Central modeling choice invoked for all cyclic GAM fits.
  • domain assumption The stated rules for labeling cycle days and filtering physiologically plausible cycles correctly identify valid observations across users.
    Preprocessing step required before normalization and modeling.

pith-pipeline@v0.9.0 · 5621 in / 1532 out tokens · 48896 ms · 2026-05-10T14:35:48.430867+00:00 · methodology

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Reference graph

Works this paper leans on

6 extracted references · 6 canonical work pages

  1. [1]

    doi: 10.1136/bmj-2025-085682. J.R. Bull, S.P. Rowland, E.B. Scherwitzl, R. Scherwitzl, K.G. Danielsson, and J. Harper. Real-world menstrual cycle characteristics of more than 600,000 menstrual cycles.npj Digital Medicine, 2 (1):83,

  2. [2]

    doi: 10.1136/bmjment-2025-301674. S.R. Jasinski, D.M. Presby, G.J. Grosicki, E.R. Capodilupo, and V.H. Lee. A novel method for quantifying fluctuations in wearable derived daily cardiovascular parameters across the menstrual cycle.npj Digital Medicine, 7:373,

  3. [3]

    doi: 10.1038/s41746-024-01394-0. M. Shilaih, B.M. Goodale, L. Falco, F. Kübler, V. De Clerck, and B. Leeners. Modern fertility awareness methods: wrist wearables capture the changes in temperature associated with the menstrual cycle.Bioscience Reports, 38(6):BSR20171279,

  4. [4]

    Soumpasis, B

    I. Soumpasis, B. Grace, and S. Johnson. Real-life insights on menstrual cycles and ovulation using big data.Human Reproduction Open, 2020(2):hoaa011,

  5. [5]

    doi: 10.1093/hropen/hoaa011. K.M. Schmalenberger, N.M. Tauber, S. Engel, et al. How to study the menstrual cycle: practical tools and recommendations.Psychoneuroendocrinology, 123:104895,

  6. [6]

    doi: 10.1136/bmjsem-2021-001047. G. Cornelissen. Cosinor-based rhythmometry.Theoretical Biology and Medical Modelling, 11(1):16,