Description Usage Arguments Value Author(s) Examples
A function that generates random values of the basic reproductive number R when given an estimated an estimated confidence interval for R. The function draws a point estimate for R within the given range and then returns a randomly generated number from a Poisson distribution with this point estimate as the mean.
1 | n.sec.cases(n = 1, R_low, R_high = NULL)
|
n |
number of random numbers to generate |
R_low |
the low estimate of R. If the |
R_high |
the high estimate of R |
an n
length numeric vector giving randomly generated R values
John Giles
1 2 3 4 5 6 7 | n.sec.cases(R_low=1.5)
n.sec.cases(n=10, R_low=1.5, R_high=2)
set.seed(1)
hist(n.sec.cases(n=1000, R_low=1.5, R_high=3), main='', xlab='R_0')
abline(v=1.5, lty=2, lwd=2, col='red')
abline(v=3, lty=2, lwd=2, col='red')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.