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,
  rts_u = NULL,
  rts_l = NULL,
  one_cond,
  probs = NULL,
  b_coding
)

Arguments

pdf_u, pdf_l

either NULL or density vectors

t_vec

the time space (required for the pdfs)

rts_u, rts_l

either NULL or RT vectors

one_cond

character label

probs

numeric vector with values between 0 and 1 for the probability levels. Default is drift_dm_default_probs().

b_coding

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

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 April 3, 2025, 7:48 p.m.