Function `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.

1 2 3 4 5 6 7 |

`i.data` |
a numeric object (or one that can be coerced to that class). |

`i.n.values` |
a number, which indicates how many pre-epidemic values are taken from the pre-epidemic period. |

`i.method` |
a number from 1 to 4, to select which optimization method to use. |

`i.param` |
an optional parameter used by the method. |

`x` |
An |

`object` |
An |

`...` |
Not used. |

Input data is a vector of rates that represent a full influenza surveillance season.
It can start and end at any 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.

The `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.

[1] | original method | |

[2] | fixed criterium method | |

[3] | slope method | |

[4] | second derivative method | |

All methods are based upon the MAP curve, as described in the MEM Method.

The *original method* uses the process shown in the original paper, which describes
the MEM as it was created. The *fixed criterium method* is an update of the MEM
that uses the slope of the MAP curve fo find the optimum, which is the point where the
slope is lower than a predefined value. The *slope method* also calculates the
slope of the MAP curve, but the optimum is the one that matches the global/mean slope.
The *second derivative method* calculates the second derivative and equals to zero
to search an inflexion point in the original curve.

Two of the four methods require an additional parameter `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.

`epitiming`

returns an object of class `epidemic`

.
An object of class `epidemic`

is a list containing at least the following components:

`i.data ` |
input data |

`map.curve ` |
MAP curve |

`optimum.map ` |
optimum |

`pre.epi ` |
pre-epidemic highest rates |

`post.epi ` |
post-epidemic highest rates |

Jose E. Lozano Alonso <lozalojo@jcyl.es>.

Vega T., Lozano J.E. (2004) Modelling influenza epidemic - can we detect the beginning
and predict the intensity and duration? International Congress Series 1263 (2004)
281-283.

Vega T., Lozano J.E. (2012) Influenza surveillance in Europe: establishing epidemic
thresholds by the Moving Epidemic Method. Influenza and Other Respiratory Viruses,
DOI:10.1111/j.1750-2659.2012.00422.x.

1 2 3 4 5 6 7 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.