stan-dev / stan-dev/math

Add "Ratcliff" log-likelihood, Wiener process with intrinsic trial-to-trial drift variability

Open
#287 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature new function
Dominant language
C++
Stars
839
Forks
220
Avg merge
2d 4h
Merged PRs (30d)
14

Description

From @mdnunez on April 19, 2016 23:50

New Feature Suggestion:

Add a Wiener likelihood function with intrinsic trial to trial variability in the drift rate, titled the "Ratcliff" likelihood function

Description:

Adding a parameter that describes the variance in drift rate over trials to the Wiener likelihood function yields better estimates of incorrect reaction time (see Table 3 of Nunez et al, 2016 for an example deficit of incorrect-RT prediction with a hierarchical version of the simple Wiener likelihood). This version of the diffusion model and its extensions was popularized by Ratcliff (1978; see also Ratcliff and McKoon, 2008) and is used widely in the mathematical psychology and neuroscience communities. Because of sampling techniques developed by Navarro and Fuss (2009) and probability density function derivations by Tuerlinckx (2004), it is relatively straight-forward to copy and change the existing Wiener likelihood sampler in Stan to include intrinsic trial-to-trial variability. This method has already been implemented by existing hierarchical "drift-diffusion" model samplers (Wiecki, 2003).

Additional Information:

I have a version of "ratcliff_log.hpp" code mostly finished however it needs to be tested and compared to simulations. Any helpful pointers to what needs to be changed in other parts of Stan code would be appreciated.

Citations:
  • Navarro, D. J., & Fuss, I. G. (2009). Fast and accurate calculations for first-passage times in Wiener diffusion models. Journal of Mathematical Psychology, 53(4), 222-230.
  • Nunez, M. D., Vandekerckhove, J., & Srinivasan, R. (2016). How attention influences perceptual decision making: Single-trial EEG correlates of drift-diffusion model parameters. Journal of Mathematical Psychology.
  • Ratcliff, R. (1978). A theory of memory retrieval. Psychological review, 85(2), 59.
  • Ratcliff, R., & McKoon, G. (2008). The diffusion decision model: theory and data for two-choice decision tasks. Neural computation, 20(4), 873-922.
  • Tuerlinckx, F. (2004). The efficient computation of the cumulative distribution and probability density functions in the diffusion model. Behavior Research Methods, Instruments, & Computers, 36(4), 702-716.
  • Wiecki, T. V., Sofer, I., & Frank, M. J. (2013). HDDM: hierarchical bayesian estimation of the drift-diffusion model in python. Frontiers in neuroinformatics, 7(August), 1-10.
Current Version:

v2.9.0

Copied from original issue: stan-dev/stan#1875

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the mostly finished ratcliff_log.hpp implementation and the existing Wiener likelihood sampler in Stan. Identify the surrounding Stan changes needed for integration, then test the implementation against simulations and compare its behavior with the cited diffusion-model results.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.