epiparameter_distribution_functions | R Documentation |
<epiparameter>
objectsThe <epiparameter>
object holds a probability distribution
which can either be a continuous or discrete distribution. These are the
density, cumulative distribution, quantile and random number generation
functions. These operate on any distribution that can be included in an
<epiparameter>
object.
## S3 method for class 'epiparameter'
density(x, at, ...)
## S3 method for class 'epiparameter'
cdf(x, q, ..., log = FALSE)
## S3 method for class 'epiparameter'
quantile(x, p, ...)
## S3 method for class 'epiparameter'
generate(x, times, ...)
x |
An |
at |
The quantiles to evaluate at. |
... |
dots Extra arguments to be passed to the method. |
q |
The quantiles to evaluate at. |
log |
If |
p |
The probabilities to evaluate at. |
times |
The number of random samples. |
numeric
vector.
ep <- epiparameter(
disease = "ebola",
epi_name = "incubation_period",
prob_distribution = create_prob_distribution(
prob_distribution = "gamma",
prob_distribution_params = c(shape = 1, scale = 1)
)
)
# example of each distribution method for an `epiparameter` object
stats::density(ep, at = 1)
distributional::cdf(ep, q = 1)
stats::quantile(ep, p = 0.2)
distributional::generate(ep, times = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.