Automated analysis and re-basing of run charts at scale.

Online documentation and vignettes : runcharter

Build Status Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. Coverage status


You can install runcharter from github with:

The rationale for the package is to analyse multiple run charts at once. More importantly, the package will identify a run of n successive points on the desired side of the median line, and will recalculate / rebase the median accordingly. Each time a run occurs, the median will be rebased. This helps to track improvements over time.

The default is to plot a faceted plot, allowing ggplot2 to handle the axis limits. You can specify the number of columns in the faceted plot however, and you can also specify the breaks for date labels on the x axis.

Function arguments and defaults

A default run of 9 is specified as that is the length of run used by the IHI for its patient safety initiatives worldwide.

The function will return a plot and a summary table showing the original baseline medians, and any sustained runs of improvement beyond the baseline period.

Runs in both directions

Th package allows for finding runs in both directions (above and below the median). Generally, for improvement purposes, you would only need to identify runs in one direction at a time. In other words, if you are trying to reduce adverse events, improvement will be evidenced with a run below the median. Therefore, you would not rebase the median if a run of points above the median was observed.

However, for longer term monitoring, it may be necessary to identify and ‘reset’ a median if a sustained deterioration in performance occurs. Ideally, you should move to using SPC charts for monitoring purposes.

Design decisions and similar packages

This package makes no attempt to identify or highlight ‘trends’ (consecutively increasing or decreasing points) or shorter ‘shifts’ of runs below the median. In 8 years of working with QI data, I very rarely see trends, and when they do appear, they tend to result after a period of process degradation, when the process begins to return back to its natural median state.

In addition, research by qicharts2 author Jacob Anheoj shows that the trend rule is not reliable. There are no plans to add tests to identify trends to the package functionality.

If you want to apply the rules for trend , in addition to rebasing run charts, then you should consider using the runchart package by Joseph Adams.

qicharts2 creates run and SPC charts. These can be rebased, but you must specify when to do so. Also, the analysis is based on the author’s own rules and not the rules typically used in healthcare (e.g. the rules promoted by the IHI).