convert.epipara.to.delappara: To convert model parameters

View source: R/function_fordistribution.R

convert.epipara.to.delapparaR Documentation

To convert model parameters

Description

This function (i.e., convert.epipara.to.delappara()) converts a list of pre-defined epidemiological parameters into a list of statistical parameters, such that a probability function of Delaporte distribution may recognize, which is for internal use only.

Usage

convert.epipara.to.delappara(
  para = list(mean = 1, disp = 0.5, shift = 0.2),
  offspring.type = "D"
)

Arguments

para

A list (list) of epidemiological parameters for offspring distribution, in the format of list(mean = ?, disp = ?, shift = ?), where the three parameters accept non-negative values. Each parameter can be either a scalar, or a vector. For the parameters being assigned with values of vectors, the vectors should be of the same length. For Delaporte distribution, the value of mean should be larger than the value of shift.

offspring.type

A character label (character) indicating the type of distribution used to describe the offspring distribution. It only accepts one of the following values:

  • "D" indicates the Delaporte distribution,

  • "NB" indicates the negative binomial distribution,

  • "G" indicates the geometric distribution, or

  • "P" indicates the Poisson distribution.

By default, offspring.type = 'D'.

Details

For different values of offspring.type,

  • When offspring.type = "D", no action to the pre-defined epidemiological parameters;

  • When offspring.type = "NB", we set parameter shift = 0 internally;

  • When offspring.type = "G", we set parameters disp = 1 and shift = 0 internally; and

  • When offspring.type = "P", we set parameters disp = +Inf and shift = mean internally.

Value

A list of statistical parameters in the format of list(alpha = ?, beta = ?, lambda = ?) that can be recognized by Delaporte distribution.

Note

It would be difficult to interpret the converted statistical parameters, and thus we set this function convert.epipara.to.delappara() as a internal function. We do not recommend the users to use this function externally unless for special reasons.

References

Vose D. Risk analysis: a quantitative guide. John Wiley & Sons. 2008; pp. 618-619. ISBN: 978-0-470-51284-5

See Also

Delaporte for the parameterization of Delaporte distribution.

Examples

convert.epipara.to.delappara(
  para = list(mean = 1, disp = 0.5, shift = 0.2),
  offspring.type = 'D'
)
convert.epipara.to.delappara(
  para = list(mean = 1, disp = 1, shift = 0),
  offspring.type = 'G'
)

convert.epipara.to.delappara(
  para = list(mean = c(0.5, 1, 2), disp = c(0.1, 0.1, 0.3), shift = 0.2)
)


modelSSE documentation built on Sept. 8, 2023, 5:52 p.m.