Backend functions to calculate conditional accuracy functions for RT vectors or pdfs
calc_cafs_obs(rts_u, rts_l, one_cond, n_bins)calc_cafs_pred(pdf_u, pdf_l, t_vec, one_cond, n_bins)
a data.frame with the "Cond" label, the "Bin"s and "P_U" for the CAFs
vectors of RTs for the upper and lower boundary
character label
number of bins to use for the CAFs
density values for the upper and lower boundary
the time space
for RTs: first elements are attributed to a bin (with bins calculated across all RTs using equally spaced quantiles), then accuracy per bin is calculated.
for Densities: Add density values, calculate a CDF and force it between 0 and
Then determine the indices that cut the CDF into bins by considering equally spaced quantiles. Then calculate the ratio of probability mass per bin.