Learn R Programming

mem (version 2.5)

memsurveillance.animated: Creates the animated surveillance graph of the current season

Description

Function memsurveillance.animated creates an animated surveillance graph for the current season.

Usage

memsurveillance.animated(i.current, i.epidemic.thresholds = NA,
  i.intensity.thresholds = NA, i.output = ".", i.animated.graph.file = T,
  i.animated.graph.file.name = "", i.delay = 100, i.loop = 0,
  i.remove = T, ...)

Arguments

i.current

Current season weekly rates.

i.epidemic.thresholds

Pre and post epidemic threholds.

i.intensity.thresholds

Intensity thresholds.

i.output

Directory where graph is saved.

i.animated.graph.file

If a animated gif should be produced, or just the intermediate graphics

i.animated.graph.file.name

Name of the animated graph.

i.delay

Delay between frames of the animated gif.

i.loop

Number of loops for the animated dif, 0 for Infinite.

i.remove

Remove partial graphs.

...

Additional parameters parsed to memsurveillance.

Value

memsurveillance.animated writes a gif graph of the surveillance of this season.

Details

Input data must be the current season and an object of class mem. The output graph contains the weekly rates series along with the epidemic and intensity threshols located at the exact situation where the epidemic started. If there is no epidemic yet, only the epidemic threshold is placed.

References

Vega Alonso, Tomas, Jose E Lozano Alonso, Raul Ortiz de Lejarazu, and Marisol Gutierrez Perez. 2004. Modelling Influenza Epidemic: Can We Detect the Beginning and Predict the Intensity and Duration? International Congress Series, Options for the Control of Influenza V. Proceedings of the International Conference on Options for the Control of Influenza V, 1263 (June): 281-83. doi:10.1016/j.ics.2004.02.121. Vega, Tomas, Jose Eugenio Lozano, Tamara Meerhoff, Rene Snacken, Joshua Mott, Raul Ortiz de Lejarazu, and Baltazar Nunes. 2013. Influenza Surveillance in Europe: Establishing Epidemic Thresholds by the Moving Epidemic Method. Influenza and Other Respiratory Viruses 7 (4): 546-58. doi:10.1111/j.1750-2659.2012.00422.x. Vega, Tomas, Jose E. Lozano, Tamara Meerhoff, Rene Snacken, Julien Beaute, Pernille Jorgensen, Raul Ortiz de Lejarazu, et al. 2015. Influenza Surveillance in Europe: Comparing Intensity Levels Calculated Using the Moving Epidemic Method. Influenza and Other Respiratory Viruses 9 (5): 234-46. doi:10.1111/irv.12330.

Examples

Run this code
# Castilla y Leon Influenza Rates data
data(flucyl)
# Data of the last season
cur<-flucyl[8]
# The model
epi<-memmodel(flucyl[1:7])
# Epidemic thresholds
e.thr<-epi$epidemic.thresholds
# Intensity threhsolds
i.thr<-epi$intensity.thresholds
# Set the working directory to whererever you want to store the graph file
setwd(".")
m1<-a<-memsurveillance.animated(cur, i.animated.graph.file.name="Animated",
i.epidemic.thresholds = e.thr,i.intensity.thresholds = i.thr, i.pos.epidemic = TRUE)

Run the code above in your browser using DataLab