Skip to content

Instantly share code, notes, and snippets.

@mingjiphd
mingjiphd / InterrupedTimeSeries.R
Created January 25, 2026 17:54
Causal Analysis using R Interrupted Time Series Analysis
#### Causal Analysis using R Interrupted Time Series
### Brief Overview of ITS
# - Interrupted time series (ITS) is a quasi-experimental method used to evaluate the impact
# of an intervention by analyzing an outcome measured over time before and after the
# intervention occurs.
# - The technique works by modeling changes in both the level and slope of the time series
# that follow the intervention, estimating both immediate and long-term effects.
# - ITS is valuable when randomization is not feasible and can provide strong evidence
# for causal inference, but requires multiple data points on both sides of the intervention.