calc_quantiles_obs | R Documentation |
Backend functions to calculate quantiles for RT vectors or pdfs
calc_quantiles_obs(rts_u, rts_l, one_cond, probs)
calc_quantiles_pred(
pdf_u,
pdf_l,
t_vec,
one_cond,
probs,
skip_if_contr_low = 1e-04
)
rts_u , rts_l |
vectors of RTs for the upper and lower boundary |
one_cond |
character label |
probs |
numeric vector with values between 0 and 1 for the probability levels |
pdf_u , pdf_l |
density values for the upper and lower boundary |
t_vec |
the time space (required for the pdfs) |
skip_if_contr_low |
numeric. If the relative contribution of the upper or lower PDF to the overall PDF is too low (default 0.01%), return NAs for this PDF. |
for RTs: straightforward via stats::quantile.
for Densities: Calculate CDF (for each pdf separately here), and then map the desired probability level via the CDF (y-axis) to the time space (x-axis)
a data.frame with the "Cond" label, the "Prob"s and "Quant_U" and "Quant_L" for the quantiles
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.