Department of Psychology, University of Freiburg, Engelbergerstraße 41, D-79106, Freiburg, Germany.
University of Heidelberg, Heidelberg, Germany.
Behav Res Methods. 2024 Apr;56(4):3102-3116. doi: 10.3758/s13428-023-02179-1. Epub 2023 Aug 28.
Diffusion models have been widely used to obtain information about cognitive processes from the analysis of responses and response-time data in two-alternative forced-choice tasks. We present an implementation of the seven-parameter diffusion model, incorporating inter-trial variabilities in drift rate, non-decision time, and relative starting point, in the probabilistic programming language Stan. Stan is a free, open-source software that gives the user much flexibility in defining model properties such as the choice of priors and the model structure in a Bayesian framework. We explain the implementation of the new function and how it is used in Stan. We then evaluate its performance in a simulation study that addresses both parameter recovery and simulation-based calibration. The recovery study shows generally good recovery of the model parameters in line with previous findings. The simulation-based calibration study validates the Bayesian algorithm as implemented in Stan.
扩散模型已被广泛用于通过分析二择一强制选择任务中的反应和反应时间数据,从认知过程中获取信息。我们提出了一个七参数扩散模型的实现,该模型将试验间变异性纳入漂移率、非决策时间和相对起始点中,在概率编程语言 Stan 中实现。Stan 是一个免费的开源软件,它为用户在贝叶斯框架中定义模型属性(如先验选择和模型结构)提供了很大的灵活性。我们解释了新函数的实现方式以及它在 Stan 中的使用方式。然后,我们在一项模拟研究中评估了它的性能,该研究既解决了参数恢复问题,也解决了基于模拟的校准问题。恢复研究表明,模型参数的总体恢复情况良好,符合先前的发现。基于模拟的校准研究验证了 Stan 中实现的贝叶斯算法。