calc_pdfs | R Documentation |
This method takes the a model, the time and space vectors, and the unpacked parameters for solving the PDF to derive the first passage time across all conditions. It is a wrapper around the cpp implementations and add_residual. Important: This function is used in the depths of the package and the generic method is not exported.
calc_pdfs(drift_dm_obj, x_vec, t_vec, prms_solve)
## S3 method for class 'ratcliff_dm'
calc_pdfs(drift_dm_obj, x_vec, t_vec, prms_solve)
## S3 method for class 'drift_dm'
calc_pdfs(drift_dm_obj, x_vec, t_vec, prms_solve)
drift_dm_obj |
a model of type drift_dm |
x_vec |
numeric vector, the evidence space |
t_vec |
numeric vector, the time space |
prms_solve |
the discretization (see prms_solve) |
calc_pdfs is a generic method which dispatches the function call (not exported).
calc_pdfs.ratcliff_dm, is a specific method that checks for the presence of
the parameter sd_muc
, and, if present, calls the calc_pdfs.drift_dm
function multiple times with different value for muc
to approximate the
variable drift rate.
calc_pdfs.drift_dm is the function that will be called for all models. It evaluates the different components of a model, and subsequently calls the cpp implementations for the KFE or integral method. It also calls the add_residual function to convolute the non-decision time to the first passage time.
The numerical methods for deriving the PDFs are based on the code provided by \insertCiteRichteretal.2023dRiftDM.
a list of PDFs, with named entries for each condition. Each of this entry contains a list of vectors, named "pdf_u" and "pdf_l"
Richteretal.2023dRiftDM
add_residual
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.