Skip to contents

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,
  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

arg

name of the argument supplying the object

call

The calling environment to be reflected in the error message

Value

NULL, invisibly