Description Usage Arguments Author(s) Examples
View source: R/make_disc_gamma.R
This function is a simple wrapper around the packages epitrix and
distcrete allowing to create a discretised Gamma distribution with given
mean and standard deviration, returning a distcrete
object.
1 |
mean |
the mean of the distribution |
sd |
the standard deviation of the distribution |
Thibaut Jombart
1 2 3 4 5 6 7 8 9 10 11 | serial_interval <- make_disc_gamma(15, 9)
## check PMF
plot(0:30, serial_interval$d(0:30), type = "h",
lwd = 3, col = "navy",
xlab = "Number of days", ylab = "probability",
main = "Probability mass function")
## simulate random numbers
serial_interval$d(20)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.