memtrend is used to calculate the two parameters for defining the
current influenza trend.
This method is based on the Moving Epidemics Method (MEM) used to monitor influenza
activity in a weekly surveillance system.memtrend(i.data, i.seasons = 10)memtrend returns a list with two objects, the first one is the parameter used in
the calculations (param.seasons) and the second one (trend.thresholds) is
a matrix 1x2 with the Ascending (Delta) and Descending parameters (Eta).
1 Delta - Ascending parameter.
2 Eta - Descending parameter.
}i.seasons parameter indicates how many seasons are used for calculating
thresholds. A value of -1 indicates the program to use as many as possible. If there
are less than this parameter, the program used all seasons avalaible.
There are three different states for trend, to determine the state, the current rate
and the difference of the current and last weekly rate are needed:
2 Ascending - When the weekly rate is above the epidemic threshold and
the difference of the current and last weekly rate is higher than Delta OR this is the
first time the rate is above the epidemic threshold.
3 Descending - When the weekly rate is above the epidemic threshold
and the difference of the current and last weekly rate is lower than Eta OR this is the
first time the rate is below the epidemic threshold after having been above it.
1 Stable - Otherwise.
}library(mem)
## Castilla y Leon Influenza Rates data
data(flucyl)
## Finds the timing of the first season: 2001/2002
trend<-memtrend(flucyl)
trendRun the code above in your browser using DataLab