Calculates the first-passage time cumulative distribution function of the diffusion model.
WienerCDF(
t,
response,
a,
v,
w,
t0 = 0,
sv = 0,
sw = 0,
st0 = 0,
precision = NULL,
K = NULL,
n.threads = FALSE,
n.evals = 6000
)pWDM(
t,
response,
a,
v,
w,
t0 = 0,
sv = 0,
sw = 0,
st0 = 0,
precision = NULL,
K = NULL,
n.threads = FALSE,
n.evals = 6000
)
A list of the class Diffusion_cdf containing
cdf: the CDF,
logcdf: the log-transformed CDF,
call: the function call,
err: the absolute error. Only provided if sv, sw, or st0 is non-zero. If numerical integration is used, the precision cannot always be guaranteed.
First-passage time. Numeric vector.
Response boundary. Character vector with "upper" and "lower" as possible values. Alternatively a numeric vector with
1=lower and 2=upper.
Upper barrier. Numeric vector.
Drift rate. Numeric vector.
Relative starting point. Numeric vector.
Non-decision time. Numeric vector
Inter-trial variability of drift rate. Numeric vector. Standard deviation of a normal distribution N(v, sv).
Inter-trial variability of relative starting point. Numeric vector. Range of uniform distribution U(w-0.5*sw, w+0.5*sw).
Inter-trial variability of non-decision time. Numeric vector. Range of uniform distribution U(t0, t0+st0).
Optional numeric value. Precision of the CDF. Numeric value. Default is NULL, which takes default value 1e-12.
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.
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.
Optional. Number of maximal function evaluations in the numeric integral if sv, sw, and/or st0 are not zero. Default is 6000 and 0 implies no limit and the
numeric integration goes on until the specified precision is guaranteed.
Raphael Hartmann
Blurton, S. P., Kesselmeier, M., & Gondan, M. (2012). Fast and accurate calculations for cumulative first-passage time distributions in Wiener diffusion models. Journal of Mathematical Psychology, 56(6), 470–475. tools:::Rd_expr_doi("10.1016/j.jmp.2012.09.002")
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. tools:::Rd_expr_doi("10.1016/j.jmp.2014.05.002")
Hartmann, R., & Klauer, K. C. (2021). Partial derivatives for the first-passage time distribution in Wiener diffusion models. Journal of Mathematical Psychology, 103, 102550. tools:::Rd_expr_doi("10.1016/j.jmp.2021.102550")
WienerCDF(t = 1.2, response = "upper", a = 1.1, v = 13, w = .6, precision = NULL, K = NULL)
pWDM(t = 1.2, response = "upper", a = 1.1, v = 13, w = .6, precision = NULL, K = NULL)
Run the code above in your browser using DataLab