Description Usage Arguments Value Author(s) Examples
Get a Parameters that Define a Discrete Distribution
1 2 3 4 5 6 7 | get_dist_def(
values,
verbose = FALSE,
samples = 1,
bootstraps = 1,
bootstrap_samples = 250
)
|
values |
Numeric vector of integer values. |
verbose |
Logical, defaults to |
samples |
Numeric, number of samples to take overall from the bootstrapped posteriors. |
bootstraps |
Numeric, defaults to 1. The number of bootstrap samples (with replacement) of the delay distribution to take. |
bootstrap_samples |
Numeric, defaults to 100. The number of samples to take in each boostrap. When the sample size of the supplied delay distribution is less than 100 this is used instead. |
A data.table of distributions and the parameters that define them.
Sebastian Funk sebastian.funk@lshtm.ac.uk
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## Example with exponential and a small smaple
delays <- rexp(20, 1)
get_dist_def(delays, samples = 10, verbose = TRUE)
## Not run:
## Example with gamma and a larger sample
delays <- rgamma(50, 4, 1)
out <- get_dist_def(delays, samples = 2, bootstraps = 2)
## Inspect
out
## Inspect one parameter
out$params[[1]]
## Load into skeleton and sample with truncation
EpiNow::dist_skel(10, model = out$model[[1]],
params = out$params[[1]],
max_value = out$max_value[[1]])
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.