Learn R Programming

ream (version 1.0-5)

CSTM_T: Custom Time-Dependent Drift Diffusion Model

Description

Density (PDF), distribution function (CDF), and random sampler for a custom time-dependent (CSTM_T) drift diffusion model.

Usage

dCSTM_T(rt, resp, phi, x_res = "default", t_res = "default")

pCSTM_T(rt, resp, phi, x_res = "default", t_res = "default")

rCSTM_T(n, phi, dt = 1e-05)

Value

For the density a list of PDF values, log-PDF values, and the sum of the log-PDFs, for the distribution function a list of of CDF values, log-CDF values, and the sum of the log-CDFs, and for the random sampler a list of response times (rt) and response thresholds (resp).

Arguments

rt

vector of response times

resp

vector of responses ("upper" and "lower")

phi

parameter vector in your specified order

x_res

spatial/evidence resolution

t_res

time resolution

n

number of samples

dt

step size of time. We recommend 0.00001 (1e-5)

Author

Raphael Hartmann & Matthew Murrow

References

Murrow, M., & Holmes, W. R. (2023). PyBEAM: A Bayesian approach to parameter inference for a wide class of binary evidence accumulation models. Behavior Research Methods, 1-21.

Examples

Run this code
# Probability density function
dCSTM_T(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"),
      phi = c(0.3, 0.5, 1.0, 1.0, 0.75, 0.0, 0.0, 1.0))

Run the code above in your browser using DataLab