WienerPDF: First-passage time probability density function of the...

Description Usage Arguments Value Author(s) References Examples

View source: R/WienerDens.R

Description

Calculate the first-passage time probability density function of the diffusion model.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
WienerPDF(
  t,
  response,
  a,
  v,
  w,
  t0 = 0,
  sv = 0,
  sw = 0,
  st0 = 0,
  precision = NULL,
  K = NULL,
  n.threads = FALSE
)

Arguments

t

First-passage time. Numeric vector.

response

Response boundary. Character vector with "upper" and "lower" as possible values. Alternatively a numeric vector with 1=lower and 2=upper.

a

Upper barrier. Numeric vector.

v

Drift rate. Numeric vector.

w

Relative starting point. Numeric vector.

t0

Non-decision time. Numeric vector

sv

Inter-trial variability of drift rate. Numeric vector. Standard deviation of a normal distribution N(v, sv).

sw

Inter-trial variability of relative starting point. Numeric vector. Range of uniform distribution U(w-0.5*sw, w+0.5*sw).

st0

Inter-trial variability of non-decision time. Numeric vector. Range of uniform distribution U(t0, t0+st0).

precision

Optional numeric value. Precision of the PDF. Numeric value. Default is NULL, which takes default value 1e-12.

K

Optional. Number of iterations to calculate the infinite sums. Numeric value (integer). Default is NULL.

  • precision = NULL and K = NULL: Default precision = 1e-12 used to calculate internal K.

  • precision != NULL and K = NULL: precision is used to calculate internal K,

  • precision = NULL and K != NULL: K is used as internal K,

  • precision != NULL and K != NULL: if internal K calculated through precision is smaller than K, K is used.

We recommend using either default (precision = K = NULL) or only precision.

n.threads

Optional numerical or logical value. Number of threads to use. If not provided (or 1 or FALSE) parallelization is not used. If set to TRUE then all available threads are used.

Value

A list of the class Diffusion_pdf containing

Author(s)

Raphael Hartmann

References

Gondan, M., Blurton, S. P., & Kesselmeier, M. (2014). Even faster and even more accurate first-passage time densities and distributions for the Wiener diffusion model. Journal of Mathematical Psychology, 60, 20–22. doi:10.1016/j.jmp.2014.05.002

Navarro, D. J., & Fuss, I. G. (2009). Fast and accurate calculations for first-passage times in Wiener diffusion models. Journal of Mathematical Psychology, 53(4), 222–230. doi:10.1016/j.jmp.2009.02.003

Wabersich, D., & Vandekerckhove, J. (2014). The RWiener Package: an R Package Providing Distribution Functions for the Wiener Diffusion Model. The R Journal, 6(1), 49. doi:10.32614/rj-2014-005

Examples

1
WienerPDF(t = 1.2, response = "upper", a = 1.1, v = 13, w = .6, precision = NULL, K = NULL)

WienR documentation built on May 12, 2021, 1:08 a.m.

Related to WienerPDF in WienR...