laggedTSarray: Function to create an array of time series across lags using the running median
Description
This function creates an array of time series graphs, one for each lag, and displays a running median and MAD based bounds on each graph.
Usage
laggedTSarray(x, daysOfHistory, lags, ...)
Arguments
x
Object of the accrued class containing data to be plotted.
daysOfHistory
An integer greater or equal to 1. If NULL, then defaults to 30.
The number of days of previous data used to calculate the running median.
lags
A vector of nonnegative integers specifying which lagged time series will be plotted. If NULL, all lags are used.
...
Parameters to pass to plot.
Value
None.
Details
An array of graphs is produced, with the $i$th graph showing for each encounter date the cumulative counts received $i-1$ days after the encounter date, with the final graph showing the final counts. A running median and error bars are disiplayed by default. Error bars are calculated as $\pm (2)(MAD)$ (median absolute deviations) from the running median, calculated using the same running window.