Learn R Programming

⚠️There's a newer version (2.19) of this package.Take me there.

The Moving Epidemics Method R Package

Overview

This is the R package of the Moving Epidemics Method

Installation

# in case you dont have devtools installed, install it
install.packages(devtools)

# install the new package from github
devtools::install_github("lozalojo/mem")

Usage

# load the library
library("mem")

# run the help
help("mem")

References

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.

Copy Link

Version

Install

install.packages('mem')

Monthly Downloads

762

Version

2.5

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Lozano Jose E.

Last Published

June 1st, 2017

Functions in mem (2.5)

calcular.indicadores

Calculates specificity and sensitivity
calcular.map

calculates map curve
calcular.optimo.derivada

calculates optimum: second derivative equals 0 (change signs from - to +, or + to -)
calcular.optimo.original

calculates optimum: original method: second derivative + axis change
calcular.optimo

calculates optimum generic function
calcular.optimo.criterio

calculates optimum: fixed criteria for slope
calcular.optimo.pendiente

calculates optimum: slope matches the overall slope
comparar.metodos

Compares outputs from two methods of locating the epidemic
add.alpha

Add an alpha value to a colour http://www.magesblog.com/2013/04/how-to-change-alpha-value-of-colours-in.html
calcular.indicadores.2.timings

Calculates specificity and sensitivity
extraer.datos.curva.map

Extract map curve
extraer.datos.epi

Extract epidemic hightest rates
extraer.datos.pre.epi

Extract pre-epidemic hightest rates
fill.missing

fills in missing values inside the season with smoothing regression
max.n.valores

highest n values of a data set, removing Inf and -Inf
mem-package

Moving Epidemic Method R Package
memsurveillance.animated

Creates the animated surveillance graph of the current season
memtiming

Influenza Epidemic Timing
normalizar

standarize data to [0,1] interval
optimal.tickmarks

Find tickmarks for a given range of the y-axis that best fit an optimal number of tickmarks you decide. f.i: what if i want to have a graph with 8 tickmarks in a range of 34 to 345
transformseries

Transformation of series of data
transformseries.odd

fills in missing values inside the season with smoothing regression
flucyl

Castilla y Leon influenza crude rates
flucylraw

Castilla y Leon influenza standarised rates
iconfianza.percentil.boot

confidence interval por the median using bootstrap methods
extraer.datos.optimo.map

Extract optimum
extraer.datos.post.epi

Extract post-epidemic hightest rates
iconfianza.geometrica

confidence interval for the geometric mean using the log-normal approximation
iconfianza.aritmetica

confidence interval for the arithmetic mean using the normal approximation
iconfianza.completo

Int. Confianza de 2 y 1 cola, por encima y por debajo. De la media y el punto.
memstability

Stability of indicators
iconfianza.logx

confidence interval for a point (using log transformation and geometric mean)
semana.absoluta

Transforms relative weeks to absolute weeks in a 1-52 normal season
suavizado

smoothing regression function
transformdata

Data transformation
memsurveillance

Creates the surveillance graph of the current season
transformseries.twowaves

fills in missing values inside the season with smoothing regression
iconfianza.percentil.kc

confidence interval por the median using KC Method
memintensity

Thresholds for influenza intensity
memmodel

Methods for influenza modelization
optimum.by.inspection

Inspection calcultation of the optimum
output.ci

function to format output
transformdata.back

Data transformation
memevolution

evolution of estimators
memgoodness

Goodness of fit of the mem
processPlots

Full process plots for mem
roc.analysis

ROC analysis to find optimum parameter value
full.series.graph

Creates the historical series graph of the datasets
iconfianza

generic confidence interval calculation function
iconfianza.x

confidence interval for a point (using arithmetic mean)
max.fix.na

max function, removing Inf and -Inf
memtrend

Methods for influenza trend calculation
min.fix.na

min function, removing Inf and -Inf
min.n.valores

lowest n values of a data set, removing Inf and -Inf
missings.inside

returns position of missing values inside the season. Leading and trailing missing values are not considered.