syndromicW-class: Class '"syndromicW"'

syndromicW-classR Documentation

Class "syndromicW"

Description

Syndromic is the main class of the vetsyn package, but it has been specified for different types of data streams. syndromicD is the class used for data that are recorded and monitored DAILY, while syndromicW is used when the time points for monitoring refer to WEEKS.

Details

The syndromicD or syndromicW classes store observed data in a format appropriate for monitoring, and contain several slots to store input and outputs of analysis (temporal monitoring). Functions are available to create an object of the class syndromic from data already cleaned and prepared for monitoring, or alternatively from raw observed data.

Slots

  • observed A matrix with the number of rows equal to the number of time points available (i.e., the number of DAYS of observed data for syndromicD, or the number of WEEKS for syndromicW); and number of columns equal to the number of syndromes monitored.

  • dates A DataFrame which first column contains the dates corresponding to the observations recorded. In syndromicD the dates are recorded in the format "yyyy-mm-dd" in the first columns, and additional columns contain additional information extracted from the date, such as day-of-the-week, month, holidays, etc. For syndromicW the first column contains the week in the ISOweek format, and additional columns give the week and year in the numerical format.

  • baseline A matrix of dimensions exactly equal to the slot observed, where observed data have been cleaned in order to remove excess noise and/or outbreak signals, generating an outbreak-free time series that should be used as baseline for the detection algorithms.

  • alarms An array containing the results of the outbreak-signal detection algorithms, for each of the time series being monitored (columns in observed). Alarms can be registered as binary values (0 for no alarm and 1 for alarm) or as a ordinal value representing an alarm level (for instance 0-5). The first and second dimensions (rows and columns) correspond to the dimensions of the time series monitored, but a third dimension can be added when multiple detection algorithms are used.

  • UCL An array containing the upper confidence limit (UCL) of the outbreak-signal detection algorithms, for each of the time series being monitored (columns in observed). The first and second dimensions (rows and columns) correspond to the dimensions of the time series monitored, but a third dimension can be added when multiple detection algorithms are used. Whether an alarm is registered or not, this dimension can be used to record the minimum number that would have generated an alarm.

  • LCL An array containing the lower confidence limit (LCL) of the outbreak-signal detection algorithms, for each of the time series being monitored ( columns in the slot observed), when detection is based (also) on the detection of decreases in the number of observations. The first and second dimensions (rows and columns) correspond to the dimensions of the time series monitored, but a third dimension can be added when multiple detection algorithms are used. Whether an alarm is registered or not, this dimension can be used to record the maximum number that would have generated an alarm.

  • formula A formula, or list of formulas, specifying the regression formula to be used when removing temporal patterns from each of the syndromes in @observed. For instance formula=y~dow+mon for a single syndrome, where regression must take into account the variables dow (day-of-week) and month; or formula=list(y~dow+mon) specifying two different formulas for two syndromes. The names of the variables given should exist in the columns of the slot "dates". Make sure that formulas index match the columns in observed (for instance the second formula should correspond to the second syndrome, or second column in the observed matrix).You can provide NA for syndromes which should not be associated with any formula. This parameter is often only filled after some analysis in the data, not at the time of object creation.

Examples

## Load data
data(observedW)
my.syndromicW <- syndromicW(observed,min.week=1, min.year=2011, 
                              max.week=22, max.year=2013)


nandadorea/vetsyn documentation built on April 30, 2022, 1:15 a.m.