dist_spec: Specify a distribution.

View source: R/deprecated.R

dist_specR Documentation

Specify a distribution.

Description

[Deprecated] This function is deprecated as a user-facing function (while its functionality is still used internally). Construct distributions using the corresponding distribution function such as Gamma(), LogNormal(), Normal() or Fixed() instead.

Usage

dist_spec(
  distribution = c("lognormal", "normal", "gamma", "fixed", "empty"),
  params_mean = numeric(0),
  params_sd = numeric(0),
  max = Inf,
  pmf = numeric(0),
  fixed = FALSE
)

Arguments

distribution

Character, defaults to "lognormal". The (discretised) distribution to be used. Can be "lognormal", "gamma", "normal" or "fixed". The corresponding parameters (defined in natural_params()) are passed as params_mean, and their uncertainty as params_sd.

params_mean

Numeric. Central values of the parameters of the distribution as defined in [natural_params().

params_sd

Numeric. Standard deviations of the parameters of the distribution as defined in [natural_params().

max

Numeric, maximum value of the distribution. The distribution will be truncated at this value. Default: Inf, i.e. no maximum.

pmf

Numeric, a vector of values that represent the (nonparametric) probability mass function of the delay (starting with 0); defaults to an empty vector corresponding to a parametric specification of the distribution (using params_mean, and params_sd.

fixed

Deprecated, use fix_parameters() instead.

Value

A list of distribution options.


EpiNow2 documentation built on Oct. 31, 2024, 5:09 p.m.