plot.disProg {surveillance} | R Documentation |
Plot Generation of the Observed and the defined Outbreak States of a
(multivariate) time series
Description
Plotting of a disProg object.
Usage
plot.disProg(x, title = "", xaxis.years=TRUE, startyear = 2001,
firstweek = 1, as.one=TRUE, same.scale=TRUE, legend=TRUE, ...)
plot.disProg.one(x, title = "", xaxis.years=TRUE, startyear = 2001, firstweek = 1, ylim=NULL, legend=TRUE, xlegpos = 1/4, ylegpos = 1,...)
Arguments
x |
Object of class disProg |
title |
Plot title |
xaxis.years |
if true , the x axis is labeled |
startyear |
Year to begin the axis labeling (the year where
the oldest data come from) |
firstweek |
Number of the first week of January in the first year
(just for axis labeling grounds) |
as.one |
if true all individual time series are shown in
one plot |
same.scale |
if true all plots have same scale |
ylim |
range of y axis |
legend |
if true a legend is shown |
xlegpos |
x position of the legend as fraction of max(xlim) |
ylegpos |
y position of legend as fraction of max(ylim) |
... |
further arguments for the function matplot |
Value
a plot |
showing the number of infected and the defined alarm status
for a time series created by simulation or given in data
either in one single plot or in several plots for each individual
time series. |
Author(s)
M. Höhle, A. Riebler, C. Lang
Examples
# Plotting of simulated data
disProgObj <- sim.pointSource(p = 0.99, r = 0.5, length = 208,
A = 1, alpha = 1, beta = 0, phi = 0,
frequency = 1, state = NULL, K = 5)
# plot the simulated disease with the defined outbreaks
plot(disProgObj)
title <- "Number of Infected and Defined Outbreak Positions for Simulated Data"
plot(disProgObj, title = title)
plot(disProgObj, title = title, xaxis.years=TRUE,
startyear = 1999, firstweek = 13)
plot(disProgObj, title = title, xaxis.years=TRUE,
startyear = 1999, firstweek = 14)
# Plotting of measels data
data(measels.weser)
# one plot
plot(measels.weser, title = "measels cases in the district Weser-Ems",
xaxis.years=TRUE, startyear= 2001, firstweek=1)
# plot cases for each "Kreis"
plot(measels.weser, same.scale=TRUE, as.one=FALSE)
[Package
surveillance version 0.9-2
Index]