Function memmodel 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.
memmodel(i.data, i.seasons = 10, i.type.threshold = 5,
i.level.threshold = 0.95, i.tails.threshold = 1, i.type.intensity = 6,
i.level.intensity = c(0.4, 0.9, 0.975), i.tails.intensity = 1,
i.type.curve = 2, i.level.curve = 0.95, i.type.other = 3,
i.level.other = 0.95, i.method = 2, i.param = 2.8, i.n.max = -1,
i.type.boot = "norm", i.iter.boot = 10000)Data frame of input data.
Maximum number of seasons to use.
Type of confidence interval to calculate the threshold.
Level of confidence interval to calculate the threshold.
Tails for the confidence interval to calculate the threshold.
Type of confidence interval to calculate the intensity thresholds.
Levels of confidence interval to calculate the intensity thresholds.
Tails for the confidence interval to calculate the threshold.
Type of confidence interval to calculate the modelled curve.
Level of confidence interval to calculate the modelled curve.
Type of confidence interval to calculate length, start and percentages.
Level of confidence interval to calculate length, start and percentages.
Method to calculate the optimal timing of the epidemic.
Parameter to calculate the optimal timing of the epidemic.
Number of pre-epidemic values used to calculate the threshold.
Type of bootstrap technique.
Number of bootstrap iterations.
memmodel returns an object of class mem.
An object of class mem is a list containing at least the following components:
input data
Pre/post confidence intervals (Threhold is the upper limit of the confidence interval).
Mean epidemic length confidence interval.
Mean covered percentage confidence interval.
Mean length.
Moving epidemic rates.
Mean epidemic start.
Epidemic levels of intensity.
Typical epidemic curve.
Effective number of pre epidemic values.
Input data is a data frame containing rates that represent historical influenza surveillance
data. It can start and end at any given week (tipically at week 40th), and rates can be
expressed as per 100,000 inhabitants (or per consultations, if population is not
available) or any other scale.
Parameters 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). | 1 |
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 memtiming for details on the values this parameters
can have.
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.
# Castilla y Leon Influenza Rates data
data(flucyl)
# Finds the timing of the first season: 2001/2002
epi<-memmodel(flucyl)
print(epi)
summary(epi)
plot(epi)
Run the code above in your browser using DataLab