algo.rki: The system used at the RKI

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/algo_rki.R

Description

Evaluation of timepoints with the detection algorithms used by the RKI

Usage

1
2
3
4
5
6
7
    algo.rkiLatestTimepoint(disProgObj, timePoint = NULL,
         control = list(b = 2, w = 4, actY = FALSE))
    algo.rki(disProgObj, control = list(range = range,
         b = 2, w = 4, actY = FALSE))
    algo.rki1(disProgObj, control = list(range = range))
    algo.rki2(disProgObj, control = list(range = range))
    algo.rki3(disProgObj, control = list(range = range))

Arguments

disProgObj

object of class disProg (including the observed and the state chain).

timePoint

time point which shoud be evaluated in algo.rkiLatestTimepoint. The default is to use the latest timepoint.

control

control object: range determines the desired timepoints which should be evaluated, b describes the number of years to go back for the reference values, w is the half window width for the reference values around the appropriate timepoint and actY is a boolean to decide if the year of timePoint also spend w reference values of the past. As default b, w, actY are set for the RKI 3 system.

Details

Using the reference values for calculating an upper limit (threshold), alarm is given if the actual value is bigger than a computed threshold. algo.rki calls algo.rkiLatestTimepoint for the values specified in range and for the system specified in control. algo.rki1 calls algo.rkiLatestTimepoint for the values specified in range for the RKI 1 system. algo.rki2 calls algo.rkiLatestTimepoint for the values specified in range for the RKI 2 system. algo.rki3 calls algo.rkiLatestTimepoint for the values specified in range for the RKI 3 system.

  • "RKI 1" reference values from 6 weeks ago

  • "RKI 2" reference values from 6 weeks ago and 13 weeks of the year ago (symmetrical around the comparable week).

  • "RKI 3" 18 reference values. 9 from the year ago and 9 from two years ago (also symmetrical around the comparable week).

Value

survRes

algo.rkiLatestTimepoint returns a list of class survRes (surveillance result), which includes the alarm value (alarm = 1, no alarm = 0) for recognizing an outbreak, the threshold value for recognizing the alarm and the input object of class disProg.

algo.rki gives a list of class survRes which includes the vector of alarm values for every timepoint in range, the vector of threshold values for every timepoint in range for the system specified by b, w and actY, the range and the input object of class disProg. algo.rki1 returns the same for the RKI 1 system, algo.rki2 for the RKI 2 system and algo.rki3 for the RKI 3 system.

Author(s)

M. Höhle, A. Riebler, Christian Lang

See Also

algo.bayesLatestTimepoint and algo.bayes for the Bayes system.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
    # Create a test object
    disProgObj <- sim.pointSource(p = 0.99, r = 0.5, length = 208, A = 1,
                                      alpha = 1, beta = 0, phi = 0,
                                      frequency = 1, state = NULL, K = 1.7)

    # Test week 200 to 208 for outbreaks with a selfdefined rki
    algo.rki(disProgObj, control = list(range = 200:208, b = 1,
                                            w = 5, actY = TRUE))
    # The same for rki 1 to rki 3
    algo.rki1(disProgObj, control = list(range = 200:208))
    algo.rki2(disProgObj, control = list(range = 200:208))
    algo.rki3(disProgObj, control = list(range = 200:208))

    # Test for rki 1 the latest timepoint
    algo.rkiLatestTimepoint(disProgObj)

surveillance documentation built on May 21, 2017, 1:35 a.m.

Search within the surveillance package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.