get_parameters.epiparameter: Get parameters from an <epiparameter> object

View source: R/accessors.R

get_parameters.epiparameterR Documentation

Get parameters from an ⁠<epiparameter>⁠ object

Description

Extract the parameters of the distribution stored in an ⁠<epiparameter>⁠ object.

Usage

## S3 method for class 'epiparameter'
get_parameters(x, ...)

## S3 method for class 'multi_epiparameter'
get_parameters(x, ...)

Arguments

x

An ⁠<epiparameter>⁠ object.

...

dots Not used, extra arguments supplied will cause a warning.

Details

The ⁠<epiparameter>⁠ object can be unparameterised in which it lacks a probability distribution or parameters of a probability distribution, in this case the get_parameters.epiparameter() method will return NA.

Value

A named vector of parameters or NA when the ⁠<epiparameter>⁠ object is unparameterised.

Examples

ep <- epiparameter_db(
  disease = "COVID-19",
  epi_name = "serial interval",
  single_epiparameter = TRUE
)
get_parameters(ep)

epiparameter documentation built on April 3, 2025, 5:50 p.m.