Learn R Programming

rtdists (version 0.12-0)

single-RDM: Single accumulator of the racing diffusion model (RDM)

Description

Density, distribution, and random generation functions for a single Wald accumulator, that is, a diffusion process with within-trial variability in drift rate racing towards a single threshold with a uniformly distributed start point.

Usage

dwald(rt, A, b, t0, v, s = 1)

pwald(rt, A, b, t0, v, s = 1)

rwald(n, A, b, t0, v, s = 1, st0 = 0)

Value

All functions starting with a d return the density (PDF), all functions starting with p return the distribution function (CDF), and all functions starting with r return random response times and responses (in a matrix).

Arguments

rt

a vector of RTs.

A

start point interval or evidence in accumulator before beginning of decision process. Start point varies from trial to trial in the interval [0, A] (uniform distribution). Average amount of evidence before evidence accumulation across trials is A/2.

b

response threshold. (b - A/2) is a measure of "response caution".

t0

non-decision time or response time constant (in seconds). Lower bound for the duration of all non-decisional processes (encoding and response execution).

v

drift rate. Mean rate of evidence accumulation within a trial. Needs to be positive, accumulators with a negative rate never finish.

s

within-trial standard deviation of the evidence accumulation process (i.e., the diffusion constant), scales A, b, and v. Needs to be fixed to a constant in most applications. Default is 1.

n

desired number of observations (scalar integer).

st0

variability of non-decision time, such that t0 is uniformly distributed between t0 and t0 + st0. Only available in random number generation function rwald.

Details

These functions are mainly for internal purposes. We do not recommend to use them. Use the high-level functions described in RDM instead.

References

Tillman, G., Van Zandt, T., & Logan, G. D. (2020). Sequential sampling models without random between-trial variability: The racing diffusion model of speeded decision making. Psychonomic Bulletin & Review, 27(5), 911-936. doi:10.3758/s13423-020-01719-6

Logan, G. D., Van Zandt, T., Verbruggen, F., & Wagenmakers, E.-J. (2014). On the ability to inhibit thought and action: General and special theories of an act of control. Psychological Review, 121(1), 66-95. doi:10.1037/a0035230

Examples

Run this code
## random number generation for a single Wald accumulator:
rwald(10, A=0.5, b=1, t0 = 0.5, v=c(1.2, 1))

# use somewhat plausible values for plotting:
A <- 0.2
b <- 0.5
t0 <- 0.3

# plot density:
curve(dwald(x, A=A, b=b, t0=t0, v=2), ylim = c(0, 4), xlim = c(0, 3),
      main="Density/PDF of the Wald accumulator", ylab="density",
      xlab="response time")
curve(dwald(x, A=0, b=b, t0=t0, v=2), add=TRUE, lty = 2)
legend("topright", legend=c("0.2", "0"),
       title = expression("Start point variability"~~italic(A)), lty = 1:2)

# plot cdf:
curve(pwald(x, A=A, b=b, t0=t0, v=2), xlim = c(0, 3), ylim = c(0, 1),
      ylab = "cumulative probability", xlab = "response time",
      main = "Distribution/CDF of the Wald accumulator")
curve(pwald(x, A=0, b=b, t0=t0, v=2), add=TRUE, lty = 2)
legend("bottomright", legend=c("0.2", "0"),
       title = expression("Start point variability"~~italic(A)), lty = 1:2)

Run the code above in your browser using DataLab