ears_t_reweighted {epitweetr}R Documentation

algorithm for outbreak detection, extends the EARS algorithm

Description

The simple 7 day running mean version of the Early Aberration Reporting System (EARS) algorithm is extended as follows:

Usage

ears_t_reweighted(
  ts,
  alpha = 0.025,
  alpha_outlier = 0.05,
  k_decay = 4,
  no_historic = 7L,
  same_weekday_baseline = FALSE
)

Arguments

ts

A numeric vector containing the counts of the univariate time series to monitor. The last time point in ts is investigated

alpha

The alpha is used to compute the upper limit of the prediction interval: (1-alpha) * 100%, default: 0.025

alpha_outlier

Residuals beyond 1-alpha_outlier quantile of the the t(n-k-1) distribution are downweighted, default: 0.05

k_decay

Power k in the expression (r_star/r_threshold)^k determining the weight, default: 4

no_historic

Number of previous values i.e -1, -2, ..., no_historic to include when computing baseline parameters, default: 7

same_weekday_baseline

whether to calculate baseline using same weekdays or any day, default: FALSE

Details

for algorithm details see package vignette.

Value

A dataframe containing the monitored time point, the upper limit and whether a signal is detected or not.

Author(s)

Michael Hoehle <https://www.math.su.se/~hoehle>

Examples

if(FALSE){
   library(epitweetr)
   #Running the modifies version of the ears algorithm for a particular data series
    ts <- c(150, 130, 122, 160, 155, 128, 144, 125, 300, 319, 289, 277, 500)
    show(ears_t_reweighted(ts))
}

[Package epitweetr version 2.2.16 Index]