Skip to contents

Calculates the proportion of new cases that originated with a transmission event of a given size. It can be useful to inform backwards contact tracing efforts, i.e. how many cases are associated with large clusters. Here we define a cluster to as a transmission of a primary case to at least one secondary case.

Usage

proportion_cluster_size(
  R,
  k,
  cluster_size,
  ...,
  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. overdispersion in offspring distribution from fitted negative binomial).

cluster_size

A number for the cluster size threshold.

...

dots not used, extra arguments supplied will cause a warning.

offspring_dist

An <epiparameter> object. An S3 class for working with epidemiological parameters/distributions, see epiparameter::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 a numeric (FALSE).

Value

A <data.frame> with the value for the proportion of new cases that are part of a transmission event above a threshold for a given value of R and k.

Details

This function calculates the proportion of secondary cases that are caused by transmission events of a certain size. It does not calculate the proportion of transmission events that cause a cluster of secondary cases of a certain size. In other words it is the number of cases above a threshold divided by the total number of cases, not the number of transmission events above a certain threshold divided by the number of transmission events.

Examples

R <- 2
k <- 0.1
cluster_size <- 10
proportion_cluster_size(R = R, k = k, cluster_size = cluster_size)
#>   R   k prop_10
#> 1 2 0.1   68.8%

# example with a vector of k
k <- c(0.1, 0.2, 0.3, 0.4, 0.5)
proportion_cluster_size(R = R, k = k, cluster_size = cluster_size)
#>   R   k prop_10
#> 1 2 0.1   69.1%
#> 2 2 0.2     51%
#> 3 2 0.3   38.1%
#> 4 2 0.4   31.3%
#> 5 2 0.5   25.4%

# example with a vector of cluster sizes
cluster_size <- c(5, 10, 25)
proportion_cluster_size(R = R, k = k, cluster_size = cluster_size)
#>   R   k prop_5 prop_10 prop_25
#> 1 2 0.1  85.7%   68.8%   34.1%
#> 2 2 0.2  76.4%     51%   13.9%
#> 3 2 0.3  69.4%   39.2%   5.83%
#> 4 2 0.4  63.8%   30.4%   2.92%
#> 5 2 0.5  59.7%   24.9%   1.39%