Other packages > Find by keyword >

WienR  

Derivatives of the First-Passage Time Density and Cumulative Distribution Function, and Random Sampling from the (Truncated) First-Passage Time Distribution
View on CRAN: Click here


Download and install WienR package within the R console
Install from CRAN:
install.packages("WienR")

Install from Github:
library("remotes")
install_github("cran/WienR")

Install by package version:
library("remotes")
install_version("WienR", "0.3-15")



Attach the package and use:
library("WienR")
Maintained by
Raphael Hartmann
[Scholar Profile | Author Map]
All associated links for this package
First Published: 2021-05-07
Latest Update: 2023-11-29
Description:
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.
How to cite:
Raphael Hartmann (2021). WienR: Derivatives of the First-Passage Time Density and Cumulative Distribution Function, and Random Sampling from the (Truncated) First-Passage Time Distribution. R package version 0.3-15, https://cran.r-project.org/web/packages/WienR. Accessed 05 Aug. 2026.
Previous versions and publish date:
(2026-07-09 08:29), 0.1-9 (2021-05-07 15:10), 0.2-0 (2021-05-12 02:52), 0.2-1 (2021-08-20 11:40), 0.2-2 (2021-09-02 13:10), 0.3-0 (2021-11-25 12:50), 0.3-4 (2022-04-16 02:42), 0.3-6 (2022-04-23 10:00), 0.3-7 (2022-10-28 23:00), 0.3-8 (2023-01-26 16:00), 0.3-9 (2023-04-23 15:40), 0.3-10 (2023-05-23 02:30), 0.3-14 (2023-07-04 13:43), 0.3-15 (2023-11-29 12:20)
Other packages that cited WienR R package
View WienR citation profile
Other R packages that WienR depends, imports, suggests or enhances
Complete documentation for WienR
Downloads during the last 30 days

Today's Hot Picks in Authors and Packages

kernelPSI  
Post-Selection Inference for Nonlinear Variable Selection
Different post-selection inference strategies for kernelselection as described in kernelPSI a Post-S ...
Download / Learn more Package Citations See dependency  
dcov  
A Fast Implementation of Distance Covariance
Efficient methods for computing distance covariance and relevant statistics. See Sz ...
Download / Learn more Package Citations See dependency  
noisyr  
Noise Quantification in High Throughput Sequencing Output
Quantifies and removes technical noise from high-throughput sequencing data. Two approaches are use ...
Download / Learn more Package Citations See dependency  
quickcode  
Quick and Essential 'R' Tricks for Better Scripts
The NOT functions, 'R' tricks and a compilation of some simple quick plus often used 'R' codes to im ...
Download / Learn more Package Citations See dependency  
dhReg  
Dynamic Harmonic Regression
Building and forecasting time series data with multiple seasonality using Dynamic Harmonic Regressio ...
Download / Learn more Package Citations See dependency  

28,083

R Packages

239,283

Dependencies

74,457

Author Associations

28,084

Publication Badges

© Copyright since 2022. All right reserved, rpkg.net.  Based in Cambridge, Massachusetts, USA