Description Usage Arguments Details Value Warning Author(s) References Examples
Density and distribution functionof the reaction times of the error responses, and probability of an error, in Ratcliff's diffusion model for two alternative choice RT's.
1 2 3 |
t |
reaction time |
v |
drift rate |
a |
boundary separation |
z |
starting point of the diffusion |
s |
diffusion constant |
s2 |
square of diffusion constant |
k |
terms evaluated in the infinite series (the more, the more accurate) |
This function is vectorized in t
. For small values of t
you need a large range for k
.
Density of the error responses.
Beta version
Raoul Grasman
Ratcliff & Tuerlinckx (2002) Estimating parameters of the diffusion model: Approaches to dealing with contaminant reaction times and parameter variability. Psychonomic Bulletin & Review, 9(3), 438–481.
1 2 3 4 5 6 7 8 9 10 11 12 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (t, v, a, z, s = 0.1, k = 1:100)
{
defect = sapply(t, function(t) pi * s^2 * (exp(-v * z/s^2)/a^2) *
sum(k * sin(k * pi * z/a) * exp(-(v^2/s^2 + pi^2 * k^2 *
s^2/a^2) * t/2)))
defect/p.error(v = v, a = a, z = z, s2 = s^2)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.