Evaluating the speed of different approximations to the density function of the diffusion decision model
The diffusion decision model (DDM) is the most prominent model for jointly modelling binary responses and associated response times. One hurdle in estimating the DDM is that the probability density function contains an infinite sum for which several different approximations exist. The goal of this project is to compare which of these approximations is the fastest given parameter values that are typically encountered when fitting the DDM. To this end, we implemented all existing approximations as well as some new combinations of existing methods in C++ and provided an interface to R via Rcpp. This enabled us not only to evaluate each approximation in an equal environment but also to utilize the faster C++ language while maintaining the R language interface. Using a benchmark approach, we compared the speed of all approximations against each other (as well as against some existing R implementations). The results of these benchmarks show that approximations that switch between the so-called small-time and large-time approximation based on input response time and parameter values are on average fastest, especially when combined with fast implementations of the small-time approximation. In addition, our new C++ implementations are faster than all existing implementations, even when including variability in the drift rate.