R02herd_immunity_threshold: Title Calculate herd immunity threshold from basic...

View source: R/final_size.R

R02herd_immunity_thresholdR Documentation

Title Calculate herd immunity threshold from basic reproduction number

Description

Title Calculate herd immunity threshold from basic reproduction number

Usage

R02herd_immunity_threshold(R0)

Arguments

R0

a value or vector of values representing the basic reproduction number, must be >=0

Value

The herd immunity threshold, calculated as 1 - 1 / R0

Examples


## Calculate the herd immunity threshold for a specific value of the 
## reproduction number (here 2)
R02herd_immunity_threshold(2) 

## plot the relationship between R0 and herd immunity threshold
x <- seq(1.01, 15, 0.01)
plot(x, R02herd_immunity_threshold(x), type = "l", 
  xlab = "R0", ylab = "Herd immunity threshold")


epitrix documentation built on Jan. 14, 2023, 1:16 a.m.