Related Experiment Video
Updated: Aug 6, 2026

STFEEG-Tool: A Spatial-Temporal-Frequency EEG Analysis Tool for Motor Imagery Brain-Computer Interfaces
Published on: March 10, 2026
its2s: a Python package for two-stage interrupted time series analysis using machine learning
Lauren Blair Wilner1, Joan A Casey1,2,3, Stephen J Mooney1
1Department of Epidemiology, University of Washington School of Public Health, Seattle, WA, USA.
Researchers can now use the open-source its2s Python package for rigorous causal inference with two-stage interrupted time-series (ITS) designs. This tool simplifies machine learning-based counterfactual modeling for natural experiments.
Area of Science:
- Epidemiology
- Biostatistics
- Data Science
Background:
- Randomized controlled trials (RCTs) are not always feasible for causal inference.
- Natural experiments and quasi-experimental designs, like interrupted time-series (ITS) analysis, offer alternatives.
- Two-stage ITS designs utilize machine learning for flexible counterfactual prediction, but fitting high-dimensional models poses challenges for reproducibility.
Purpose of the Study:
- To introduce its2s, an open-source Python package designed to implement two-stage ITS analysis.
- To provide a flexible and reproducible framework for researchers conducting quasi-experimental studies using machine learning.
- To lower the barriers to entry for rigorous counterfactual modeling in the absence of RCTs.
Main Methods:
- The its2s package implements a two-stage ITS design leveraging machine learning models.
- Users can specify intervention dates, training/testing periods, and select from various built-in model architectures (e.g., Prophet-XGBoost, NeuralProphet).
- Confidence intervals are generated using a moving block bootstrap method to maintain temporal autocorrelation in residuals.
Main Results:
- Validation through a simulation study successfully recovered a known policy effect (11.77% vs. true 12%).
- Application to the 2021 Pacific Northwest heat dome identified a 53% excess injury mortality rate in the subsequent three weeks.
- The its2s package demonstrated flexibility, supporting both default and highly customized analytical workflows.
Conclusions:
- The its2s package offers a robust and user-friendly framework for conducting advanced ITS-based quasi-experimental research.
- It facilitates the application of machine learning for counterfactual modeling, enhancing causal inference capabilities.
- its2s promotes reproducibility and rigor in analyzing real-world events and policy impacts.
Related Concept Videos
Statistical Software for Data Analysis and Clinical Trials
Comparing the Survival Analysis of Two or More Groups
Statistical Package for the Social Sciences (SPSS)
SPSS streamlines the process from data preparation to analysis and reporting. It is characterized by its user-friendly interface, which conceals...
Introduction To Survival Analysis
The primary goal of survival analysis is to estimate survival time—the time until a...
Steps in Outbreak Investigation
Statistical Analysis System (SAS)
Applications: SAS finds applications in numerous fields, including healthcare for clinical trial analysis, finance for risk assessment, marketing for customer data analysis, and...