Skip to contents

Create an <epiparameter> object. The constructor will search whether parameters of the probability distribution are supplied and if not look to see whether they can be inferred/extracted/ converted from summary statistics provided. It will also convert the probability distribution (prob_dist) and its parameters (prob_dist_params) into an S3 class, either a distribution object from {distributional} when discretise = FALSE, or a distcrete object from {distcrete} when discretise = TRUE.

Usage

new_epiparameter(
  disease = character(),
  pathogen = character(),
  epi_dist = character(),
  prob_dist = list(),
  prob_dist_params = numeric(),
  uncertainty = list(),
  summary_stats = list(),
  auto_calc_params = logical(),
  citation = character(),
  metadata = list(),
  method_assess = list(),
  discretise = logical(),
  truncation = numeric(),
  notes = character(),
  ...
)

Arguments

disease

A character string with name of the infectious disease.

pathogen

A character string with the name of the causative agent of disease, or NA if not known.

epi_dist

A character string with the name of the epidemiological distribution type.

prob_dist

A character string specifying the probability distribution. This should match the R naming convention of probability distributions (e.g. lognormal is lnorm, negative binomial is nbinom, and geometric is geom).

prob_dist_params

A named vector of probability distribution parameters.

uncertainty

A list of named vectors with the uncertainty around the probability distribution parameters. If uncertainty around the parameter estimates is unknown use create_uncertainty() (which is the argument default) to create a list with the correct names with missing values.

summary_stats

A list of summary statistics, use create_summary_stats() to create list. This list can include summary statistics about the inferred distribution such as it's mean and standard deviation, quantiles of the distribution, or information about the data used to fit the distribution such as lower and upper range. The summary statistics can also include uncertainty around metrics such as confidence interval around mean and standard deviation.

auto_calc_params

A boolean logical determining whether to try and calculate the probability distribution parameters from summary statistics if distribution parameters are not provided. Default is TRUE. In the case when sufficient summary statistics are provided and the parameter(s) of the distribution are not, the .calc_dist_params() function is called to calculate the parameters and add them to the epiparameter object created.

citation

A <bibentry> with the citation of the source of the data or the paper that inferred the distribution parameters, use create_citation() to create citation.

metadata

A list of metadata, this can include: 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 transmission_mode = "vector_borne" is contained in the metadata. Use create_metadata() to create metadata.

method_assess

A list of methodological aspects used when fitting the distribution, use create_method_assess() to create method assessment.

discretise

A boolean logical whether the distribution is discretised. Default is FALSE which assumes a continuous probability distribution

truncation

A numeric specifying the truncation point if the inferred distribution was truncated, NA if not or unknown.

notes

A character string with any additional information about the data, inference method or disease.

...

dots Extra arguments to be passed to internal functions.

This is most commonly used to pass arguments to distcrete::distcrete() that construct the discretised distribution S3 object. To see which arguments can be adjusted for discretised distributions see distcrete::distcrete().

Value

An <epiparameter> object.