applyALERT: Producing seasonal ALERT output

Description Usage Arguments Value Author(s) See Also Examples

View source: R/ALERT.R

Description

The applyALERT function (often called by createALERT or evalALERT) takes one year of data and a threshold and calculates metrics.

Usage

1
2
applyALERT(data, threshold, k = 0, lag = 7, minWeeks = 8,
  target.pct = NULL, plot = FALSE, caseColumn = "Cases")

Arguments

data

a single season of surveillance data

threshold

the ALERT threshold to apply

k

the number of weeks around the peak to evaluate ALERT coverage for

lag

lag time in days between report date and action taken

minWeeks

minimum number of weeks to be in ALERT

target.pct

the percentage of cases the user is targeting during the ALERT period (optional)

caseColumn

the name of the column with the case counts in it. Defaults to 'Cases'

plot

TRUE/FALSE, whether a plot should be generated (currently unavailable)

Value

Returns a vector with the following elements:

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 +/- k weeks captured, 0 otherwise

low.weeks.incl

the number of weeks included in the ALERT period with counts less than threshold

duration.diff

if target.pct specified, the difference between the duration of the ALERT period and the duration of the shortest period needed to capture target.pct using postcastALERT.

Author(s)

Nicholas G Reich and Stephen A Lauer

See Also

createALERT, evalALERT, robustALERT

Examples

1
2
3
## Find the ALERT metrics of a season with a threshold of 3
data(fluData)
applyALERT(data=fluData, threshold=3, k=2, target.pct=0.85)

reichlab/ALERT documentation built on Jan. 8, 2020, 7:26 p.m.