calc_quantiles: Calculate Quantiles

View source: R/core_stats.R

calc_quantilesR Documentation

Calculate Quantiles

Description

Function that calls the underlying quantile calculation functions calc_quantiles_obs() and calc_quantiles_pred(). Does input checks and the data wrangling

Usage

calc_quantiles(
  pdf_u = NULL,
  pdf_l = NULL,
  t_vec = NULL,
  dt = NULL,
  rts_u = NULL,
  rts_l = NULL,
  one_cond,
  probs = NULL,
  b_coding,
  skip_if_contr_low = NULL
)

Arguments

pdf_u, pdf_l

density values for the upper and lower boundary

t_vec

the time space (required for the pdfs)

dt

the step size corresponding to the time space

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

b_coding

used for accessing the upper/lower boundary labels, determines the corresponding columns of the returned data.frame (e.g., Quant_corr).

skip_if_contr_low

numeric. If the contribution of the upper or lower PDF to the overall PDF is too low, return NAs for this PDF (see also drift_dm_skip_if_contr_low()).

Details

if pdf_u and pdf_l are not NULL, returns quantiles for the densities

if rts_u and rts_l are not NULL, returns quantiles for the response times

if all are not NULL, returns both.

Value

a data.frame with "Source", "Cond", "Prob"s, "Quant_<u_label>", "Quant_<l_label>" of type c("quantiles", "sum_dist", "stats_dm", "data.frame")

See Also

new_stats_dm()


dRiftDM documentation built on Dec. 1, 2025, 5:08 p.m.