Title: | Density, Distribution, and Sampling Functions for Evidence Accumulation Models |
---|---|
Description: | Calculate the probability density functions (PDFs) for two threshold evidence accumulation models (EAMs). These are defined using the following Stochastic Differential Equation (SDE), dx(t) = v(x(t),t)*dt+D(x(t),t)*dW, where x(t) is the accumulated evidence at time t, v(x(t),t) is the drift rate, D(x(t),t) is the noise scale, and W is the standard Wiener process. The boundary conditions of this process are the upper and lower decision thresholds, represented by b_u(t) and b_l(t), respectively. Upper threshold b_u(t) > 0, while lower threshold b_l(t) < 0. The initial condition of this process x(0) = z where b_l(t) < z < b_u(t). We represent this as the relative start point w = z/(b_u(0)-b_l(0)), defined as a ratio of the initial threshold location. This package generates the PDF using the same approach as the 'python' package it is based upon, 'PyBEAM' by Murrow and Holmes (2023) <doi:10.3758/s13428-023-02162-w>. First, it converts the SDE model into the forwards Fokker-Planck equation dp(x,t)/dt = d(v(x,t)*p(x,t))/dt-0.5*d^2(D(x,t)^2*p(x,t))/dx^2, then solves this equation using the Crank-Nicolson method to determine p(x,t). Finally, it calculates the flux at the decision thresholds, f_i(t) = 0.5*d(D(x,t)^2*p(x,t))/dx evaluated at x = b_i(t), where i is the relevant decision threshold, either upper (i = u) or lower (i = l). The flux at each thresholds f_i(t) is the PDF for each threshold, specifically its PDF. We discuss further details of this approach in this package and 'PyBEAM' publications. Additionally, one can calculate the cumulative distribution functions of and sampling from the EAMs. |
Authors: | Raphael Hartmann [aut, cre] , Matthew Murrow [aut] |
Maintainer: | Raphael Hartmann <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0-5 |
Built: | 2024-10-26 05:57:18 UTC |
Source: | https://github.com/raphaelhartmann/ream |
A continuous approximation of the Dual-Stage Two-Phase model of conflict tasks. The Dual-Stage Two-Phase model assumes that choice in conflict tasks involves two processes: a decision process and a target selection process. The target selection process is an SDDM, while the decision process is an SDDM but with drift rate
where before target selection and
after target selection.
A full derivation of this model is in the ream publication.
dCDSTP(rt, resp, phi, x_res = "default", t_res = "default") pCDSTP(rt, resp, phi, x_res = "default", t_res = "default") rCDSTP(n, phi, dt = 1e-05)
dCDSTP(rt, resp, phi, x_res = "default", t_res = "default") pCDSTP(rt, resp, phi, x_res = "default", t_res = "default") rCDSTP(n, phi, dt = 1e-05)
rt |
vector of response times |
resp |
vector of responses ("upper" and "lower") |
phi |
parameter vector in the following 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) |
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).
Raphael Hartmann & Matthew Murrow
Hübner, R., Steinhauser, M., & Lehle, C. (2010). A dual-stage two-phase model of selective attention. Psychological review, 117(3), 759.
# Probability density function dCDSTP(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 0.5, -0.5, -1.0, -0.5, 8.0, 4.0, 1.0, 2.0, 1.3, 1.3, 0.0, 0.0, 1.0)) # Cumulative distribution function pCDSTP(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 0.5, -0.5, -1.0, -0.5, 8.0, 4.0, 1.0, 2.0, 1.3, 1.3, 0.0, 0.0, 1.0)) # Random sampling rCDSTP(n = 100, phi = c(0.3, 0.5, 0.5, -0.5, -1.0, -0.5, 8.0, 4.0, 1.0, 2.0, 1.3, 1.3, 0.0, 0.0, 1.0), dt = 0.001)
# Probability density function dCDSTP(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 0.5, -0.5, -1.0, -0.5, 8.0, 4.0, 1.0, 2.0, 1.3, 1.3, 0.0, 0.0, 1.0)) # Cumulative distribution function pCDSTP(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 0.5, -0.5, -1.0, -0.5, 8.0, 4.0, 1.0, 2.0, 1.3, 1.3, 0.0, 0.0, 1.0)) # Random sampling rCDSTP(n = 100, phi = c(0.3, 0.5, 0.5, -0.5, -1.0, -0.5, 8.0, 4.0, 1.0, 2.0, 1.3, 1.3, 0.0, 0.0, 1.0), dt = 0.001)
Density (PDF), distribution function (CDF), and random sampler for a custom time-dependent (CSTM_T) drift diffusion model.
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)
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)
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) |
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).
Raphael Hartmann & Matthew Murrow
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.
# 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))
# 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))
Density (PDF), distribution function (CDF), and random sampler for a custom time- and weight-dependent (CSTM_TW) drift diffusion model.
dCSTM_TW(rt, resp, phi, x_res = "default", t_res = "default") pCSTM_TW(rt, resp, phi, x_res = "default", t_res = "default") rCSTM_TW(n, phi, dt = 1e-05)
dCSTM_TW(rt, resp, phi, x_res = "default", t_res = "default") pCSTM_TW(rt, resp, phi, x_res = "default", t_res = "default") rCSTM_TW(n, phi, dt = 1e-05)
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) |
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).
Raphael Hartmann & Matthew Murrow
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.
Density (PDF), distribution function (CDF), and random sampler for a custom time- and evidence-dependent (CSTM_TX) drift diffusion model.
dCSTM_TX(rt, resp, phi, x_res = "default", t_res = "default") pCSTM_TX(rt, resp, phi, x_res = "default", t_res = "default") rCSTM_TX(n, phi, dt = 1e-05)
dCSTM_TX(rt, resp, phi, x_res = "default", t_res = "default") pCSTM_TX(rt, resp, phi, x_res = "default", t_res = "default") rCSTM_TX(n, phi, dt = 1e-05)
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) |
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).
Raphael Hartmann & Matthew Murrow
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.
Generate a grid of response-time values and the corresponding PDF values.
For more details on the model see, for example, dCDSTP
.
dCDSTP_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
dCDSTP_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
rt_max |
maximal response time <- max(rt) |
phi |
parameter vector in the following order:
|
x_res |
spatial/evidence resolution |
t_res |
time resolution |
list of RTs and corresponding defective PDFs at lower and upper threshold
Raphael Hartmann & Matthew Murrow
Hübner, R., Steinhauser, M., & Lehle, C. (2010). A dual-stage two-phase model of selective attention. Psychological review, 117(3), 759.
Beschreibung.
dCSTM_T_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
dCSTM_T_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
rt_max |
maximal response time <- max(rt) |
phi |
parameter vector in your order |
x_res |
spatial/evidence resolution |
t_res |
time resolution |
such and such
Raphael Hartmann & Matthew Murrow
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.
Beschreibung.
dCSTM_TW_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
dCSTM_TW_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
rt_max |
maximal response time <- max(rt) |
phi |
parameter vector in your order |
x_res |
spatial/evidence resolution |
t_res |
time resolution |
such and such
Raphael Hartmann & Matthew Murrow
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.
Beschreibung.
dCSTM_TX_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
dCSTM_TX_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
rt_max |
maximal response time <- max(rt) |
phi |
parameter vector in your order |
x_res |
spatial/evidence resolution |
t_res |
time resolution |
such and such
Raphael Hartmann & Matthew Murrow
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.
Generate a grid of response-time values and the corresponding PDF values.
For more details on the model see, for example, dDMC
.
dDMC_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
dDMC_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
rt_max |
maximal response time <- max(rt) |
phi |
parameter vector in the following order:
|
x_res |
spatial/evidence resolution |
t_res |
time resolution |
list of RTs and corresponding defective PDFs at lower and upper threshold
Raphael Hartmann & Matthew Murrow
Ulrich, R., Schröter, H., Leuthold, H., & Birngruber, T. (2015). Automatic and controlled stimulus processing in conflict tasks: Superimposed diffusion processes and delta functions. Cognitive psychology, 78, 148-174.
Generate a grid of response-time values and the corresponding PDF values.
For more details on the model see, for example, dETM
.
dETM_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
dETM_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
rt_max |
maximal response time <- max(rt) |
phi |
parameter vector in the following order:
|
x_res |
spatial/evidence resolution |
t_res |
time resolution |
list of RTs and corresponding defective PDFs at lower and upper threshold
Raphael Hartmann & Matthew Murrow
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, 56(3), 2636-2656.
Generate a grid of response-time values and the corresponding PDF values.
For more details on the model see, for example, dLIM
.
dLIM_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
dLIM_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
rt_max |
maximal response time <- max(rt) |
phi |
parameter vector in the following order:
|
x_res |
spatial/evidence resolution |
t_res |
time resolution |
list of RTs and corresponding defective PDFs at lower and upper threshold
Raphael Hartmann & Matthew Murrow
Busemeyer, J. R., & Townsend, J. T. (1993). Decision field theory: A dynamic-cognitive approach to decision making in an uncertain environment. Psychological Review, 100(3), 432-459.
Usher, M., & McClelland, J. L. (2001). The time course of perceptual choice: The leaky, competing accumulator model. Psychological Review, 108(3), 550-592.
Wang, J.-S., & Donkin, C. (2024). The neural implausibility of the diffusion decision model doesn’t matter for cognitive psychometrics, but the Ornstein-Uhlenbeck model is better. Psychonomic Bulletin & Review.
Wong, K.-F., & Wang, X.-J. (2006). A Recurrent Network Mechanism of Time Integration in Perceptual Decisions. The Journal of Neuroscience, 26(4), 1314-1328.
Generate a grid of response-time values and the corresponding PDF values.
For more details on the model see, for example, dLIMF
.
dLIMF_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
dLIMF_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
rt_max |
maximal response time <- max(rt) |
phi |
parameter vector in the following order:
|
x_res |
spatial/evidence resolution |
t_res |
time resolution |
list of RTs and corresponding defective PDFs at lower and upper threshold
Raphael Hartmann & Matthew Murrow
Evans, N. J., Trueblood, J. S., & Holmes, W. R. (2019). A parameter recovery assessment of time-variant models of decision-making. Behavior Research Methods, 52(1), 193-206.
Trueblood, J. S., Heathcote, A., Evans, N. J., & Holmes, W. R. (2021). Urgency, leakage, and the relative nature of information processing in decision-making. Psychological Review, 128(1), 160-186.
Generate a grid of response-time values and the corresponding PDF values.
For more details on the model see, for example, dLTM
.
dLTM_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
dLTM_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
rt_max |
maximal response time <- max(rt) |
phi |
parameter vector in the following order:
|
x_res |
spatial/evidence resolution |
t_res |
time resolution |
list of RTs and corresponding defective PDFs at lower and upper threshold
Raphael Hartmann & Matthew Murrow
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, 56(3), 2636-2656.
The DMC is a two-process evidence accumulation model for the study of conflict tasks. It sums together a controlled and an automatic process to generate a single accumulator for generating the likelihood function. This accumulator has the same parameters as the SDDM with the exception of the drift rate, given by
dDMC(rt, resp, phi, x_res = "default", t_res = "default") pDMC(rt, resp, phi, x_res = "default", t_res = "default") rDMC(n, phi, dt = 1e-05)
dDMC(rt, resp, phi, x_res = "default", t_res = "default") pDMC(rt, resp, phi, x_res = "default", t_res = "default") rDMC(n, phi, dt = 1e-05)
rt |
vector of response times |
resp |
vector of responses ("upper" and "lower") |
phi |
parameter vector in the following 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) |
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).
Raphael Hartmann & Matthew Murrow
Ulrich, R., Schröter, H., Leuthold, H., & Birngruber, T. (2015). Automatic and controlled stimulus processing in conflict tasks: Superimposed diffusion processes and delta functions. Cognitive psychology, 78, 148-174.
# Probability density function dDMC(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, -1.0, 0.2, 0.05, 2.5, 3.0, 1.0, 0.5, 0.0, 0.0, 1.0)) # Cumulative distribution function pDMC(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, -1.0, 0.2, 0.05, 2.5, 3.0, 1.0, 0.5, 0.0, 0.0, 1.0)) # Random sampling rDMC(n = 100, phi = c(0.3, 0.5, -1.0, 0.2, 0.05, 2.5, 3.0, 1.0, 0.5, 0.0, 0.0, 1.0))
# Probability density function dDMC(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, -1.0, 0.2, 0.05, 2.5, 3.0, 1.0, 0.5, 0.0, 0.0, 1.0)) # Cumulative distribution function pDMC(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, -1.0, 0.2, 0.05, 2.5, 3.0, 1.0, 0.5, 0.0, 0.0, 1.0)) # Random sampling rDMC(n = 100, phi = c(0.3, 0.5, -1.0, 0.2, 0.05, 2.5, 3.0, 1.0, 0.5, 0.0, 0.0, 1.0))
Generate a grid of response-time values and the corresponding PDF values.
For more details on the model see, for example, dPAM
.
dPAM_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
dPAM_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
rt_max |
maximal response time <- max(rt) |
phi |
parameter vector in the following order:
|
x_res |
spatial/evidence resolution |
t_res |
time resolution |
list of RTs and corresponding defective PDFs at lower and upper threshold
Raphael Hartmann & Matthew Murrow
White, C. N., Ratcliff, R., & Starns, J. J. (2011). Diffusion models of the flanker task: Discrete versus gradual attentional selection. Cognitive Psychology, 63(4), 210-238.
Generate a grid of response-time values and the corresponding PDF values.
For more details on the model see, for example, dRDMC
.
dRDMC_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
dRDMC_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
rt_max |
maximal response time <- max(rt) |
phi |
parameter vector in the following order:
|
x_res |
spatial/evidence resolution |
t_res |
time resolution |
list of RTs and corresponding defective PDFs at lower and upper threshold
Raphael Hartmann & Matthew Murrow
Lee, P.-S., & Sewell, D. K. (2023). A revised diffusion model for conflict tasks. Psychonomic Bulletin & Review, 31(1), 1–31.
Generate a grid of response-time values and the corresponding PDF values.
For more details on the model see, for example, dRTM
.
dRTM_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
dRTM_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
rt_max |
maximal response time <- max(rt) |
phi |
parameter vector in the following order:
|
x_res |
spatial/evidence resolution |
t_res |
time resolution |
list of RTs and corresponding defective PDFs at lower and upper threshold
Raphael Hartmann & Matthew Murrow
Churchland, A. K., Kiani, R., & Shadlen, M. N. (2008). Decision-making with multiple alternatives. Nature Neuroscience, 11(6), 693-702.
Hanks, T. D., Mazurek, M. E., Kiani, R., Hopp, E., & Shadlen, M. N. (2011). Elapsed Decision Time Affects the Weighting of Prior Probability in a Perceptual Decision Task. The Journal of Neuroscience, 31(17), 6339-6352.
Voskuilen, C., Ratcliff, R., & Smith, P. L. (2016). Comparing fixed and collapsing boundary versions of the diffusion model. Journal of Mathematical Psychology, 73, 59-79.
Generate a grid of response-time values and the corresponding PDF values.
For more details on the model see, for example, dSDDM
.
dSDDM_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
dSDDM_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
rt_max |
maximal response time <- max(rt) |
phi |
parameter vector in the following order:
|
x_res |
spatial/evidence resolution |
t_res |
time resolution |
list of RTs and corresponding defective PDFs at lower and upper threshold
Raphael Hartmann & Matthew Murrow
Ratcliff, R. (1978). A theory of memory retrieval. Psychological Review, 85(2), 59-108.
Ratcliff, R., & McKoon, G. (2008). The Diffusion Decision Model: Theory and Data for Two-Choice Decision Tasks. Neural Computation, 20(4), 873-922.
Generate a grid of response-time values and the corresponding PDF values.
For more details on the model see, for example, dSDPM
.
dSDPM_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
dSDPM_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
rt_max |
maximal response time <- max(rt) |
phi |
parameter vector in the following order:
|
x_res |
spatial/evidence resolution |
t_res |
time resolution |
list of RTs and corresponding defective PDFs at lower and upper threshold
Raphael Hartmann & Matthew Murrow
Hübner, R., Steinhauser, M., & Lehle, C. (2010). A dual-stage two-phase model of selective attention. Psychological Review, 117(3), 759-784.
Generate a grid of response-time values and the corresponding PDF values.
For more details on the model see, for example, dSSP
.
dSSP_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
dSSP_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
rt_max |
maximal response time <- max(rt) |
phi |
parameter vector in the following order:
|
x_res |
spatial/evidence resolution |
t_res |
time resolution |
list of RTs and corresponding defective PDFs at lower and upper threshold
Raphael Hartmann & Matthew Murrow
White, C. N., Ratcliff, R., & Starns, J. J. (2011). Diffusion models of the flanker task: Discrete versus gradual attentional selection. Cognitive Psychology, 63(4), 210–238.
Generate a grid of response-time values and the corresponding PDF values.
For more details on the model see, for example, dUGM
.
dUGM_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
dUGM_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
rt_max |
maximal response time <- max(rt) |
phi |
parameter vector in the following order:
|
x_res |
spatial/evidence resolution |
t_res |
time resolution |
list of RTs and corresponding defective PDFs at lower and upper threshold
Raphael Hartmann & Matthew Murrow
Cisek, P., Puskas, G. A., & El-Murr, S. (2009). Decisions in changing conditions: the urgency-gating model. Journal of Neuroscience, 29(37), 11560-11571.
Trueblood, J. S., Heathcote, A., Evans, N. J., & Holmes, W. R. (2021). Urgency, leakage, and the relative nature of information processing in decision-making. Psychological Review, 128(1), 160-186.
Generate a grid of response-time values and the corresponding PDF values.
For more details on the model see, for example, dUGMF
.
dUGMF_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
dUGMF_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
rt_max |
maximal response time <- max(rt) |
phi |
parameter vector in the following order:
|
x_res |
spatial/evidence resolution |
t_res |
time resolution |
list of RTs and corresponding defective PDFs at lower and upper threshold
Raphael Hartmann & Matthew Murrow
Cisek, P., Puskas, G. A., & El-Murr, S. (2009). Decisions in changing conditions: the urgency-gating model. Journal of Neuroscience, 29(37), 11560-11571.
Trueblood, J. S., Heathcote, A., Evans, N. J., & Holmes, W. R. (2021). Urgency, leakage, and the relative nature of information processing in decision-making.
Generate a grid of response-time values and the corresponding PDF values.
For more details on the model see, for example, dWDSTP
.
dWDSTP_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
dWDSTP_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
rt_max |
maximal response time <- max(rt) |
phi |
parameter vector in the following order:
|
x_res |
spatial/evidence resolution |
t_res |
time resolution |
list of RTs and corresponding defective PDFs at lower and upper threshold
Raphael Hartmann & Matthew Murrow
Hübner, R., Steinhauser, M., & Lehle, C. (2010). A dual-stage two-phase model of selective attention. Psychological Review, 117(3), 759-784.
Generate a grid of response-time values and the corresponding PDF values.
For more details on the model see, for example, dWTM
.
dWTM_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
dWTM_grid(rt_max = 10, phi, x_res = "default", t_res = "default")
rt_max |
maximal response time <- max(rt) |
phi |
parameter vector in the following order:
|
x_res |
spatial/evidence resolution |
t_res |
time resolution |
list of RTs and corresponding defective PDFs at lower and upper threshold
Raphael Hartmann & Matthew Murrow
Hawkins, G. E., Forstmann, B. U., Wagenmakers, E.-J., Ratcliff, R., & Brown, S. D. (2015). Revisiting the Evidence for Collapsing Boundaries and Urgency Signals in Perceptual Decision-Making. The Journal of Neuroscience, 35(6), 2476-2484.
Palestro, J. J., Weichart, E., Sederberg, P. B., & Turner, B. M. (2018). Some task demands induce collapsing bounds: Evidence from a behavioral analysis. Psychonomic Bulletin & Review, 25(4), 1225-1248.
SDDM with thresholds that change with time. Thresholds are symmetric exponential functions
of the form .
dETM(rt, resp, phi, x_res = "default", t_res = "default") pETM(rt, resp, phi, x_res = "default", t_res = "default") rETM(n, phi, dt = 1e-05)
dETM(rt, resp, phi, x_res = "default", t_res = "default") pETM(rt, resp, phi, x_res = "default", t_res = "default") rETM(n, phi, dt = 1e-05)
rt |
vector of response times |
resp |
vector of responses ("upper" and "lower") |
phi |
parameter vector in the following 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) |
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).
Raphael Hartmann & Matthew Murrow
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, 56(3), 2636-2656.
# Probability density function dETM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 0.5, 0.0, 0.0, 1.0)) # Cumulative distribution function pETM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 0.5, 0.0, 0.0, 1.0)) # Random sampling rETM(n = 100, phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 0.5, 0.0, 0.0, 1.0))
# Probability density function dETM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 0.5, 0.0, 0.0, 1.0)) # Cumulative distribution function pETM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 0.5, 0.0, 0.0, 1.0)) # Random sampling rETM(n = 100, phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 0.5, 0.0, 0.0, 1.0))
SDDM modified to encode leaky integration in the drift rate. Also known as an
Ornstein-Uhlenbeck model, its drift rate is where
is the
leakage rate. All other parameters are unchanged from the SDDM. Leakage describes
the rate at which old information is lost from the accumulator, occurring on a
time scale of approximately
. The LIM is used to model decay of excitatory
currents in decision neurons (Usher & McClelland, 2001; Wong & Wang, 2006) and
has been proposed as a mechanism for preference reversals under time pressure
(Busemeyer & Townsend, 1993). Due to its neural plausibility and simple functional
form, recent work has proposed it as an alternative psychometric tool to the SDDM
(Wang & Donkin, 2024).
dLIM(rt, resp, phi, x_res = "default", t_res = "default") pLIM(rt, resp, phi, x_res = "default", t_res = "default") rLIM(n, phi, dt = 1e-05)
dLIM(rt, resp, phi, x_res = "default", t_res = "default") pLIM(rt, resp, phi, x_res = "default", t_res = "default") rLIM(n, phi, dt = 1e-05)
rt |
vector of response times |
resp |
vector of responses ("upper" and "lower") |
phi |
parameter vector in the following 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) |
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).
Raphael Hartmann & Matthew Murrow
Busemeyer, J. R., & Townsend, J. T. (1993). Decision field theory: A dynamic-cognitive approach to decision making in an uncertain environment. Psychological Review, 100(3), 432-459.
Usher, M., & McClelland, J. L. (2001). The time course of perceptual choice: The leaky, competing accumulator model. Psychological Review, 108(3), 550-592.
Wang, J.-S., & Donkin, C. (2024). The neural implausibility of the diffusion decision model doesn’t matter for cognitive psychometrics, but the Ornstein-Uhlenbeck model is better. Psychonomic Bulletin & Review.
Wong, K.-F., & Wang, X.-J. (2006). A Recurrent Network Mechanism of Time Integration in Perceptual Decisions. The Journal of Neuroscience, 26(4), 1314-1328.
# Probability density function dLIM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 0.5, 1.0, 0.5, 0.0, 0.0, 1.0)) # Cumulative distribution function pLIM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 0.5, 1.0, 0.5, 0.0, 0.0, 1.0)) # Random sampling rLIM(n = 100, phi = c(0.3, 0.5, 1.0, 0.5, 1.0, 0.5, 0.0, 0.0, 1.0))
# Probability density function dLIM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 0.5, 1.0, 0.5, 0.0, 0.0, 1.0)) # Cumulative distribution function pLIM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 0.5, 1.0, 0.5, 0.0, 0.0, 1.0)) # Random sampling rLIM(n = 100, phi = c(0.3, 0.5, 1.0, 0.5, 1.0, 0.5, 0.0, 0.0, 1.0))
LIM with time varying drift rate. Specifically, the stimulus strength changes from
to
at time
. Identified by (Evans et al., 2020; Trueblood et al., 2021)
as a way to improve recovery of the leakage rate. Drift rate becomes
if
and
if
dLIMF(rt, resp, phi, x_res = "default", t_res = "default") pLIMF(rt, resp, phi, x_res = "default", t_res = "default") rLIMF(n, phi, dt = 1e-05)
dLIMF(rt, resp, phi, x_res = "default", t_res = "default") pLIMF(rt, resp, phi, x_res = "default", t_res = "default") rLIMF(n, phi, dt = 1e-05)
rt |
vector of response times |
resp |
vector of responses ("upper" and "lower") |
phi |
parameter vector in the following 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) |
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).
Raphael Hartmann & Matthew Murrow
Evans, N. J., Trueblood, J. S., & Holmes, W. R. (2019). A parameter recovery assessment of time-variant models of decision-making. Behavior Research Methods, 52(1), 193-206.
Trueblood, J. S., Heathcote, A., Evans, N. J., & Holmes, W. R. (2021). Urgency, leakage, and the relative nature of information processing in decision-making. Psychological Review, 128(1), 160-186.
# Probability density function dLIMF(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 0.9, 0.5, 0.5, 1.0, 0.5, 0.0, 0.0, 1.0)) # Cumulative distribution function pLIMF(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 0.9, 0.5, 0.5, 1.0, 0.5, 0.0, 0.0, 1.0)) # Random sampling rLIMF(n = 100, phi = c(0.3, 0.5, 1.0, 0.9, 0.5, 0.5, 1.0, 0.5, 0.0, 0.0, 1.0))
# Probability density function dLIMF(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 0.9, 0.5, 0.5, 1.0, 0.5, 0.0, 0.0, 1.0)) # Cumulative distribution function pLIMF(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 0.9, 0.5, 0.5, 1.0, 0.5, 0.0, 0.0, 1.0)) # Random sampling rLIMF(n = 100, phi = c(0.3, 0.5, 1.0, 0.9, 0.5, 0.5, 1.0, 0.5, 0.0, 0.0, 1.0))
SDDM with thresholds that change with time. Thresholds are symmetric linear functions
of the form .
dLTM(rt, resp, phi, x_res = "default", t_res = "default") pLTM(rt, resp, phi, x_res = "default", t_res = "default") rLTM(n, phi, dt = 1e-05)
dLTM(rt, resp, phi, x_res = "default", t_res = "default") pLTM(rt, resp, phi, x_res = "default", t_res = "default") rLTM(n, phi, dt = 1e-05)
rt |
vector of response times |
resp |
vector of responses ("upper" and "lower") |
phi |
parameter vector in the following 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) |
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).
Raphael Hartmann & Matthew Murrow
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, 56(3), 2636-2656.
# Probability density function dLTM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 1.0, 0.0, 0.0, 1.0)) # Cumulative distribution function pLTM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 1.0, 0.0, 0.0, 1.0)) # Random sampling rLTM(n = 100, phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 1.0, 0.0, 0.0, 1.0))
# Probability density function dLTM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 1.0, 0.0, 0.0, 1.0)) # Cumulative distribution function pLTM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 1.0, 0.0, 0.0, 1.0)) # Random sampling rLTM(n = 100, phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 1.0, 0.0, 0.0, 1.0))
The PAM (aka dual-process model) is an evidence accumulation model developed to study cognition in conflict tasks like the Eriksen flanker task. It is similar to the SSP, but instead of a gradual narrowing of attention, target selection is discrete. Its total drift rate is
where and
are 0 if
and 1 otherwise. The PAM
otherwise maintains the parameters of the SDDM.
dPAM(rt, resp, phi, x_res = "default", t_res = "default") pPAM(rt, resp, phi, x_res = "default", t_res = "default") rPAM(n, phi, dt = 1e-05)
dPAM(rt, resp, phi, x_res = "default", t_res = "default") pPAM(rt, resp, phi, x_res = "default", t_res = "default") rPAM(n, phi, dt = 1e-05)
rt |
vector of response times |
resp |
vector of responses ("upper" and "lower") |
phi |
parameter vector in the following 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) |
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).
Raphael Hartmann & Matthew Murrow
White, C. N., Ratcliff, R., & Starns, J. J. (2011). Diffusion models of the flanker task: Discrete versus gradual attentional selection. Cognitive Psychology, 63(4), 210-238.
# Probability density function dPAM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.25, 0.5, -0.3, -0.3, 0.3, 0.25, 1.0, 0.5, 0.0, 0.0, 1.0)) # Cumulative distribution function pPAM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.25, 0.5, -0.3, -0.3, 0.3, 0.25, 1.0, 0.5, 0.0, 0.0, 1.0)) # Random sampling rPAM(n = 100, phi = c(0.25, 0.5, -0.3, -0.3, 0.3, 0.25, 1.0, 0.5, 0.0, 0.0, 1.0))
# Probability density function dPAM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.25, 0.5, -0.3, -0.3, 0.3, 0.25, 1.0, 0.5, 0.0, 0.0, 1.0)) # Cumulative distribution function pPAM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.25, 0.5, -0.3, -0.3, 0.3, 0.25, 1.0, 0.5, 0.0, 0.0, 1.0)) # Random sampling rPAM(n = 100, phi = c(0.25, 0.5, -0.3, -0.3, 0.3, 0.25, 1.0, 0.5, 0.0, 0.0, 1.0))
A DMC-like model which modifies the shape of the controlled and automatic processes
to ensure consistent stimulus representation across the task. It maintains all SDDM
parameters outside the drift rate which is , where
and
.
dRDMC(rt, resp, phi, x_res = "default", t_res = "default") pRDMC(rt, resp, phi, x_res = "default", t_res = "default") rRDMC(n, phi, dt = 1e-05)
dRDMC(rt, resp, phi, x_res = "default", t_res = "default") pRDMC(rt, resp, phi, x_res = "default", t_res = "default") rRDMC(n, phi, dt = 1e-05)
rt |
vector of response times |
resp |
vector of responses ("upper" and "lower") |
phi |
parameter vector in the following 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) |
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).
Raphael Hartmann & Matthew Murrow
Lee, P.-S., & Sewell, D. K. (2023). A revised diffusion model for conflict tasks. Psychonomic Bulletin & Review, 31(1), 1–31.
# Probability density function dRDMC(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.35, 0.5, 7.5, 40.0, 5.0, 5.0, 1.0, 0.5, 0.0, 0.0, 1.0)) # Cumulative distribution function pRDMC(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.35, 0.5, 7.5, 40.0, 5.0, 5.0, 1.0, 0.5, 0.0, 0.0, 1.0)) # Random sampling rRDMC(n = 100, phi = c(0.35, 0.5, 7.5, 40.0, 5.0, 5.0, 1.0, 0.5, 0.0, 0.0, 1.0))
# Probability density function dRDMC(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.35, 0.5, 7.5, 40.0, 5.0, 5.0, 1.0, 0.5, 0.0, 0.0, 1.0)) # Cumulative distribution function pRDMC(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.35, 0.5, 7.5, 40.0, 5.0, 5.0, 1.0, 0.5, 0.0, 0.0, 1.0)) # Random sampling rRDMC(n = 100, phi = c(0.35, 0.5, 7.5, 40.0, 5.0, 5.0, 1.0, 0.5, 0.0, 0.0, 1.0))
SDDM with thresholds that change with time. Thresholds are rational functions of the form
dRTM(rt, resp, phi, x_res = "default", t_res = "default") pRTM(rt, resp, phi, x_res = "default", t_res = "default") rRTM(n, phi, dt = 1e-05)
dRTM(rt, resp, phi, x_res = "default", t_res = "default") pRTM(rt, resp, phi, x_res = "default", t_res = "default") rRTM(n, phi, dt = 1e-05)
rt |
vector of response times |
resp |
vector of responses ("upper" and "lower") |
phi |
parameter vector in the following 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) |
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).
Raphael Hartmann & Matthew Murrow
Churchland, A. K., Kiani, R., & Shadlen, M. N. (2008). Decision-making with multiple alternatives. Nature Neuroscience, 11(6), 693-702.
Hanks, T. D., Mazurek, M. E., Kiani, R., Hopp, E., & Shadlen, M. N. (2011). Elapsed Decision Time Affects the Weighting of Prior Probability in a Perceptual Decision Task. The Journal of Neuroscience, 31(17), 6339-6352.
Voskuilen, C., Ratcliff, R., & Smith, P. L. (2016). Comparing fixed and collapsing boundary versions of the diffusion model. Journal of Mathematical Psychology, 73, 59-79.
# Probability density function dRTM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 0.5, 0.5, 0.0, 0.0, 1.0)) # Cumulative distribution function pRTM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 0.5, 0.5, 0.0, 0.0, 1.0)) # Random sampling rRTM(n = 100, phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 0.5, 0.5, 0.0, 0.0, 1.0))
# Probability density function dRTM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 0.5, 0.5, 0.0, 0.0, 1.0)) # Cumulative distribution function pRTM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 0.5, 0.5, 0.0, 0.0, 1.0)) # Random sampling rRTM(n = 100, phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 0.5, 0.5, 0.0, 0.0, 1.0))
Density (PDF), distribution function (CDF), and random sampler for the simple drift diffusion model (SDDM) without across-trial variabilities.
dSDDM(rt, resp, phi, x_res = "default", t_res = "default") pSDDM(rt, resp, phi, x_res = "default", t_res = "default") rSDDM(n, phi, dt = 1e-05)
dSDDM(rt, resp, phi, x_res = "default", t_res = "default") pSDDM(rt, resp, phi, x_res = "default", t_res = "default") rSDDM(n, phi, dt = 1e-05)
rt |
vector of response times |
resp |
vector of responses ("upper" and "lower") |
phi |
parameter vector in the following 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) |
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).
Raphael Hartmann & Matthew Murrow
Ratcliff, R. (1978). A theory of memory retrieval. Psychological Review, 85(2), 59-108.
Ratcliff, R., & McKoon, G. (2008). The Diffusion Decision Model: Theory and Data for Two-Choice Decision Tasks. Neural Computation, 20(4), 873-922.
# Probability density function dSDDM(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)) # Cumulative distribution function pSDDM(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)) # Random sampling rSDDM(n = 100, phi = c(0.3, 0.5, 1.0, 1.0, 0.75, 0.0, 0.0, 1.0))
# Probability density function dSDDM(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)) # Cumulative distribution function pSDDM(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)) # Random sampling rSDDM(n = 100, phi = c(0.3, 0.5, 1.0, 1.0, 0.75, 0.0, 0.0, 1.0))
The Sequential Dual Process Model (SDPM) is similar in principle to the DSTP, but instead
of simultaneous accumulators, it contains sequential accumulator s. Its drift rate is given by
where
is 0 if the second process hasn't crossed a
threshold yet and 1 if it has. The noise scale has a similar structure
.
dSDPM(rt, resp, phi, x_res = "default", t_res = "default") pSDPM(rt, resp, phi, x_res = "default", t_res = "default") rSDPM(n, phi, dt = 1e-05)
dSDPM(rt, resp, phi, x_res = "default", t_res = "default") pSDPM(rt, resp, phi, x_res = "default", t_res = "default") rSDPM(n, phi, dt = 1e-05)
rt |
vector of response times |
resp |
vector of responses ("upper" and "lower") |
phi |
parameter vector in the following 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) |
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).
Raphael Hartmann & Matthew Murrow
Hübner, R., Steinhauser, M., & Lehle, C. (2010). A dual-stage two-phase model of selective attention. Psychological Review, 117(3), 759-784.
# Probability density function dSDPM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 1.0, 0.5, 1.0, 1.0, 1.0, 1.0, 0.75, 0.75, 0.0, 0.0, 1.0)) # Cumulative distribution function pSDPM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 1.0, 0.5, 1.0, 1.0, 1.0, 1.0, 0.75, 0.75, 0.0, 0.0, 1.0)) # Random sampling rSDPM(n = 100, phi = c(0.3, 1.0, 0.5, 1.0, 1.0, 1.0, 1.0, 0.75, 0.75, 0.0, 0.0, 1.0), dt = 0.001)
# Probability density function dSDPM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 1.0, 0.5, 1.0, 1.0, 1.0, 1.0, 0.75, 0.75, 0.0, 0.0, 1.0)) # Cumulative distribution function pSDPM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 1.0, 0.5, 1.0, 1.0, 1.0, 1.0, 0.75, 0.75, 0.0, 0.0, 1.0)) # Random sampling rSDPM(n = 100, phi = c(0.3, 1.0, 0.5, 1.0, 1.0, 1.0, 1.0, 0.75, 0.75, 0.0, 0.0, 1.0), dt = 0.001)
The SSP is an evidence accumulation model developed to study cognition in conflict tasks like the Eriksen flanker task. It is based on theories of visual attention and assumes that attention acts like a shrinking spotlight which is gradually narrowed on the target. It maintains all SDDM parameters outside of the drift rate. A full description of the model is in the REAM publication.
dSSP(rt, resp, phi, x_res = "default", t_res = "default") pSSP(rt, resp, phi, x_res = "default", t_res = "default") rSSP(n, phi, dt = 1e-05)
dSSP(rt, resp, phi, x_res = "default", t_res = "default") pSSP(rt, resp, phi, x_res = "default", t_res = "default") rSSP(n, phi, dt = 1e-05)
rt |
vector of response times |
resp |
vector of responses ("upper" and "lower") |
phi |
parameter vector in the following 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) |
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).
Raphael Hartmann & Matthew Murrow
White, C. N., Ratcliff, R., & Starns, J. J. (2011). Diffusion models of the flanker task: Discrete versus gradual attentional selection. Cognitive Psychology, 63(4), 210–238.
# Probability density function dSSP(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 7.5, -1.0, -0.5, 0.5, 1.5, 3.75, 3.75, 3.75, 1.0, 0.75, 0.0, 0.0, 1.0)) # Cumulative distribution function pSSP(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 7.5, -1.0, -0.5, 0.5, 1.5, 3.75, 3.75, 3.75, 1.0, 0.75, 0.0, 0.0, 1.0)) # Random sampling rSSP(n = 100, phi = c(0.3, 0.5, 1.0, 7.5, -1.0, -0.5, 0.5, 1.5, 3.75, 3.75, 3.75, 1.0, 0.75, 0.0, 0.0, 1.0))
# Probability density function dSSP(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 7.5, -1.0, -0.5, 0.5, 1.5, 3.75, 3.75, 3.75, 1.0, 0.75, 0.0, 0.0, 1.0)) # Cumulative distribution function pSSP(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 7.5, -1.0, -0.5, 0.5, 1.5, 3.75, 3.75, 3.75, 1.0, 0.75, 0.0, 0.0, 1.0)) # Random sampling rSSP(n = 100, phi = c(0.3, 0.5, 1.0, 7.5, -1.0, -0.5, 0.5, 1.5, 3.75, 3.75, 3.75, 1.0, 0.75, 0.0, 0.0, 1.0))
The Urgency Gating Model (UGM) is a decision-making model which proposes that stimulus information is first low pass filtered, then used to update the decision state through a time varying gain function (Cisek et al., 2009). Though not initially formulated as an EAM, following the procedure of (Trueblood et al., 2021) it can be written as one. Doing so modifies the drift rate to
dUGM(rt, resp, phi, x_res = "default", t_res = "default") pUGM(rt, resp, phi, x_res = "default", t_res = "default") rUGM(n, phi, dt = 1e-05)
dUGM(rt, resp, phi, x_res = "default", t_res = "default") pUGM(rt, resp, phi, x_res = "default", t_res = "default") rUGM(n, phi, dt = 1e-05)
rt |
vector of response times |
resp |
vector of responses ("upper" and "lower") |
phi |
parameter vector in the following 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) |
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).
Raphael Hartmann & Matthew Murrow
Cisek, P., Puskas, G. A., & El-Murr, S. (2009). Decisions in changing conditions: the urgency-gating model. Journal of Neuroscience, 29(37), 11560-11571.
Trueblood, J. S., Heathcote, A., Evans, N. J., & Holmes, W. R. (2021). Urgency, leakage, and the relative nature of information processing in decision-making.
# Probability density function dUGM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 0.5, 0.5, 1.0, 1.5, 0.0, 0.0, 1.0)) # Cumulative distribution function pUGM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 0.5, 0.5, 1.0, 1.5, 0.0, 0.0, 1.0)) # Random sampling rUGM(n = 100, phi = c(0.3, 0.5, 1.0, 0.5, 0.5, 1.0, 1.5, 0.0, 0.0, 1.0))
# Probability density function dUGM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 0.5, 0.5, 1.0, 1.5, 0.0, 0.0, 1.0)) # Cumulative distribution function pUGM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 0.5, 0.5, 1.0, 1.5, 0.0, 0.0, 1.0)) # Random sampling rUGM(n = 100, phi = c(0.3, 0.5, 1.0, 0.5, 0.5, 1.0, 1.5, 0.0, 0.0, 1.0))
UGM with time varying drift rate. Specifically, the stimulus strength changes from
to
at time
. Identified by (Trueblood et al., 2021) as
a way to improve recovery of the leakage rate and urgency. Drift rate becomes
and
dUGMF(rt, resp, phi, x_res = "default", t_res = "default") pUGMF(rt, resp, phi, x_res = "default", t_res = "default") rUGMF(n, phi, dt = 1e-05)
dUGMF(rt, resp, phi, x_res = "default", t_res = "default") pUGMF(rt, resp, phi, x_res = "default", t_res = "default") rUGMF(n, phi, dt = 1e-05)
rt |
vector of response times |
resp |
vector of responses ("upper" and "lower") |
phi |
parameter vector in the following 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) |
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).
Raphael Hartmann & Matthew Murrow
Cisek, P., Puskas, G. A., & El-Murr, S. (2009). Decisions in changing conditions: the urgency-gating model. Journal of Neuroscience, 29(37), 11560-11571.
Trueblood, J. S., Heathcote, A., Evans, N. J., & Holmes, W. R. (2021). Urgency, leakage, and the relative nature of information processing in decision-making.
# Probability density function dUGMF(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 0.9, 0.5, 0.5, 0.5, 1.0, 1.5, 0.0, 0.0, 1.0)) # Cumulative distribution function pUGMF(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 0.9, 0.5, 0.5, 0.5, 1.0, 1.5, 0.0, 0.0, 1.0)) # Random sampling rUGMF(n = 100, phi = c(0.3, 0.5, 1.0, 0.9, 0.5, 0.5, 0.5, 1.0, 1.5, 0.0, 0.0, 1.0))
# Probability density function dUGMF(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 0.9, 0.5, 0.5, 0.5, 1.0, 1.5, 0.0, 0.0, 1.0)) # Cumulative distribution function pUGMF(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 0.9, 0.5, 0.5, 0.5, 1.0, 1.5, 0.0, 0.0, 1.0)) # Random sampling rUGMF(n = 100, phi = c(0.3, 0.5, 1.0, 0.9, 0.5, 0.5, 0.5, 1.0, 1.5, 0.0, 0.0, 1.0))
A continuous approximation of the Dual-Stage Two-Phase model of conflict tasks. The Dual-Stage Two-Phase model assumes that choice in conflict tasks involves two processes: a decision process and a target selection process. Unlike the CDSTP, the target selection process here is a Weibull cumulative distribution function. The decision process is an SDDM but with drift rate
where before target selection and
after target selection.
A full derivation of this model is in the ream publication.
dWDSTP(rt, resp, phi, x_res = "default", t_res = "default") pWDSTP(rt, resp, phi, x_res = "default", t_res = "default") rWDSTP(n, phi, dt = 1e-05)
dWDSTP(rt, resp, phi, x_res = "default", t_res = "default") pWDSTP(rt, resp, phi, x_res = "default", t_res = "default") rWDSTP(n, phi, dt = 1e-05)
rt |
vector of response times |
resp |
vector of responses ("upper" and "lower") |
phi |
parameter vector in the following 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) |
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).
Raphael Hartmann & Matthew Murrow
Hübner, R., Steinhauser, M., & Lehle, C. (2010). A dual-stage two-phase model of selective attention. Psychological Review, 117(3), 759-784.
# Probability density function dWDSTP(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 1.0, -1.0, -0.5, 8.0, 1.0, 1.0, 1.0, 2.0, 1.3, 0.0, 0.0, 1.0)) # Cumulative distribution function pWDSTP(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 1.0, -1.0, -0.5, 8.0, 1.0, 1.0, 1.0, 2.0, 1.3, 0.0, 0.0, 1.0)) # Random sampling rWDSTP(n = 100, phi = c(0.3, 0.5, 1.0, 1.0, -1.0, -0.5, 8.0, 1.0, 1.0, 1.0, 2.0, 1.3, 0.0, 0.0, 1.0))
# Probability density function dWDSTP(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 1.0, -1.0, -0.5, 8.0, 1.0, 1.0, 1.0, 2.0, 1.3, 0.0, 0.0, 1.0)) # Cumulative distribution function pWDSTP(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 1.0, -1.0, -0.5, 8.0, 1.0, 1.0, 1.0, 2.0, 1.3, 0.0, 0.0, 1.0)) # Random sampling rWDSTP(n = 100, phi = c(0.3, 0.5, 1.0, 1.0, -1.0, -0.5, 8.0, 1.0, 1.0, 1.0, 2.0, 1.3, 0.0, 0.0, 1.0))
SDDM with thresholds that change with time. Thresholds are Weibull functions of the
form
dWTM(rt, resp, phi, x_res = "default", t_res = "default") pWTM(rt, resp, phi, x_res = "default", t_res = "default") rWTM(n, phi, dt = 1e-05)
dWTM(rt, resp, phi, x_res = "default", t_res = "default") pWTM(rt, resp, phi, x_res = "default", t_res = "default") rWTM(n, phi, dt = 1e-05)
rt |
vector of response times |
resp |
vector of responses ("upper" and "lower") |
phi |
parameter vector in the following 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) |
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).
Raphael Hartmann & Matthew Murrow
Hawkins, G. E., Forstmann, B. U., Wagenmakers, E.-J., Ratcliff, R., & Brown, S. D. (2015). Revisiting the Evidence for Collapsing Boundaries and Urgency Signals in Perceptual Decision-Making. The Journal of Neuroscience, 35(6), 2476-2484.
Palestro, J. J., Weichart, E., Sederberg, P. B., & Turner, B. M. (2018). Some task demands induce collapsing bounds: Evidence from a behavioral analysis. Psychonomic Bulletin & Review, 25(4), 1225-1248.
# Probability density function dWTM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 0.2, 0.5, -1.0, 0.0, 0.0, 1.0)) # Cumulative distribution function pWTM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 0.2, 0.5, -1.0, 0.0, 0.0, 1.0)) # Random sampling rWTM(n = 100, phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 0.2, 0.5, -1.0, 0.0, 0.0, 1.0), dt = 0.0001)
# Probability density function dWTM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 0.2, 0.5, -1.0, 0.0, 0.0, 1.0)) # Cumulative distribution function pWTM(rt = c(1.2, 0.6, 0.4), resp = c("upper", "lower", "lower"), phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 0.2, 0.5, -1.0, 0.0, 0.0, 1.0)) # Random sampling rWTM(n = 100, phi = c(0.3, 0.5, 1.0, 1.0, 1.5, 0.2, 0.5, -1.0, 0.0, 0.0, 1.0), dt = 0.0001)