Analysis via Simulation of Interrupted Time Series (ITS) Data
Augment dataframe with lagged covariates
Adjust an outcome time series based on the group weights.
Aggregate grouped data
Test a passed test statistic on the simulated data
Summary function for summarize.simulation.results
Calculate proportion of subgroups across time
Extrapolate pre-policy data to post-policy era
Default ITS model
Make fake data for testing purposes.
A fake DGP with time varying categorical covariate for illustrating th...
Make envelope style graph with associated smoothed trendlines
Make a fit_model that takes a seasonality component
Generate a collection of raw counterfactual trajectories
Make a smoother that fits a model and then smooths residuals
Generate an ITS extrapolation simulation.
simITS package overview
Smooth residuals after model fit
Smooth a series using a static loess smoother
Uses simulation to create prediction intervals for post-policy outcomes in interrupted time series (ITS) designs, following Miratrix (2020) <arXiv:2002.05746>. This package provides methods for fitting ITS models with lagged outcomes and variables to account for temporal dependencies. It then conducts inference via simulation, simulating a set of plausible counterfactual post-policy series to compare to the observed post-policy series. This package also provides methods to visualize such data, and also to incorporate seasonality models and smoothing and aggregation/summarization. This work partially funded by Arnold Ventures in collaboration with MDRC.