WDSTP | R Documentation |
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
v(x,t) = (1 - w(t))*(\mu_t + c*\mu_{nt}) + w(t)*\mu_2,
where w(t) = 0
before target selection and w(t) = 1
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)
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.