Title Calculate basic reproduction number from attack rate
the attack rate; a value or vector of values between 0 and 1
R0, the basic reproduction number, calculated as -log(1-AR)/AR
## 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.