plot_syndromic-methods: 'plot_syndromic'

plot_syndromicR Documentation

plot_syndromic

Description

A more specific plotting option, with more control over the options of which elements of the syndromic (syndromicD or syndromicW) object to plot. The user can use the general "plot" function of R for a syndromic object as well.

Usage

plot_syndromic(x, ...)

## S4 method for signature 'syndromicD'
plot_syndromic(x, syndromes = NULL, window = 365,
  baseline = TRUE, UCL = 1, algorithms = NULL, limit = 1)

## S4 method for signature 'syndromicW'
plot_syndromic(x, syndromes = NULL, window = 52,
  baseline = TRUE, UCL = 1, algorithms = NULL, limit = 1)

Arguments

x

a syndromic (syndromicD or syndromicW) object.

...

Additional arguments to the method.

syndromes

an optional parameter, if not specified, all columns in the slot observed (or baseline of the syndromic object will be used. The user can choose to restrict the plotting to a few syndromic groups listing their name or column position in the observed matrix. See examples.

window

the number of time points to plot, always finishing at the last time point recorded.

baseline

whether to plot the baseline, by default equal to TRUE.

UCL

the dimension of the slot UCL, from the syndromic object, from which the user wants to plot the UCL. Set to NULL or to 0 if it is not desired to plot the UCL.

algorithms

an optional parameter specifying which dimensions of the alarm slot to plot. If not specified (NULL), all are plotted. If set to zero, none are plotted.

limit

an optional parameter establishing a score above which alarms are considered worth of notice. Notice that this is not a statistical value, but a score equivalent to the number of algorithms employed and the number of limits set to them. See the tutorial for details.

Examples

data(lab.daily)
my.syndromicD <- raw_to_syndromicD (id=SubmissionID,
                                 syndromes.var=Syndrome,
                                 dates.var=DateofSubmission,
                                 date.format="%d/%m/%Y",
                                 remove.dow=c(6,0),
                                 add.to=c(2,1),
                                 data=lab.daily)
my.syndromicD <- holt_winters_synd(x=my.syndromicD,
                                evaluate.window=30,
                                frequency=5,
                                baseline.window=260)
plot_syndromic(x=my.syndromicD,
              syndromes=c(1,3))
plot_syndromic(x=my.syndromicD,
              syndromes=c(1,3),
              limit=NULL)
      ## WEEKLY
data(lab.daily)
my.syndromicW <- raw_to_syndromicW (id=SubmissionID,
                                 syndromes.var=Syndrome,
                                 dates.var=DateofSubmission,
                                 date.format="%d/%m/%Y",
                                 data=lab.daily)
my.syndromicW <- ewma_synd(x=my.syndromicW,
                          evaluate.window=10,
                          limit.sd=c(2.5,3,3.5),
                          pre.process="diff",
                          diff.window=4)
plot_syndromic(x=my.syndromicW)
plot_syndromic(x=my.syndromicW,
              syndromes=c(1,3),
              limit=NULL)
              

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