get_below_baseline_idx: Compute first week when incidence falls below baseline and...

Description Usage Arguments Value

Description

Compute first week when incidence falls below baseline and remains below for at least lookahead_length weeks in a row.

Usage

1
get_below_baseline_idx(trajectory, baseline, lookahead_length)

Arguments

trajectory

a numeric vector with incidence for each time point in a season

baseline

the threshold that incidence must cross

lookahead_length

number of consecutive time points that incidence must fall below the baseline threshold (default 3)

Value

the smallest index i such that every entry of trajectory[seq(from = i, length = lookahead_length)] is < baseline, if such an index exists. Otherwise, NA_integer_


reichlab/cdcForecastUtils documentation built on May 6, 2020, 10:43 a.m.