Description Usage Arguments Details Value Author(s) References Examples

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.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ```
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.centering = -1,
i.n.max = -1,
i.type.boot = "norm",
i.iter.boot = 10000,
i.mem.info = T
)
``` |

`i.data` |
Data frame of input data. |

`i.seasons` |
Maximum number of seasons to use. |

`i.type.threshold` |
Type of confidence interval to calculate the threshold. |

`i.level.threshold` |
Level of confidence interval to calculate the threshold. |

`i.tails.threshold` |
Tails for the confidence interval to calculate the threshold. |

`i.type.intensity` |
Type of confidence interval to calculate the intensity thresholds. |

`i.level.intensity` |
Levels of confidence interval to calculate the intensity thresholds. |

`i.tails.intensity` |
Tails for the confidence interval to calculate the threshold. |

`i.type.curve` |
Type of confidence interval to calculate the modelled curve. |

`i.level.curve` |
Level of confidence interval to calculate the modelled curve. |

`i.type.other` |
Type of confidence interval to calculate length, start and percentages. |

`i.level.other` |
Level of confidence interval to calculate length, start and percentages. |

`i.method` |
Method to calculate the optimal timing of the epidemic. |

`i.param` |
Parameter to calculate the optimal timing of the epidemic. |

`i.centering` |
Number of weeks to center the moving seasons. |

`i.n.max` |
Number of pre-epidemic values used to calculate the threshold. |

`i.type.boot` |
Type of bootstrap technique. |

`i.iter.boot` |
Number of bootstrap iterations. |

`i.mem.info` |
include information about the package in the graph. |

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 Nyblom/normal aproximation 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 `3`

uses the Hettmansperger and Sheather (1986) and Nyblom (1992) method,
when there is enough sample size. If sample size is small, then the normal aproximation
will be used as described in Conover, 1980, p. 112. Refer to EnvStats package for
more information.

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.

It is important to know how to arrange information in order to use with memapp. The key points are:

One single epidemic wave each season.

Never delete a rate inside an epidemic.

Accommodate week 53.

Do not inflate missing values with zeroes.

Data must contain information from the historical series. Surveillance period can start and end at any given week (typically start at week 40th and ends at week 20th), and data can have any units and can be expressed in any scale (typically rates per 100,000 inhabitants or consultations).

The table must have one row per epidemiological week and one column per surveillance season. A season is a full surveillance period from the beginning to the end, where occurs at some point one single epidemic wave on it. No epidemic wave can be spared in two consecutive seasons. If so, you have to redefine the start and end of the season defined in your dataset. If a season have two waves, it must be split in two periods and must be named accordingly with the seasons name conventions described below. Each cell contains the value for a given week in a given season.

The first column should contain the names of the weeks. When the season contains two different calendar years, the week will go from 40th of the first year to 52nd, and then from 1st to 20th. When the season contains one year, the weeks will go from 1st to 52nd.

Note: If there is no column with week names, the application will name the weeks numbering from 1 to the number of rows.

In the northern hemisphere countries, the surveillance period usually goes from week 40 to 20 of the following year (notation: season 2016/2017).

In the southern hemisphere countries, the surveillance period usually goes from week 18 to 39 same year (notation: season 2017).

The first row must contain the names of the seasons. This application understand the naming of a season when it contains one or two four digits year separated by / and one one-digit number between parenthesis to identify the wave number. The wave number part in a name of a season is used when a single surveillance period has two epidemic waves that have to be separated in order to have reliable results. In this case, each wave is placed in different columns and named ending with (1) for the first period, (2) for the second, and so on.

`memmodel`

returns an object of class `mem`

.
An object of class `mem`

is a list containing at least the following components:

i.data input data

pre.post.intervals Pre/post confidence intervals (Threhold is the upper limit of the confidence interval).

ci.length Mean epidemic length confidence interval.

ci.percent Mean covered percentage confidence interval.

mean.length Mean length.

moving.epidemics Moving epidemic rates.

mean.start Mean epidemic start.

epi.intervals Epidemic levels of intensity.

typ.curve Typical epidemic curve.

n.max Effective number of pre epidemic values.

Jose E. Lozano lozalojo@gmail.com

Vega T, Lozano JE, Ortiz de Lejarazu R, Gutierrez Perez M. Modelling influenza epidemic - can we detect the beginning and predict the intensity and duration? Int Congr Ser. 2004 Jun;1263:281-3.

Vega T, Lozano JE, Meerhoff T, Snacken R, Mott J, Ortiz de Lejarazu R, et al. Influenza surveillance in Europe: establishing epidemic thresholds by the moving epidemic method. Influenza Other Respir Viruses. 2013 Jul;7(4):546-58. DOI:10.1111/j.1750-2659.2012.00422.x.

Vega T, Lozano JE, Meerhoff T, Snacken R, Beaute J, Jorgensen P, et al. Influenza surveillance in Europe: comparing intensity levels calculated using the moving epidemic method. Influenza Other Respir Viruses. 2015 Sep;9(5):234-46. DOI:10.1111/irv.12330.

Lozano JE. lozalojo/mem: Second release of the MEM R library. Zenodo [Internet]. [cited 2017 Feb 1]; Available from: https://zenodo.org/record/165983. DOI:10.5281/zenodo.165983

Hettmansperger, T. P., and S. J Sheather. 1986. Confidence Intervals Based on Interpolated Order Statistics. Statistics and Probability Letters 4: 75-79. doi:10.1016/0167-7152(86)90021-0.

Nyblom, J. 1992. Note on Interpolated Order Statistics. Statistics and Probability Letters 14: 129-31. doi:10.1016/0167-7152(92)90076-H.

Conover, W.J. (1980). Practical Nonparametric Statistics. Second Edition. John Wiley and Sons, New York.

1 2 3 4 5 6 7 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.