epitiming is used to find the optimal timing of an influenza epidemic in a set of weekly influenza surveillance rates. It provides the start and the end of the epidemic, also it returns a list of pre-epidemic and post-epidemic rates that can be used to calculate influenza baselines and thresholds.
The method to calculate the optimal timing of an epidemic is described as part of the Moving Epidemics Method (MEM), used to monitor influenza activity in a weekly surveillance system.epitiming(i.data, i.n.values = 5, i.method = 2, i.param = 2.8)
## S3 method for class 'epidemic':
print(x, ...)
## S3 method for class 'epidemic':
summary(object, ...)
## S3 method for class 'epidemic':
plot(x, ...)epidemic class item.epidemic class item.epitiming returns an object of class epidemic.
An object of class epidemic is a list containing at least the following components:i.n.values parameter is used to get information from the pre-epidemic and post-epidemic period. The function will extract the highest pre/post values in order to use it later to calculate other influenza indicators, such as baseline activity or threshold for influenza epidemic.
Depending of the value i.method, the function will use a different method to calculate the optimum epidemic timing.
i.param: for the fixed criterium method is the predefined value to find the optimum, which typically is 2.5-3.0%, and for the original method it is needed the window parameter to smooth the map curve. A value of -1 indicates it should use h.select to select the window parameter. See sm for more information about this topic.library(mem)
## Castilla y Leon Influenza Rates data
data(flucyl)
## Finds the timing of the first season: 2001/2002
tim<-epitiming(flucyl[1])
print(tim)
summary(tim)
plot(tim)Run the code above in your browser using DataLab