mar-wir / StanDDM

A collection of different Drift Diffusion Models implemented in the probabilistic programming language Stan.
MIT License
46 stars 3 forks source link

Issues in the graphical representation of the DDM in the README file #2

Closed dkatsimpokis closed 1 year ago

dkatsimpokis commented 4 years ago

The README file contains a figure of a hierarchical DDM model with trial-to-trial variability in the drift rate, on top of the the mean drift-rate, threshold and non-decision time parameters. Although the Figure is informative and gives a succinct depiction of how hierarchical models work, it contains some issues that need to be addressed.

Specifically, in the Wiener distribution of error responses, the threshold parameter is given as and the bias parameter as z. However, these are both mistakes because, first, the valence of the threshold does not change across error/correct RT distributions and, second, the bias parameter needs to be 1-z (it adds up to 1 across the error/correct RT distributions).

mar-wir commented 4 years ago

Hi!

-α and the bias parameter as z. However, these are both mistakes because, first, the valence of the threshold does not change across error/correct RT distributions and, second, the bias parameter needs to be 1-z

I followed the implementation of https://compcogscisydney.org/publications/NavarroFuss2009.pdf and subsequently

Ahn, Woo-Young, Nathaniel Haines, and Lei Zhang. 2016. “Revealing Neuro-Computational Mechanisms of Reinforcement Learning and Decision-Making with the hBayesDM Package.” bioRxiv. Cold Spring Harbor Laboratory. doi:10.1101/064287.

Can you confirm that my implementation diverges from those?

dkatsimpokis commented 4 years ago

Hi Marco!

Sorry for the late response. I think your implementation (in the code) follows the references you cited. What is problematic I think is the Figure in the readme file. According to the figure, the wiener distribution statement for wrong responses (when S = 0) has a negative drift rate (which is correct) but also a negative threshold parameter (alpha) and a bias parameter (zeta). Nevertheless, alpha should not be negative and zeta should be (1 - zeta) since zeta should add up to one across the correct/error responses.

In your code you have implemented it correctly. For example, in the simplest case of the pure DDM, the code is (StanDDM_NCEN_Pure.r, lines: 84-85):

log_lik[i] = wiener_lpdf(RTu[i, :Nu[i]] | alpha[i], tau[i], beta[i], delta[i]);

log_lik[i] = log_lik[i] + wiener_lpdf(RTl[i, :Nl[i]] | alpha[i], tau[i], 1-beta[i], -delta[i]);

As you see in the second line, the bias is constrained to 1-beta and alpha is not negative. This should also be reflected in the Figure of the readme file.

mar-wir commented 1 year ago

You are right, sorry for the delay! I did make a note, cannot find the original tex file for the graphic. Thanks again for pointing it out!