Description Usage Arguments Value Author(s) See Also Examples
The evalALERT
function uses the ALERT algorithm to test a rule (either minPercent
or maxDuration
) on hospital influenza data. For each season in the dataset, createALERT
finds an optimal ALERT threshold
when leaving that year out. Then applyALERT
tests that threshold
in that year. The metrics are saved and summarized.
1 2 3 |
data |
the historical data to use in the analysis. A data frame with a 'Date' column (must be |
minPercent |
specify the minimum percent of cases to be captured at least 50% of the time by ALERT. This enables automated threshold selection. |
maxDuration |
specify the maximum number of weeks to be captured at least 50% of the time by ALERT. This enables automated threshold selection. |
firstMonth |
month number which is counted as the first month of the 'flu year' |
lag |
lag time between report date and action taken |
minWeeks |
minimum number of weeks to be in ALERT |
allThresholds |
if |
k |
the number of weeks around the peak to evaluate ALERT coverage for |
target.pct |
the percentage of cases the user is targeting during the ALERT period when |
caseColumn |
the name of the column with the case counts in it. Defaults to 'Cases'
testing |
Returns a table with the following columns:
season |
each flu season in the |
threshold |
the minimum threshold number of cases needed to begin the ALERT period |
tot.cases |
total number of cases for the season |
duration |
duration of the ALERT period |
ALERT.cases |
total number of cases in the ALERT period |
ALERT.cases.pct |
fraction of cases in the ALERT period |
peak.captured |
1 if peak was captured, 0 otherwise |
peak.ext.captured |
1 if peak +/- |
low.weeks.incl |
the number of weeks included in the ALERT period with counts less than |
duration.diff |
if |
Each row in the table represents a season from the data. The final row outputs summary statistics: the median of threshold
, tot.cases
, duration
, ALERT.cases
, and ALERT.cases.pct
and the mean of peak.captured
, peak.ext.captured
, low.weeks.incl
, and duration.diff
.
Nicholas G Reich and Stephen A Lauer
robustALERT
cross-validates ALERT output under a set of rules
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.