This method takes 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 drift_dm
calc_pdfs(drift_dm_obj, x_vec, t_vec, prms_solve)
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"
a model of type drift_dm
numeric vector, the evidence space
numeric vector, the time space
the discretization (see prms_solve)
calc_pdfs is a generic method which dispatches the function call (not exported). Currently, the method only considers objects of type drift_dm.
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 Richteretal.2023dRiftDM.
Richteretal.2023dRiftDM
add_residual