Validate that the pmf vector being passed to stan is a valid probability mass function. It must sum to 1 and have all non-negative entries.
Source:R/validate.R
validate_pmf.Rd
Validate that the pmf vector being passed to stan is a valid probability mass function. It must sum to 1 and have all non-negative entries.
Usage
validate_pmf(
pmf,
calibration_time,
count_data,
tolerance = 1e-06,
arg = "x",
call = rlang::caller_env()
)
Arguments
- pmf
simplex vector describing a probabilty of an event ocurring on each day
- calibration_time
integer indicating the calibration time
- count_data
tibble containing the input count data ready to be passed to stan
- tolerance
numeric indicating the allowable difference between the sum of the pmf and 1, default is
1e-6
- arg
name of the argument supplying the object
- call
The calling environment to be reflected in the error message