We present a novel method for approximating the probability density function (PDF) of the first-passage times in the Ratcliff diffusion decision model (DDM). We implemented this approximation method in $\texttt{C++}$ using the $\texttt{R}$ package $\texttt{Rcpp}$ to utilize the faster $\texttt{C++}$ language while maintaining the $\texttt{R}$ language interface. In addition to our novel approximation method, we also compiled all known approximation methods for the DDM density function (with fixed and variable drift rate), including previously unused combinations of techniques found in the relevant literature. We ported these approximation methods to $\texttt{C++}$ and optimized them to run in this new language. Given an acceptable error tolerance in the value of the PDF approximation, we benchmarked all of these approximation methods to compare their speed against each other and also against commonly used $\texttt{R}$ functions from the literature. The results of these tests show that our novel approximation method is not only orders of magnitude faster than the current standards, but it is also faster than all of the other approximation methods available even after translation and optimization to the faster $\texttt{C++}$ language. All of these approximation methods are bundled in the $\texttt{fddm}$ package for the $\texttt{R}$ statistical computing language; this package is available via CRAN, and the source code is available on GitHub.
翻译:在 Ratcliff 扩散决定模型 (DDM) 中,我们提出了一种新颖的方法,以近似于第一通时间的概率密度函数(PDF{PDF{) 。我们用$\textt{R} 包$\tt{Rpp} $\tt{Rcpp} $\ textt{Rcpp} 美元,在使用快速的 $\ textt{C} 语言界面的同时,使用一种新颖的方法。除了我们的新近似方法之外,我们还为 DDDM 密度函数(固定和可变的流速率) 汇编了所有已知的近似方法。 包括以前在相关文献中发现的技术的未使用组合。 我们将这些近似方法移植到$\ textt{C} 美元, 并优化了它们以这种新语言运行。 在PDF 近似值值的值中, 我们用所有这些近似方法来比较它们的速度, 也比通常使用的 $t{R} 美元 包函数 。这些测试的结果显示, 我们的新近似方法不仅在数量的顺序上, 也比目前最短的版本的所有的版本方法更快。