EpiIndicators {EpiInvert} | R Documentation |
EpiIndicators
Description
EpiIndicators estimates the ratio, r(t), and shift(delay), s(t), between 2 epidemiological indicators f(t) and g(t) following the relation r(t)*f(t) = g(t+s(t))
Usage
EpiIndicators(df, config = EpiIndicators_params())
Arguments
df |
a dataframe with 3 columns: the first column corresponds to the date of each indicator value, the second column is the value of the first indicator f(t) and the third column is the value of the second indicator g(t). A zero value is expected in the case that the real value of an indicator is not available. Indicators must be smooth functions. So, for instance, the raw registered number of cases or deaths are not adequate to run the function. These particular indicators should be smoothed before executing EpiIndicators(), for instance you can use the restored indicator values obtained by EpiInvert() |
config |
a list of the following optional parameters obtained using the function EpiIndicators_params(): s_min = -10,
|
Details
EpiIndicators estimates the ratio, r(t), and shift(delay), s(t) between 2 epidemiological indicators f(t) and g(t) following the relation r(t)*f(t) = g(t+s(t)) a variational method is proposed to add regularity constraints to the estimates of r(t) and s(t).
Value
A dataframe with the following columns :
date: the date of the indicator values.
f: the first indicator f(t).
g: the second indicator g(t).
r: the estimated ratio r(t)
s: the estimated shift (delay) s(t)
f.r: the result of r(t)*f(t)
g.s: the result of g(t+s(t))
Author(s)
Luis Alvarez lalvarez@ulpgc.es
Examples
## load data of epidemiological indicators obtained from the World in data
## organization
data("owid")
## Filter the data to get France epidemiological indicators
library(dplyr)
sel <- filter(owid,iso_code=="FRA")
## Generate a dataframe with the dates and the cases and deaths restored
## using EpiInvert()
df<-data.frame(sel$date,sel$new_cases_restored_EpiInvert,sel$new_deaths_restored_EpiInvert)
## Run EpiIndicators
res <- EpiIndicators(df)
## Plot the results
EpiIndicators_plot(res)