dot-is_valid_delay_single_or_list.Rd
Utility function that checks whether a user input is a list of or itself a single valid delay object. This means the user input can be a list in which each element can be one of the following:
a probability distribution vector: a numeric vector with no NA
or negative values, whose entries sum up to 1
an empirical delay data: a data frame with two columns: event_date
and report_delay
. The columns cannot contain NA
values. report_delay
only contains non-negative values
a delay distribution matrix (as described in .check_is_delay_distribution_matrix
)
a distribution object (e.g. list(name = 'gamma', scale = X, shape = Y))
Or the user input can itself be one of these types.
.is_valid_delay_single_or_list( delay_list, parameter_name, incidence_data_length )
delay_list | user inputted object to be tested |
---|---|
parameter_name | A string containing the name the tested parameter had in the initial function in which it was passed. |
incidence_data_length | A number representing the length of the given incidence data. |
TRUE if all tests were passed. Throws an error otherwise.