Skip to content

Repository for fitting Drift-Diffusion models with identifiable within-trial noise parameters in Python using BayesFlow

License

Notifications You must be signed in to change notification settings

mdnunez/bayesflow_nddms

Repository files navigation

bayesflow_nddms

(Repository version 0.7.3)

Repository for fitting Drift-Diffusion models with identifiable within-trial noise parameters in Python using BayesFlow (and JAGS and Stan)

Authors: Michael D. Nunez from the Psychological Methods group at the University of Amsterdam

Citation

Nunez, M. D., Schubert, A.-L., Frischkorn, G. T., & Oberauer, K. (2024). Cognitive models of decision-making with identifiable parameters: Diffusion Decision Models with within-trial noise PsyArXiv. https://doi.org/10.31234/osf.io/h4fde

Prerequisites

Python 3 and Scientific Python libraries

Possible requirements

BayesFlow

BayesFlow

See BayesFlow install instructions to create a BayesFlow conda environment for the most stable method to run these scripts. It is also recommended to keep a local version of BayesFlow on your computer because the package is being actively developed. For this project, I used BayesFlow version 1.1 with Python 3.10.

See also yaml/bayesflow.yml.

JAGS + pyjags

For JAGS installation steps in Ubuntu, see jags_wiener_ubuntu.md

MCMC Sampling Program: JAGS

Program: JAGS Wiener module

Python Repository: pyjags, can use pip:

pip install pyjags

See also yaml/pyjags.yml

Stan + PyStan 2

For this project I used PyStan 2. The newest version of PyStan was PyStan 3, but I didn't find PyStan 3 as easy to use with custom diagnostic and plotting scripts as PyStan 2.

Here are the docs for PyStan 2

See also yaml/pystan.yml

Downloading

The repository can be cloned with git clone https://github.com/mdnunez/bayesflow_nddms.git

The repository can also be downloaded via the Code -> Download zip buttons above on this Github page.

License

bayesflow_nddms is licensed under the GNU General Public License v3.0 and written by Michael D. Nunez from the Psychological Methods group at the University of Amsterdam.

Selected References

(see also References in preprint of Citation above)

Ghaderi-Kangavari, A., Rad, J.A. & Nunez, M.D. (2023). A General Integrative Neurocognitive Modeling Framework to Jointly Describe EEG and Decision-making on Single Trials. Computational Brain & Behavior https://doi.org/10.1007/s42113-023-00167-4

Nunez, M. D., Fernandez, K., Srinivasan, R., & Vandekerckhove, J. (2024). A tutorial on fitting joint models of M/EEG and behavior to understand cognition. Behavior Research Methods. https://doi.org/10.3758/s13428-023-02331-x

Mattes, A., Porth, E., & Stahl, J. (2022). Linking neurophysiological processes of action monitoring to post-response speed-accuracy adjustments in a neuro-cognitive diffusion model. NeuroImage, 247, 118798. https://doi.org/10.1016/j.neuroimage.2021.118798

About

Repository for fitting Drift-Diffusion models with identifiable within-trial noise parameters in Python using BayesFlow

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages