R/02_decision_model_functions.R
check_transition_probability.Rdcheck_transition_probability checks if transition probabilities are in
[0, 1] and reports any entry that is not, including entries that are
NA or NaN.
check_transition_probability(a_P, err_stop = FALSE, verbose = FALSE)Invisibly, a data frame with one row per entry of a_P that is not a
valid probability, empty when the array is valid. With
err_stop = TRUE the function stops instead, and with
verbose = TRUE it warns, listing the offending entries.
l_params_all <- load_all_params()
a_P <- decision_model(l_params_all)$a_P
check_transition_probability(a_P, verbose = TRUE)