calc_quantiles_obs: Calculate Quantiles

View source: R/core_stats.R

calc_quantiles_obsR Documentation

Calculate Quantiles

Description

Backend functions to calculate quantiles for RT vectors or pdfs

Usage

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
)

Arguments

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.

Details

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)

Value

a data.frame with the "Cond" label, the "Prob"s and "Quant_U" and "Quant_L" for the quantiles


dRiftDM documentation built on April 3, 2025, 7:48 p.m.