Main content

Home

Menu

Loading wiki pages...

View
Wiki Version:
The scripts and files here will allow researchers to replicate the results in the study entitled 'Reinforcement learning in mood and anxiety disorders: a simulation meta-analysis'. There are a number of scripts here and they are not necessarily in the best or most readable format - this is a work in progress! Please just let me know if there are any issues. Below are the key R notebooks and their functions. 1. 'get_paper_parameters' loads in the original parameters from the papers OR generates them from the distribution reported by the papers (e.g. mean and standard deviation). Calls on the 'generate_params' script. 2. 'conventional_meta_analysis' takes the parameters that are in common across the majority of papers (i.e. single learning rate, inverse temperature, reward and punishment learning rates) and performs a conventional meta-analysis to assess for overall group differences. Also assesses heterogeneity and publication bias. 3. 'task_creation_nb' creates four 'benchmarking' tasks, which are used to put data into the same *task* space. Set the parameter 'newtask' to 1 to create new tasks. This calls on several functions: 'create_randomwalk_task' and 'generate_random_walk' which create tasks based on a Gaussian random walk of outcome probabilities. Reward and punishment can either be mirrored (so 80% probability of reward is paired with 20% chance of punishment) or independent (the random walks are separate); 'create_reversal_task' which creates tasks in which outcome probabilities sharply reverse every few trials (it's possible to specify after how many trials a reversal should occur); 'create_gng_task' which creates a task with static probabilities and four stimuli, each of which are associated with different actions: go to win, no go to win, go to avoid losing, no go to avoid losing. There are also two plotting functions called and a function that works with RData files, loading them in and renaming the variables. 4. 'bayesianmodelaveraging' takes the outputs from the 'model_outputs' folder, linked here: https://doi.org/10.5522/04/15099408 and estimates Bayesian Model Averaging weights, then performs multivariate and univariate analyses. 5. Files starting 'winnertakesall' extract parameters from the model defined as 'winning', i.e. the one with the lowest BIC score, according to that analytic method. They then assess differences. 6. 'generate_recover_stan' and 'generate_recover_map' allow you to test the recovery of synthetic parameters. Note that the MAP version requires you to run the models in MATLAB, not R. 7. All models are in scripts/models or scripts/map.
OSF does not support the use of Internet Explorer. For optimal performance, please switch to another browser.
Accept
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.
Accept
×

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.