This git repo contains the data, code, and analyses used in Wu, Schulz, Garvert, Meder & Schuck (2020), to appear in PLOS Computational Biology.
All analyses were run with R version 3.6.1, with the exception of the Bayesian hierarchical model comparison results (pxp) that used Matlab R2019b.
- The data is located in
experimentData/full.csv
- The script
dataProcessing.R
provides functions for importing data in well formatted dataframes.
experiment/gaborPatches.R
contains the code used to generate the gabor stimuliexperiment/roughEnvironment.json
andexperiment/smoothEnvironment.json
contain the underlying payoff distributions used in the experiment
- All analyses are described in one of three R notebooks, which provide a step-by-step guide of the functions, statistics, and plots used in the final paper
- The
.Rmd
files are located indocs/
and are separated into behavioral analyses, model results, and bonus round analyses - Each of these R notebooks produces easy to read HTML files, which are self-contained, free of dependencies, and can be viewed in your browser. These notebooks provide an accessible way to look at the precise analyses used in each statistical comparison or plot. So please check them out!
- The computational model results are contained in
modelResults
.modelResults/modelFit.csv
andmodelResults/paramEstimates.csv
contain the cross-validated modeling results (produced usingmodelComparisonCV.R
and aggregated viamodelplots.R
). For additional details see the model results notebook and the bonus round notebook - Model simulations are stored in
rationalModels/
, while the parameters used to generate these simulations are contained inrationalModels/parameters
- Bayesian regression models are stored in
brmsModels
. Because these files can sometimes be larger than the github filesize limit, any file that ends in*.brm
is tracked via git-lfs (see https://git-lfs.github.com/ for details) - plots are all stored in
plots
, with some additional plots only presented in the notebooks
There are also some helper files that are loaded in these notebooks or are explicitly mentioned (e.g., modelComparisonCV.R
is used to generate the model estimates).
This is the first time I've ever invested the effort to put together interpretable R notebooks of the analyses in a paper. It wasn't a small amount of work, but I think it could be very useful for providing transparency to the scientific process. Let me know what you think!