epiparameter | R Documentation |
<epiparameter>
objectThe <epiparameter>
class is used to store epidemiological
parameters for a single disease. These epidemiological parameters cover a
variety of aspects including delay distributions (e.g. incubation periods
and serial intervals, among others) and offspring distributions.
The <epiparameter>
object is the functional unit provided by
{epiparameter}
to plug into epidemiological pipelines. Obtaining an
<epiparameter>
object can be achieved in two main ways:
The epidemiological distribution is stored in
the {epiparameter}
library and can be accessed by epiparameter_db()
.
The alternative method is when you have information
(e.g. disease and distribution parameter estimates) and would like to input
this into an <epiparameter>
object in order to work in existing analysis
pipelines. This is where the epiparameter()
function can be used to fill
out each field for which information is known.
epiparameter(
disease,
pathogen = NA_character_,
epi_name,
prob_distribution = create_prob_distribution(prob_distribution = NA_character_),
uncertainty = create_uncertainty(),
summary_stats = create_summary_stats(),
citation = create_citation(),
metadata = create_metadata(),
method_assess = create_method_assess(),
notes = NULL,
auto_calc_params = TRUE,
...
)
disease |
A |
pathogen |
A |
epi_name |
A |
prob_distribution |
An S3 class containing the probability
distribution or a character string if the parameters of the probability
distribution are unknown but the name of the distribution is known, or |
uncertainty |
A list of named vectors with the uncertainty around
the probability distribution parameters. If uncertainty around the parameter
estimates is unknown use |
summary_stats |
A list of summary statistics, use
|
citation |
A |
metadata |
A list of metadata, this can include: units, sample size,
the transmission mode of the disease (e.g. is it vector-borne or directly
transmitted), etc. It is assumed that the disease is not
vector-borne and that the distribution is intrinsic (e.g. not an extrinsic
delay distribution such as extrinsic incubation period) unless
|
method_assess |
A list of methodological aspects used when fitting
the distribution, use |
notes |
A |
auto_calc_params |
A boolean |
... |
dots Extra arguments to be passed to internal functions. This is most commonly used to pass arguments to |
Accepted <epiparameter>
distribution parameterisations are:
Gamma must be either 'shape' and 'scale' or 'shape' and 'rate'
Weibull must be 'shape' and 'scale'
Lognormal must be 'meanlog' and 'sdlog' or 'mu' and 'sigma'
Negative Binomial must be either 'mean' and 'dispersion' or 'n' and 'p'
Geometric must be either 'mean' or 'prob'
Poisson must be 'mean'
An <epiparameter>
object.
# minimal input required for `epiparameter`
ebola_incubation <- epiparameter(
disease = "ebola",
epi_name = "incubation_period",
prob_distribution = create_prob_distribution(
prob_distribution = "gamma",
prob_distribution_params = c(shape = 1, scale = 1)
)
)
# minimal input required for discrete `epiparameter`
ebola_incubation <- epiparameter(
disease = "ebola",
epi_name = "incubation_period",
prob_distribution = create_prob_distribution(
prob_distribution = "gamma",
prob_distribution_params = c(shape = 1, scale = 1),
discretise = TRUE
)
)
# example with more fields filled in
ebola_incubation <- epiparameter(
disease = "ebola",
pathogen = "ebola_virus",
epi_name = "incubation",
prob_distribution = create_prob_distribution(
prob_distribution = "gamma",
prob_distribution_params = c(shape = 1, scale = 1),
discretise = FALSE,
truncation = NA
),
uncertainty = list(
shape = create_uncertainty(),
scale = create_uncertainty()
),
summary_stats = create_summary_stats(mean = 2, sd = 1),
citation = create_citation(
author = person(given = "John", family = "Smith"),
year = 2002,
title = "COVID-19 incubation period",
journal = "Epi Journal",
doi = "10.19832/j.1366-9516.2012.09147.x"
),
metadata = create_metadata(
units = "days",
sample_size = 10,
region = "UK",
transmission_mode = "natural_human_to_human",
inference_method = "MLE"
),
method_assess = create_method_assess(
censored = TRUE
),
notes = "No notes"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.