code-for-computational-modellingBook

Code for Computational Modeling of Cognition and Behavior

The folder /codeFromBook includes the original code that comes from the following book:

Farrell, S. , & Lewandowsky, S. . (2018). Computational Modeling of Cognition and Behavior. Web Pages (Original version)
(英) 法雷尔 Farrell, Simon, & (英) 勒万多夫斯基 Lewandowsky, Stephan. (2021). 认知和行为的计算建模. 清华大学出版社. (Chinese translated version)

new-organized-bookch

The folder /new-organized-bookch includes the tested and debugged code that was reorganized from chapters of the book as below:

1- Random Walk Model-DDM
2 - Basic Parameter Estimation 1
3 - Basic Parameter Estimation 2
4 - Combining Data
5 - Bayesian Parameter Estimation
6 - MCMC
7- Gibbs Sampling & JAGS
8 - Hierachical Modeling
9 - Model Comparison
10 - Bayesian Model Comparison

Please note that some of the content may be incorrect in different versions of R.
One available version is R version 4.2.1 (2022-06-23) with Package lme4 version 1.1-29.

Some packages required:

 mixtools
 ggplot2
 circular
 rjags
 lme4
 R.utils
 dfoptim
 MASS
 logspline