its2s: a Python package for two-stage interrupted time series analysis using machine learning
Wilner, L.; Casey, J. A.; Mooney, S. J.; Do, V.; Ma, Y.; Benmarhnia, T.; Dey, A. K.
Show abstract
When randomized controlled trials are infeasible, researchers may leverage natural experiments for causal inference. Interrupted time-series (ITS) designs compare observed post-event trends to counterfactual predictions from pre-event data. Two-stage ITS designs use flexible models to generate optimized counterfactual predictions in the first stage, then estimate intervention effects by comparing observed to predicted outcomes in the second stage. Fitting high-dimensional versions of these models is challenging, requiring systematic infrastructure to ensure rigor and reproducibility. In response, we developed its2s, an open-source Python package implementing the two-stage ITS design with machine learning. its2s allows users to specify an intervention date and training/testing periods, select among built-in model architectures (e.g., Prophet-XGBoost, NeuralProphet), and generate confidence intervals via moving block bootstrap, preserving temporal autocorrelation in residuals. its2s layers defaults, configuration files, and runtime overrides to support workflows ranging from rapid default implementations to highly tailored analyses. We validated its2s using two case studies: a simulation with a 12% policy effect, recovering the true effect as 11.77%, and an analysis of the 2021 Pacific Northwest heat dome, finding 53% excess injury mortality over the following three weeks. its2s provides a flexible, reproducible framework for ITS-based quasi-experimental research, lowering barriers to rigorous machine learning-based counterfactual modeling.
Matching journals
The top 3 journals account for 50% of the predicted probability mass.
Similar papers in this journal
- How Timing of Stay-at-home Orders and Mobility Reductions Impacted First-Wave COVID-19 Deaths in US Counties 94%
- Spatiotemporal Forecasting of Opioid-related Fatal Overdoses: Towards Best Practices for Modeling and Evaluation 93%
- Analyses using multiple imputation need to consider missing data in auxiliary variables 93%
Similar papers in this journal
- Quantitative bias analysis in practice: Review of software for regression with unmeasured confounding 93%
- Evaluation of statistical methods used in the analysis of interrupted time series studies: a simulation study 93%
- Quantitative bias analysis for mismeasured variables in health research: a review of software tools 91%
Similar papers in this journal
- Penalized reduced rank regression for multi-outcome survival data supports a common metabolic risk score for age-related diseases 91%
- Evaluating the ALERT algorithm for local outbreak onset detection in seasonal infectious disease surveillance data 91%
- Efficient Estimation of Indirect Effects in Case-Control Studies Using a Unified Likelihood Framework 91%
Similar papers in this journal
Similar papers in this journal
- A Bayesian Susceptible-Infectious-Hospitalized-Ventilated-Recovered Model to Predict Demand for COVID-19 Inpatient Care in a Large Healthcare System 94%
- A causal inference approach for estimating effects of non-pharmaceutical interventions during Covid-19 pandemic 93%
- Early Detection of COVID-19 Outbreaks Using Human Mobility Data 93%
"Similar papers" are the closest papers from that journal in the model's embedding space. They show what the match is built on, but the ranking comes mostly from a classifier over the whole training set, not from these examples alone.