RITS is a stand-alone, cross-platform, and user-friendly application to assess the impact of complex policy interventions. RITS implements the Robust Interrupted Time Series model [M1], the Robust Multiple Interrupted Time Series model and the Supremum Wald Test [M2] to evaluate the presence and impact during a change-point caused by a change in a policy.
RITS analyzes interrupted time series (ITS) and estimates an intervention policy's effect through changes in level, trend, or correlation structures that occur before and after a change-point. Note that the time of intervention and the true change-point in the system could not be the same (as described in [M1]) and RITS takes this difference into account.
RITS provides a flexible, seamless interface for the analysis of time series data with the aim of improving the focus on the interpretation of the outcome while reducing the complexity of the use of statistical models.
The user interface has been developed in JavaScript language programming, while the statistical model has been independently implemented in Nim language programming to ensure improved memory and speed efficiency.
If you are already using this software, consider to cite us.
- Installing
- Getting started
- Example: COVID partial lockdown effect in Germany (November 2, 2020)
- Compilation
- Citations
- Credits
- License
The easiest way to use RITS is to download the latest release. We are providing binaries for Windows x64, macOS, and GNU/Linux (in an AppImage format).
- Load the dataset: RITS can process CSV tables. The input files should have three columns: the institute name, the date, and the registered value.
-
Choose the date range: The toolbox will start showing a plot of the time series recorded in the dataset. Sometimes, we will need a specific interval to analyze: use the bars to choose the start and end dates of the processing.
-
Choose the potential change-point's interval: The statistical model requires an interval of theoretical (or potential) change-points. You can use the bars to select the range. Remember that longer intervals will require more time to process. Once you are sure of the intervals, press the
Model Dataset
button to start processing. -
Data summary: You will see a table in the top area with a brief summary of the processing results: the difference in the slope, levels, and correlations that appears in your data.
-
Relevant results: Extending the data summary, in this table, you will see the difference between the estimated and your theoretical change-point proposal. Details about the slope, intercept, and correlations estimates are also generated.
-
Explore the dataset: fitted values and log-likelihood: Click on
Menu View>Estimated model
to see the time series differences between the fitted mean function with the raw data. If you are wondering about the log-likelihood of the model, scroll down to see the plot. Each graphic is can be zoomed-in and saved independently. -
Explore the dataset: residuals and auto-correlation: Click on
Menu View>Residuals
to see the residuals of the fitted model (after and before the change-point) And their autocorrelation function to assess whether certain model assumptions have not been met. -
Read and save the report: Click on
Menu Reports>Complete report
. The toolbox collects all results data of the model through tables and plots in this large sheet. Click onDOCX report
to save it in the MS Word 2017 format. Note that due to the number of images, it could take a few seconds to load the first time. -
Access to the documentation: The model's theoretical description is also included in the toolbox. Click on
Menu Help>Model description
to read the paper and check its theoretical details.
As an example, we tested the RITS toolbox to assess the impact of a partial lock-down on the number of daily infected people in Germany. The intervention time (or theoretical change-point) was defined on November 2. We should note, however, that the measures were announced on October 28 DW news.
First, we load the date from the number of people infected from October 16 to November 27. All days in this interval were considered to be potential change points.
Let us take a look at the Executive Summary
panel:
The four stars depict that the Supremum Wald Test was not rejected, and we can consider that there is a change (under the RITS model).
Now, check the Detailed Summary
panel:
It can be seen that the estimated change-point was October 30, a few days before the start of the lock-down (an "anticipation effect" in the time series).
It should also be noted that the infection trend is declining, but there is a positive change in the level and the adjacent correlation.
Unfortunately, the interpretation of these values is outside the scope of this example. But, it shows the versatility of the RITS model and toolbox to provide a fast overview of policy effectiveness.
The data used in the example is located in example-germany-covid/sample-germany.csv.
If you prefer to look at the code, modify something or run the source code on this repository, you will need to install and configure the following programs on your computer:
- Git.
- Node.js (>14.0.0) with npm (>6).
- Nim language compiler (>1.0.0).
Once these main platforms are installed, run/test the source code is straightforward from your Bash-compatible command line:
# Clone this repository
git clone https://github.com/biostatistics-kaust/kbiostats.robust_time_series_toolbox
# Go into the repository
cd kbiostats.robust_time_series_toolbox/
# Install an additional requirement
npm install
# Update changes (it can be skipped if no changes were made)
npm run update-stats-model
npm run update-ui
npm run optimize-scripts
# Start developer version
npm run start
# Build executables
npm run build-windows
npm run build-linux
npm run build-mac #It will work only in macOS
# Build executables for all platforms
npm run pack
If you are using our software, please consider to cite us:
[M3]
Cruz M., Pinto M., Gillen D., and Ombao H. RITS: A Toolbox for Assessing Complex Interventions via Interrupted Time Series Models. Journal of Statistical Software. In submission.
[M2]
Cruz, M., Gillen, D. L., Bender, M., & Ombao, H. (2019). Assessing health care interventions via an interrupted time series model: study power and design considerations. Statistics in medicine, 38(10), 1734-1752. doi:10.1002/sim.8067
[M1]
Cruz, M., Bender, M., & Ombao, H. (2017). A robust interrupted time series model for analyzing complex health care intervention data. Statistics in medicine, 36(29), 4660-4676. doi:10.1002/sim.7443
This project is handled by the Biostatistics Research Group at the King Abdullah University of Science and Technology. Development and research supported by OSR KAUST research grant to the KAUST Biostatistics research group.
This software is open source licensed under a dual license MIT/GPL.