Using behavioural economic games to tease apart the strategies underlying punishment in humans.
To run this code, you will need to install R and the following R packages:
install.packages(c("ape", "cowplot", "ggcorrplot", "ggrepel",
"ggridges", "knitr", "lme4", "ltm", "papaja",
"phangorn", "rstan", "tanggle", "targets",
"tarchetypes", "tidybayes", "tidytext",
"tidyverse", "wordcloud"))
You will also need to install the rethinking
package. See here for more details: https://github.com/rmcelreath/rethinking
- Set the working directory to this code repository
setwd("myPath/punishStrategies")
- Load the
targets
package withlibrary(targets)
- To run the analysis pipeline, run
tar_make()
- To load individual targets into your environment, run
tar_load(fitSimModel)
etc.
Any issues, please email scott.claessens@gmail.com.
Scott Claessens, scott.claessens@gmail.com