AR2R0: Title Calculate basic reproduction number from attack rate

View source: R/final_size.R

AR2R0R Documentation

Title Calculate basic reproduction number from attack rate

Description

Title Calculate basic reproduction number from attack rate

Usage

AR2R0(AR)

Arguments

AR

the attack rate; a value or vector of values between 0 and 1

Value

R0, the basic reproduction number, calculated as -log(1-AR)/AR

Examples


## Calculate R0 for an attack rate of 50%
AR2R0(0.5)

## plot the relationship between R0 and attack rate
x <- seq(0.01, 1, 0.01)
plot(AR2R0(x), x, type = "l", xlab = "R0", ylab = "Attack rate")


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