cfr_static {cfr} | R Documentation |
Estimate a static disease severity measure
Description
Calculates the severity of a disease, while optionally correcting for reporting delays using an epidemiological delay distribution of the time between symptom onset and death (onset-to-death).
Other delay distributions may be passed to calculate different disease severity measures such as the hospitalisation fatality risk.
Usage
cfr_static(data, delay_density = NULL, poisson_threshold = 100)
Arguments
data |
A Note that the Note also that the total number of cases must be greater than the total number of reported deaths. |
delay_density |
An optional argument that controls whether delay
correction is applied in the severity estimation.
May be |
poisson_threshold |
The case count above which to use Poisson approximation. Set to 100 by default. Must be > 0. |
Value
A <data.frame>
with the maximum likelihood estimate and 95%
confidence interval of the severity estimates, named "severity_estimate",
"severity_low", and "severity_high".
Details: Adjusting for delays between two time series
The method used in cfr_static()
follows Nishiura et al.
(2009).
The function calculates a quantity for each day within the input
data, which represents the proportion of cases estimated to have
a known outcome on day
.
Following Nishiura et al.,
is calculated as:
where is the value of the probability mass function at time
and
,
are the number of new cases and new deaths at time
, (respectively).
We then use
at the end of the outbreak in the following likelihood
function to estimate the severity of the disease in question.
and
are the cumulative number of cases and deaths
(respectively) up until time
.
is the parameter we wish to estimate, the severity of the
disease. We estimate
using simple maximum-likelihood methods,
allowing the functions within this package to be quick and easy tools to use.
The precise severity measure — CFR, IFR, HFR, etc — that
represents depends upon the input data given by the user.
The epidemiological delay-distribution density function passed to
delay_density
is used to evaluate the probability mass function
parameterised by time; i.e. which
gives the probability that a case has a known outcome (usually death) at time
, parameterised with disease-specific parameters before it is supplied
here.
Profile likelihood methods
The naive CFR estimate (without delay correction) is the outcome of a
Binomial test on deaths and cases using stats::binom.test()
.
The confidence intervals around the estimate are also taken from the test.
The delay-corrected CFR estimates are however obtained by generating a
profile likelihood over the sequence seq(1e-4, 1.0, 1e-4)
. The method used
depends on the outbreak size and the initial expectation of disease severity.
This is implemented in the internal function .estimate_severity()
.
-
Delay correction, small outbreaks: For outbreaks where the total cases are below the user-specified 'Poisson threshold' (
poisson_threshold
, default = 100), the CFR and uncertainty around it is taken from a profile likelihood generated from a Binomial model of deaths (successes) and estimated known outcomes (trials).-
Delay correction, large outbreaks with low severity: For outbreaks with total cases greater than the Poisson threshold (default = 100) and with initial severity estimates < 0.05, the CFR and uncertainty are taken from a Poisson approximation of the Binomial profile likelihood (taking
for
estimated outcomes and
as the severity estimate).
-
-
Delay correction, large outbreaks with higher severity: For outbreaks with total cases greater than the Poisson threshold (default = 100) and with initial severity estimates
0.05, the CFR and uncertainty are taken from a Normal approximation of the Binomial profile likelihood.
References
Nishiura, H., Klinkenberg, D., Roberts, M., & Heesterbeek, J. A. P. (2009). Early Epidemiological Assessment of the Virulence of Emerging Infectious Diseases: A Case Study of an Influenza Pandemic. PLOS ONE, 4(8), e6852. doi:10.1371/journal.pone.0006852
Examples
# load package data
data("ebola1976")
# estimate severity without correcting for delays
cfr_static(ebola1976)
# estimate severity for each day while correcting for delays
# obtain onset-to-death delay distribution parameters from Barry et al. 2018
# The Lancet. <https://doi.org/10.1016/S0140-6736(18)31387-4>
cfr_static(
ebola1976,
delay_density = function(x) dgamma(x, shape = 2.40, scale = 3.33)
)