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
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.
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
- 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
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.
Referee Report
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)
- [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.
- [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.
- [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)
- [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
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
-
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
-
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
-
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
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
free parameters (2)
- Fourier basis order
- GAM smoothing parameters
axioms (2)
- domain assumption Menstrual cycle effects are adequately captured by a periodic Fourier basis expansion.
- domain assumption The stated rules for labeling cycle days and filtering physiologically plausible cycles correctly identify valid observations across users.
Reference graph
Works this paper leans on
-
[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]
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]
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]
I. Soumpasis, B. Grace, and S. Johnson. Real-life insights on menstrual cycles and ovulation using big data.Human Reproduction Open, 2020(2):hoaa011,
work page 2020
-
[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]
doi: 10.1136/bmjsem-2021-001047. G. Cornelissen. Cosinor-based rhythmometry.Theoretical Biology and Medical Modelling, 11(1):16,
discussion (0)
Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.