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

The package can be installed from the official R repositories (CRAN) using the built-in install function:

# install the mem CRAN version
install.packages("mem")

To install the lastest development version of mem, it is recommended to install it from the sources at github.

# 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

1,700

Version

2.7

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Lozano Jose E.

Last Published

June 8th, 2017

Functions in mem (2.7)

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
flucyl

Castilla y Leon influenza crude rates
flucylraw

Castilla y Leon influenza standarised rates
extraer.datos.optimo.map

Extract optimum
extraer.datos.post.epi

Extract post-epidemic hightest rates
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.
calcular.optimo

calculates optimum generic function
calcular.optimo.criterio

calculates optimum: fixed criteria for slope
extraer.datos.pre.epi

Extract pre-epidemic hightest rates
fill.missing

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

confidence interval for a point (using arithmetic mean)
max.n.valores

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

Moving Epidemic Method R Package
memintensity

Thresholds for influenza intensity
memmodel

Methods for influenza modelization
memtrend

Methods for influenza trend calculation
min.fix.na

min function, removing Inf and -Inf
processPlots

Full process plots for mem
roc.analysis

ROC analysis to find optimum parameter value
max.fix.na

max function, removing Inf and -Inf
memstability

Stability of indicators
memsurveillance

Creates the surveillance graph of the current season
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.
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
full.series.graph

Creates the historical series graph of the datasets
iconfianza

generic confidence interval calculation function
calcular.indicadores

Calculates specificity and sensitivity
calcular.map

calculates map curve
iconfianza.percentil.boot

confidence interval por the median using bootstrap methods
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
iconfianza.geometrica

confidence interval for the geometric mean using the log-normal approximation
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
iconfianza.percentil.kc

confidence interval por the median using KC Method
memevolution

evolution of estimators
memgoodness

Goodness of fit of the mem
calcular.optimo.pendiente

calculates optimum: slope matches the overall slope
comparar.metodos

Compares outputs from two methods of locating the epidemic
extraer.datos.curva.map

Extract map curve
extraer.datos.epi

Extract epidemic hightest rates
suavizado

smoothing regression function
memsurveillance.animated

Creates the animated surveillance graph of the current season
memtiming

Influenza Epidemic Timing
transformdata

Data transformation
transformdata.back

Data transformation
optimum.by.inspection

Inspection calcultation of the optimum
output.ci

function to format output
transformseries.twowaves

fills in missing values inside the season with smoothing regression
transformseries

Transformation of series of data
transformseries.odd

fills in missing values inside the season with smoothing regression