epimem is used to calculate the threshold for influenza epidemic using historical records (surveillance rates).
The method to calculate the threshold is described in the Moving Epidemics Method (MEM) used to monitor influenza activity in a weekly surveillance system.epimem(i.data, i.type = 2, i.level = 0.95, i.type.curve = 2, i.level.curve = 0.95, i.type.threshold = 5, i.level.threshold = 0.95, i.n.max = -1, i.tails = 1, i.type.boot = "norm", i.iter.boot = 10000, i.method = 2, i.param = 2.8, i.levels = c(0.40,0.90,0.975), i.seasons = 10)
## S3 method for class 'flu':
print(x, ...)
## S3 method for class 'flu':
summary(object, ...)
## S3 method for class 'flu':
plot(x, ...)flu class item.flu class item.epimem returns an object of class flu.
An object of class flu is a list containing at least the following components:i.type, i.type.threshold and i.type.curve defines how to calculate confidence intervals along the process.
i.type.curve is used for calculating the typical influenza curve, i.type.threshold is used to calculate the pre and post epidemic threshold and i.type is used for any other confidende interval used in the method.
All three parameters must be a number between 1 and 6:
1 Arithmetic mean and mean confidence interval.
2 Geometric mean and mean confidence interval.
3 Median and the KC Method to calculate its confidence interval.
4 Median and bootstrap confidence interval.
5 Arithmetic mean and point confidence interval (standard deviations).
6 Geometric mean and point confidence interval (standard deviations).
}
Option 4 uses two more parameters: i.type.boot indicates which bootstrap method to use. The values are the same of those of the boot.ci function. Parameter i.iter.boot indicates the number of bootstrap samples to use. See boot for more information about this topic.
Parameters i.level, i.level.threshold and i.level.curve indicates, respectively, the level of the confidence intervals described above.
The i.n.max parameter indicates how many pre epidemic values to use to calculate the threshold. A value of -1 indicates the program to use an appropiate number of points depending on the number of seasons provided as input. i.tails tells the program to use {1} or {2} tailed confidence intervals when calculating the threshold (1 is recommended).
Parameters i.method and i.param indicates how to find the optimal timing of the epidemics. See epitiming for details on the values this parameters can have.library(mem)
## Castilla y Leon Influenza Rates data
data(flucyl)
## Finds the timing of the first season: 2001/2002
epi<-epimem(flucyl)
print(epi)
summary(epi)
plot(epi)Run the code above in your browser using DataLab