This repository contains all data and code necessary to reproduce the results of Humans flexibly integrate social information despite interindividual differences in reward (Witt, Toyokawa, Lala, Gaissmaier & Wu, 2024), in which we investigated social learning in correlated reward environments. The code is designed to be run from the top directory.
has all code used for simulating
-
environmentGenerator.Rgenerates correlated environments -
modelSim.pyhas simulation, parameter generation and necessary helper (GP,UCB) functionsmodelSim_allVariants.pyhas the same, but includes legacy models not used for fitting analysismodelSim_Najar.pyhas the same for a version of the task that has one agent and one expert making optimal choicessimmedModels.pyusesmodelSim.pyto generate datasets for analysis
-
evoSim*generates evolutionary simulationsevoSimSynthesis.pyconverts this script's output for further analysis
-
SGVis.pygenerates explanatory plots for the models (e.g. Fig. 2)
and everything related to model fitting and recovery
-
modelFit.pyhas the function to calculate negative log likelihoods of parameter sets given data -
modelRecovery.pyis the model recovery scriptmrecov_parameteradd.pyconverts this script's output for further analysis
-
modelFitting*script for model fittingfitting_synthesis*converts this script's output for further analysis
analysis scripts
-
behav_measures*generates additional behavioural measures for data (search distance, previous reward etc.); already run on the data -
evoSimAnalysis.pyconverts -
analysis_evo_e1.Rhas analysis for evolutionary simulations and Exp. 1 -
analysis_e2.Rhas analysis for Exp. 2 -
recovery_analyses.Rhas model and parameter recovery, as well as bounding logic -
suppAnalysis.Rhas the supplementary analyses
home to the environments used in the experiment
data from experiments, fitting data, evolutionary simulations
all the plots used in the paper + SI