Error in private$check_input() : Probabilities (which are the 2nd, 4th, 6th... element of right side of "formula") must sum to 1, but the following variables in your data do NOT sum to 1: [x1, x2]. Check the probability variables in "formula" and in "data".
Wrong order in y option leads to error about x option. I guess this is because you always use the letter "x" to display the error in case of a false order, right? The error by itself is super comprehensible, maybe we could even improve it by stating the exact variables where it occurs (i.e., "the following variables in your data do NOT sum to 1: [y2, I(1-py)]").
https://github.com/JanaJarecki/cognitivemodels/blob/e890596d7d11745b2f01e24a4cdbecbaff0a28f6/tests/testthat/test_shortfall.R#L164
Error in private$check_input() : Probabilities (which are the 2nd, 4th, 6th... element of right side of "formula") must sum to 1, but the following variables in your data do NOT sum to 1: [x1, x2]. Check the probability variables in "formula" and in "data".
Wrong order in y option leads to error about x option. I guess this is because you always use the letter "x" to display the error in case of a false order, right? The error by itself is super comprehensible, maybe we could even improve it by stating the exact variables where it occurs (i.e., "the following variables in your data do NOT sum to 1: [y2, I(1-py)]").