SSP | R Documentation |
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)
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.