Cognitive maps in spatial and non-spatial domains: Similar but different
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
- The script
dataProcessing.Rprovides functions for importing data in well formatted dataframes.
experiment/gaborPatches.Rcontains the code used to generate the gabor stimuli
experiment/smoothEnvironment.jsoncontain 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
.Rmdfiles are located in
docs/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!
Models, Simulations, Regressions, and Plots
- The computational model results are contained in
modelResults/paramEstimates.csvcontain the cross-validated modeling results (produced using
modelComparisonCV.Rand aggregated via
modelplots.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 in
- Bayesian regression models are stored in
brmsModels. Because these files can sometimes be larger than the github filesize limit, any file that ends in
*.brmis 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!