powered by
Title Calculate basic reproduction number from attack rate
AR2R0(AR)
R0, the basic reproduction number, calculated as -log(1-AR)/AR
the attack rate; a value or vector of values between 0 and 1
## 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")
Run the code above in your browser using DataLab