Estimate what proportion of cases cause a certain proportion of transmission
Source:R/proportion_transmission.R
proportion_transmission.Rd
Calculates the proportion of cases that cause a certain percentage of transmission.
It is commonly estimated what proportion of cases cause 80% of transmission
(i.e. secondary cases).
This can be calculated using proportion_transmission()
at varying values of
\(R\) and for different values of percentage transmission.
There are two methods for calculating the proportion of transmission,
\(p_{80}\) (default) and \(t_{20}\), see method
argument or details for
more information.
Usage
proportion_transmission(
R,
k,
prop_transmission,
method = c("p_80", "t_20"),
simulate = FALSE,
...,
offspring_dist,
format_prop = TRUE
)
Arguments
- R
A
number
specifying the \(R\) parameter (i.e. average secondary cases per infectious individual).- k
A
number
specifying the \(k\) parameter (i.e. dispersion in offspring distribution from fitted negative binomial).- prop_transmission
A
number
of the proportion of transmission for which a proportion of cases has produced. Must be between 0 and 1 (exclusive, \((0, 1)\)).- method
A
character
string defining which method is used to calculate the proportion of transmission. Options are"p_80"
(default) or"t_20"
. See details for more information on each of these methods.- simulate
A
logical
whether the calculation should be done numerically (i.e. simulate secondary contacts) or analytically. Default isFALSE
which uses the analytical calculation.- ...
dots not used, extra arguments supplied will cause a warning.
- offspring_dist
An
<epiparameter>
object. An S3 class for working with epidemiological parameters/distributions, seeepiparameter::epiparameter()
.- format_prop
A
logical
determining whether the proportion column of the<data.frame>
returned by the function is formatted as a string with a percentage sign (%
), (TRUE
, default), or as anumeric
(FALSE
).
Details
Calculates the expected proportion of transmission from a given
proportion of infectious cases. There are two methods to calculate this with
distinct formulations, \(p_{80}\) and \(t_{20}\) these can be specified
by the method
argument.
method = p_80
calculates relative transmission heterogeneity
from the offspring distribution of secondary cases, \(Z\), where the upper
proportion of the distribution comprise \(x\%\) of total number of cases
given R0 and k, where \(x\) is typically defined as 0.8 or 80%. e.g. 80%
of all transmissions are generated by the upper 20% of cases, or
p_80 = 0.2
, per the 80/20 rule. In this formulation, changes in R can
have a significant effect on the estimate of \(p_{80}\) even when \(k\)
is constant. Importantly, this formulation does not allow for true
homogeneity when k = Inf
i.e. \(p_{80} = 0.8\).
method = t_20
calculates a similar ratio, instead in terms of
the theoretical individual reproductive number and infectiousness given
\(R_0\) and \(k\). The individual reproductive number, \(\nu\), is
described in Lloyd-Smith et al. (2005), "as a random variable representing
the expected number of secondary cases caused by a particular infected
individual. Values for \(\nu\) are drawn from a continuous gamma
probability distribution with population mean \(R_0\) and dispersion
parameter \(k\), which encodes all variation in infectious histories of
individuals, including properties of the host and pathogen and environmental
circumstances." The value of \(k\) corresponds to the shape parameters of
the gamma distribution which encodes the variation in the gamma-Poisson
mixture a.k.a. the negative binomial.
For method = t_20
, we define the upper proportion of infectiousness,
which is typically 0.2 i.e. the upper 20% most infectious
cases, again per the 80/20 rule. e.g. the most infectious 20% of cases,
are expected to produce 80% of all infections, or t_20 = 0.8
. Unlike
method = p_80
, changes in R have no effect on the estimate
of t_80 when k is constant, but R is still required for the underlying
calculation. This formulation does allow for true homogeneity when
k = Inf
i.e. t_20 = 0.2
, or t_80 = 0.8
.
Multiple values of R
and k
can be supplied and a <data.frame>
of
every combination of these will be returned.
The numerical calculation for method = p_80
uses random number generation
to simulate secondary contacts so the answers may minimally vary between
calls. The number of simulation replicates is fixed to 105.
References
The analytical calculation is from:
Endo, A., Abbott, S., Kucharski, A. J., & Funk, S. (2020) Estimating the overdispersion in COVID-19 transmission using outbreak sizes outside China. Wellcome Open Research, 5. doi:10.12688/wellcomeopenres.15842.3
The \(t_{20}\) method follows the formula defined in section 2.2.5 of the supplementary material for:
Lloyd-Smith, J. O., Schreiber, S. J., Kopp, P. E., & Getz, W. M. (2005) Superspreading and the effect of individual variation on disease emergence. Nature. Nov;438(7066):355–9. doi:10.1038/nature04153
The original code for the \(t_{20}\) method is from ongoing work originating from https://github.com/dcadam/kt and:
Adam, D., Gostic, K., Tsang, T., Wu, P., Lim, W. W., Yeung, A., Wong, J., Lau, E., Du, Z., Chen, D., Ho, L.-M., Martín-Sánchez, M., Cauchemez, S., Cobey, S., Leung, G., & Cowling, B. (2022) Time-varying transmission heterogeneity of SARS and COVID-19 in Hong Kong. doi:10.21203/rs.3.rs-1407962/v1
Examples
# example of single values of R and k
prop_transmission <- 0.8 # 80% of transmission
R <- 2
k <- 0.5
proportion_transmission(
R = R,
k = k,
prop_transmission = prop_transmission
)
#> R k prop_80
#> 1 2 0.5 26.4%
# example with multiple values of k
k <- c(0.1, 0.2, 0.3, 0.4, 0.5, 1)
proportion_transmission(
R = R,
k = k,
prop_transmission = prop_transmission
)
#> R k prop_80
#> 1 2 0.1 9.21%
#> 2 2 0.2 15.6%
#> 3 2 0.3 20.3%
#> 4 2 0.4 23.8%
#> 5 2 0.5 26.4%
#> 6 2 1.0 35.6%
# example with vectors of R and k
R <- c(1, 2, 3)
proportion_transmission(
R = R,
k = k,
prop_transmission = prop_transmission
)
#> R k prop_80
#> 1 1 0.1 8.69%
#> 2 2 0.1 9.21%
#> 3 3 0.1 9.39%
#> 4 1 0.2 14.3%
#> 5 2 0.2 15.6%
#> 6 3 0.2 16%
#> 7 1 0.3 18.2%
#> 8 2 0.3 20.3%
#> 9 3 0.3 21%
#> 10 1 0.4 20.8%
#> 11 2 0.4 23.8%
#> 12 3 0.4 25%
#> 13 1 0.5 22.6%
#> 14 2 0.5 26.4%
#> 15 3 0.5 28%
#> 16 1 1.0 30%
#> 17 2 1.0 35.6%
#> 18 3 1.0 37.8%