r0_conversions {finalsize}R Documentation

Converts between epidemiological parameters related to R0R_0

Description

Converts between R0R_0 and the transmission rate λ\lambda, or calculates the effective reproduction number ReffR_\text{eff} for a population, while accounting for population characteristics including demographic heterogeneity in social contacts, heterogeneity in the demographic distribution, and heterogeneity in susceptibility to infection.

Uses the R0 (R0R_0), contact matrix (CC), population (NN), and infectious period (γ\gamma) to calculate the transmission rate using the following equation.

λ=R0/(Max(EV(C))γ)\lambda = R_0 / ({Max}(EV(C)) \gamma)

where EV(C)EV(C) denotes the eigenvalues of the matrix CC which is calculated from the social contacts matrix scaled by the number of individuals in each demographic and susceptibility group in the population.

Usage

lambda_to_r0(
  lambda,
  contact_matrix,
  demography_vector,
  susceptibility,
  p_susceptibility,
  infectious_period = 1.8
)

r0_to_lambda(
  r0,
  contact_matrix,
  demography_vector,
  susceptibility,
  p_susceptibility,
  infectious_period = 1.8
)

r_eff(r0, contact_matrix, demography_vector, susceptibility, p_susceptibility)

Arguments

lambda

The transmission rate of the disease, also called the 'force of infection' (λ\lambda). This is different from the effective transmission rate (β\beta).

contact_matrix

Social contact matrix. Entry mijm_{ij} gives average number of contacts in group ii reported by participants in group jj

demography_vector

Demography vector. Entry viv_{i} gives proportion of total population in group ii.

susceptibility

A matrix giving the susceptibility of individuals in demographic group ii and risk group kk.

p_susceptibility

A matrix giving the probability that an individual in demography group ii is in risk (or susceptibility) group kk. Each row represents the overall distribution of individuals in demographic group ii across risk groups, and each row must sum to 1.0.

infectious_period

Duration of the infectious period in days. Default value is 1.8 days.

r0

The basic reproductive number R0R_0 of the infection.

Details

Given the transmission rate (λ\lambda), social contacts matrix (cc), demography (NN), the distribution PP of each demographic group ii into susceptibility groups SS, and the infectious period (γ\gamma)

Here, EV(C)EV(C) denotes the eigenvalues of the matrix CC which is calculated from the social contacts matrix scaled by the number of individuals in each demographic and susceptibility group in the population.

Value

Returns a single number for the calculated value.

Examples

#### Prepare data ####
# Get example dataset and prepare contact matrix and demography
data(polymod_uk)
contact_matrix <- polymod_uk$contact_matrix
demography_vector <- polymod_uk$demography_vector

# define lambda
lambda <- 0.3

# define infectious period of 5 days
infectious_period <- 5
# define the number of age and susceptibility groups
n_demo_grps <- length(demography_vector)
n_risk_grps <- 3

# In this example, risk varies across groups
susceptibility <- matrix(
  data = c(0.5, 0.7, 1.0), nrow = n_demo_grps, ncol = n_risk_grps
)

# risk does not vary within groups
p_susceptibility <- matrix(
  data = 1, nrow = n_demo_grps, ncol = n_risk_grps
)
# p_susceptibility rows must sum to 1.0
p_susceptibility <- p_susceptibility / rowSums(p_susceptibility)

#### Effective R ####
r0 <- 2.0
r_eff(
  r0 = r0,
  contact_matrix = contact_matrix,
  demography_vector = demography_vector,
  susceptibility = susceptibility,
  p_susceptibility = p_susceptibility
)

#### Transmission rate to R0 ####
lambda_to_r0(
  lambda, contact_matrix, demography_vector,
  susceptibility, p_susceptibility,
  infectious_period
)

#### R0 to Transmission rate ####
r0 <- 1.5
r0_to_lambda(
  r0, contact_matrix, demography_vector,
  susceptibility, p_susceptibility,
  infectious_period
)

[Package finalsize version 0.2.1 Index]