WienR

Derivatives of the First-Passage Time Density and Cumulative Distribution Function, and Random Sampling from the (Truncated) First-Passage Time Distribution

CRAN Package

First, we provide functions to calculate the partial derivative of the first-passage time diffusion probability density function (PDF) and cumulative distribution function (CDF) with respect to the first-passage time t (only for PDF), the upper barrier a, the drift rate v, the relative starting point w, the non-decision time t0, the inter-trial variability of the drift rate sv, the inter-trial variability of the rel. starting point sw, and the inter-trial variability of the non-decision time st0. In addition the PDF and CDF themselves are also provided. Most calculations are done on the logarithmic scale to make it more stable. Since the PDF, CDF, and their derivatives are represented as infinite series, we give the user the option to control the approximation errors with the argument 'precision'. For the numerical integration we used the C library cubature by Johnson, S. G. (2005-2013) https://github.com/stevengj/cubature. Numerical integration is required whenever sv, sw, and/or st0 is not zero. Note that numerical integration reduces speed of the computation and the precision cannot be guaranteed anymore. Therefore, whenever numerical integration is used an estimate of the approximation error is provided in the output list. Note: The large number of contributors (ctb) is due to copying a lot of C/C++ code chunks from the GNU Scientific Library (GSL). Second, we provide methods to sample from the first-passage time distribution with or without user-defined truncation from above. The first method is a new adaptive rejection sampler building on the works of Gilks and Wild (1992; doi:10.2307/2347565) and Hartmann and Klauer (in press). The second method is a rejection sampler provided by Drugowitsch (2016; doi:10.1038/srep20490). The third method is an inverse transformation sampler. The fourth method is a "pseudo" adaptive rejection sampler that builds on the first method. For more details see the corresponding help files.


Documentation


Team


Insights

Last 30 days

This package has been downloaded 368 times in the last 30 days. Enough downloads to make a small wave in the niche community. The curiosity is spreading! The following heatmap shows the distribution of downloads per day. Yesterday, it was downloaded 22 times.

Sun
Mon
Tue
Wed
Thu
Fri
Sat
0 downloadsMar 2, 2025
0 downloadsMar 3, 2025
0 downloadsMar 4, 2025
0 downloadsMar 5, 2025
0 downloadsMar 6, 2025
13 downloadsMar 7, 2025
20 downloadsMar 8, 2025
5 downloadsMar 9, 2025
23 downloadsMar 10, 2025
5 downloadsMar 11, 2025
3 downloadsMar 12, 2025
32 downloadsMar 13, 2025
3 downloadsMar 14, 2025
30 downloadsMar 15, 2025
1 downloadsMar 16, 2025
18 downloadsMar 17, 2025
9 downloadsMar 18, 2025
20 downloadsMar 19, 2025
10 downloadsMar 20, 2025
10 downloadsMar 21, 2025
4 downloadsMar 22, 2025
2 downloadsMar 23, 2025
26 downloadsMar 24, 2025
10 downloadsMar 25, 2025
8 downloadsMar 26, 2025
4 downloadsMar 27, 2025
45 downloadsMar 28, 2025
2 downloadsMar 29, 2025
3 downloadsMar 30, 2025
3 downloadsMar 31, 2025
21 downloadsApr 1, 2025
9 downloadsApr 2, 2025
2 downloadsApr 3, 2025
5 downloadsApr 4, 2025
22 downloadsApr 5, 2025
1
45

The following line graph shows the downloads per day. You can hover over the graph to see the exact number of downloads per day.

Last 365 days

This package has been downloaded 5,790 times in the last 365 days. A solid achievement! Enough downloads to get noticed at department meetings. The day with the most downloads was Jul 21, 2024 with 76 downloads.

The following line graph shows the downloads per day. You can hover over the graph to see the exact number of downloads per day.

Data provided by CRAN


Binaries


Dependencies

  • Reverse Imports1 package
  • Reverse Suggests1 package