is_epiparameter_params: Check whether the vector of parameters for the probability...

View source: R/epiparameter-utils.R

is_epiparameter_paramsR Documentation

Check whether the vector of parameters for the probability distribution are in the set of possible parameters used in the epiparameter package

Description

Check whether the vector of parameters for the probability distribution are in the set of possible parameters used in the epiparameter package

Usage

is_epiparameter_params(prob_distribution, prob_distribution_params)

Arguments

prob_distribution

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_distribution_params

A named vector of probability distribution parameters.

Details

This check for valid parameters is independent of whether the distribution is truncated or discretised.

Value

A boolean logical.

Examples

is_epiparameter_params(
  prob_distribution = "gamma",
  prob_distribution_params = c(shape = 2, scale = 1)
)

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