stsplot: Plot-Methods for Surveillance Time-Series Objects

Description Usage Arguments Details Value See Also

Description

This page gives an overview of plot types which can be produced from objects of class "sts".

Usage

1
2
  ## S4 method for signature 'sts,missing'
plot(x, type = observed ~ time | unit, ...)

Arguments

x

an object of class "sts".

type

see Details.

...

arguments passed to the type-specific plot function.

Details

There are various types of plots which can be produced from an "sts" object. The type argument specifies the desired plot as a formula, which defaults to observed ~ time | unit, i.e., plot the time series of each unit separately. Arguments to specific plot functions can be passed as further arguments (...). The following list describes the plot variants:

observed ~ time | unit

The default type shows ncol(x) plots with each containing the time series of one observational unit. The actual plotting per unit is done by the function stsplot_time1, called sequentially from stsplot_time.

observed ~ time

The observations in x are aggregated over units and the resulting univariate time-series is plotted. The plotting is done by the function stsplot_time, which takes the same arguments as the old plot.survRes function.

alarm ~ time

Generates a so called alarmplot for a multivariate sts object. For each time point and each series it is shown whether there is an alarm. In case of hierarchical surveillance the user can pass an additional argument lvl, which is a vector of the same length as rows in x specifying for each time series its level.

observed ~ unit

produces a map of counts (or incidence) per region aggregated over time. See stsplot_space for optional arguments, details and examples.

observed ~ 1 | unit

old version of the map plot, which supports shading regions with an alarm. The plotting is done by the function stsplot_spacetime. Use type=observed~unit for the new implementation as function stsplot_space (without alarm support, though).

observed ~ 1 | unit * time

old version for animated maps via the stsplot_spacetime function. Each of the nrow(x) frames contains the number of counts per region for the current row in the observed matrix. It is possible to redirect the output into files, e.g. to generate an animated GIF. NOTE: the new animate.sts method supersedes this plot type!

Value

NULL (invisibly). The methods are called for their side-effects.

See Also

the documentation of the individual plot types stsplot_time, stsplot_space, stsplot_spacetime (obsolete), as well as the animate-method animate.sts. plot.survRes is the old implementation.


jimhester/surveillance documentation built on May 19, 2019, 10:33 a.m.