Main content



Loading wiki pages...

Wiki Version:
This OSF project provides the data and the code for the analyses and figures for the following manuscript: Falck Johannes, Zhang Lei, Raffington Laurel, Mohn Johannes J., Triesch Jochen, Heim Christine, Shing Yee Lee (2023) Longitudinal Changes in Value-based Learning in Middle Childhood: Distinct Contributions of Hippocampus and Striatum eLife 12:RP89483 The folder '_scripts' provides all the scripts needed to reproduce the analyses and figures, but further code may be available in the subfolder structure. In '_scripts/_prep/', there are several preparation scripts, which need to be executed in the order of script numbering, as most scripts do not run independently. The output of the scripts has been stored so that the preparation scripts do not need to be run again, and that the scripts in the parent folder "_scripts/" can be executed immediately. Here is an overview of both the preparation and main scripts, along with an explanation of what it does: Main scripts: 1_BEHAVIORAL_RESULTS.R - This script includes: 1) task Fig. 1, 2) linear mixed model behavioral learning and memory results and descriptive behavioal plots Fig. 2 2_RL_MODEL_RESULTS.R - This script includes: - 1) model comparison table - 2) winning model parameters Fig. 3 - 3) A comparison of simulation-based optimal with the empirical parameter combinations Fig. 4 3_BRAIN_COGNITION_LINKS.R - This script includes: - 1) descriptive memory, learning and brain plots and LCS model Fig. 5 - univariate LCS models for brain and cognition variables - bivariate LCS models to assess differences in change between hippocampus and striatum - fourvariate LCS model to examine the brain-cognition links. 5_SUPPLEMENTARY_MATERIALS.R - This script includes: 1) suppl Fig 1 and Fig 2 from parameter and model recovery, respectively. 2) suppl Fig 3 effects plots from linear mixed model behavioral learning results 3) suppl Fig 4 Parameter correlations of the winning model 4) suppl Fig 5 simulation-based optimality of switching behavior with empirical win-stay and lose-shift behavior 5) further confirmatory and exploratory LCS models 6) rerunning with reduced dataset for the behavioral and computational model as well as LCS model analyses. The reduced dataset only included children's data if individuals had above 50% learning accuracy in the last 20 trials. Preparation scripts: 1_model_simulation.R - This script simulates a desired model with the parameter combinations. 2_model_parameter_recovery.R - This script not only simulates but also recovers parameters and models with a set of models. 3_prep_dataList.R - This script stores the choice data from the children into the format necessary to run computational models in rstan. 4_prep_RL.R - This script is used to set the parameters for the fitting process in rstan. 5_fitpar_RL.R - This script executes model fitting in rstan. 6_model_comparison.R - This script extracts model loo values, calculates the model weights for model comparison and saves a model comparison table. 7_generate_empirical_choice_probabilities.R - This script generates the model-implied choice values and choice probabilities for the fitted parameters of the winning model. 8_extract_estimates_RL.R - This script extracts the model parameters from the rstan object. 9_LCS_prep.R - This script prepares the data required to run the latent change scores models in lavaan, using the winning model output. 10_LCS_prep_1lr_2rho.R - This script prepares the data required to run the latent change scores models in lavaan, using the output from the second-best model. 11_prep_memory.R - This script prepares the data required to run the regression analysis on recognition memory by feedback immediate and delayed conditions.
OSF does not support the use of Internet Explorer. For optimal performance, please switch to another browser.
This website relies on cookies to help provide a better user experience. By clicking Accept or continuing to use the site, you agree. For more information, see our Privacy Policy and information on cookie use.

Start managing your projects on the OSF today.

Free and easy to use, the Open Science Framework supports the entire research lifecycle: planning, execution, reporting, archiving, and discovery.