# dsvWienerPDF: Partial derivative of the first-passage time probability... In WienR: Derivatives of the First-Passage Time Density and Cumulative Distribution Function, and Random Sampling from the (Truncated) First-Passage Time Distribution

 dsvWienerPDF R Documentation

## Partial derivative of the first-passage time probability density function of the diffusion model with respect to the inter-trial variability of the drift rate

### Description

Calculates the partial derivative of the first-passage time probability density function of the diffusion model with respect to the inter-trial variability of the drift rate sv.

### Usage

```dsvWienerPDF(
t,
response,
a,
v,
w,
t0 = 0,
sv,
sw = 0,
st0 = 0,
precision = NULL,
K = NULL,
n.evals = 6000
)
```

### 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 partial derivative. Numeric value. Default is `NULL`, which takes default value 1e-12. `K` Optional numeric value. 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. `n.evals` Optional. Number of maximal function evaluations in the numeric integral. Default is `6000` and `0` implies no limit and the numeric integration goes on until the specified `precision` is guaranteed.

### Value

A list of the class `Diffusion_deriv` containing

• `deriv`: the derivatives of the PDF with respect to a,

• `call`: the function call,

• `err`: the absolute error.

Raphael Hartmann

### References

Hartmann, R., & Klauer, K. C. (2021). Partial derivatives for the first-passage time distribution in Wiener diffusion models. Journal of Mathematical Psychology, 103, 102550. doi: 10.1016/j.jmp.2021.102550

### Examples

```dsvWienerPDF(t = 1.2, response = "upper", a = 1.1, v = 13, w = .6, sv = .2)
```

WienR documentation built on April 23, 2022, 9:05 a.m.