Search arXivSearch

arXiv · 2604.12536

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

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/.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Kyra Delray, Glyn Lewis, Bola Grace, Joseph Hayes, Robin Evans. 2026-04-14. MCAnalysis: An Open-Source Package for Preprocessing, Modelling, and Visualisation of Menstrual Cycle Effects in Digital Health Data. https://arxiv.org/abs/2604.12536

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Relegation, promotion and the components of scoring in water polo

Relegation, not the championship, decides the outcome of many European water polo leagues: one club has won every recent national title in Italy, Spain and Hungary. We make the relegation decision our object of inference. Serie A1 relegates one club for finishing last and a second through a three-match play-out, and we ask at each stage how much can be known and when. Promoted clubs arrive with no top-flight record, so we also compare four ways of setting their prior. These analyses rest on the first Bayesian hierarchical model of water polo, which splits scoring into even-strength, man-up and penalty components, models opportunities and conversions separately, and lets abilities evolve between seasons. Treating the components as independent proves untenable, since they compete for a common budget of possessions. Fitted to a new dataset of 940 matches, the model identifies the directly relegated club from the ninth round, before the league table does, predicts the play-out field better than the table, and shows the play-out itself to be close to a coin toss. Promoted clubs start below the league on every component except drawing exclusions: knowing a club was promoted improves forecasts; knowing how does not.

stat.AP

Geospatial Foundation Models Capture Health-Relevant Dimensions of Place Beyond Conventional Social Risk Indices

Area-based social risk indices summarize residents' socioeconomic conditions but incompletely capture physical features of place that may affect health. We evaluated whether numerical representations of physical place produced by four geospatial foundation model families from 2022 satellite data explained residual variance in tract-level associations between the Area Deprivation Index, Social Deprivation Index, and Social Vulnerability Index with health outcomes. We used LightGBM to predict variables from the American Community Survey and 40 chronic disease and health-behavior outcomes from CDC PLACES across 82,646 census tracts in the contiguous United States, evaluating performance across 10 held-out states. Among survey variables, models were moderately predictive of some variables including housing type (R-squared up to 0.54) but weak for disability, unemployment, and income disparity. For health outcomes, models explained up to 54% of variance left unexplained by social risk indices, with the largest gains for annual checkups, arthritis, and high blood pressure. Mean total variance explained by geospatial foundation models across the 40 health-related outcomes increased from 0.31 in the smallest tract-size decile to 0.39 in the largest. Geospatial foundation models capture health-relevant features of place not represented by conventional social risk indices and may usefully augment them in epidemiological analyses.

stat.AP

Transporting summary measures of relative effects from randomised trials to the treated patient population: an application to breast cancer endocrine therapy

Randomised trials often report relative treatment effects, such as risk ratios and hazard ratios, for trial populations. Clinical decision-making, however, often benefits from estimates of absolute treatment effects in the population eligible for treatment. Trial participants may not represent this target population well, and restrictions on access to individual participant trial data can further complicate absolute effect estimation. Routine care data are often representative of the target population but may be subject to uncontrolled confounding. We consider estimation of the average treatment effect on the treated (ATT), an absolute measure, by combining a representative sample of treated routine care patients with summary measures (i.e., estimated risk or hazard ratios) from either a randomised trial or a meta-analysis of trials. Under marginal or conditional transportability assumptions, the ATT is shown to be identifiable. The implications of collapsibility of the effect measure on transportability are discussed, and plug-in estimators of the ATT are presented. Simulation studies are used to assess finite sample performance of the estimators in a range of settings. The proposed methods are applied to estimate the ATT of endocrine therapy on 15-year breast cancer mortality using results from a meta-analysis of randomised trials and England's National Disease Registration Service.

stat.AP