Main content

Home

Menu

Loading wiki pages...

View
Wiki Version:
**All paper figures** * *PAPER_FIGURES.m* * Requires folder 'funs' and files in task folders **** **Run models** * *HBayes_RunModelsParallel.R* – script to run all models. * needs an hBayesDM model file (‘*./BanditTask/Anahit_Hbayes_lapseS1.R*’ = example) * needs a text file with data (e.g., '*All_Bandit.txt*' in ./BanditTask * *RUN_testretest_embedded_corr_models_all.R* - runs all hierarchical Bayesian joint models with embedded correlation matrix * *./BanditTask/bandit4arm_lapse_testretest.stan* - bandit model * *./GambleTask/ra_prospect_testretest.stan* - gamble model * *MixedModels_all.R* - runs all mixed models and saves individual predicted values: * ./BanditTask/Bandit_mixedRegression_S1_S2_data.csv * ./GambleTask/Gambling_mixedRegression_S1_S2_data **Other files** * *preprocessSIMULATEDdata.m* – preprocess and saves excel file of simulated and raw data together * ./BanditTask/Preproc_Bandit_SIMnREALrawData.xls * ./GambleTask/Preproc_Gamble_SIMnREALrawData.xls * *ModelProcessing.Rmd* - model comparison and extracts and saves mean parameter estimates of models. Saves files (below are examples): * ./BanditTask/params_outputS1_lapse_47subs.csv/ * ./GambleTask/params_outputS1_prospect_18Jan20.csv *** **./BanditTask/ scripts & folders** * 'hBayesOUTPUT' folder - all hBayesDM objects (model data) for bandit task * 'session1/2' folder - raw subject data (anonymised) .mat files * *preprocessBandit.m* - preprocesses raw data into model-agnostic measures into excel file: * ./BanditTask/Preproc_Bandit.xls * *preprocess4modelling_Bandit.m* - creates .txt files of trial-by-trial data info for modelling * example: ./BanditTask/S1_Bandit.txt * *Likelihood_Predict_bandit4arm_lapse.R* – calculate predictive probability. Saves files: * ./BanditTask/S1PredictS1_bandit4_Lapse47.csv * ./BanditTask/S2PredictS2_bandit4_Lapse47.csv * ./BanditTask/S1PredictS2_bandit4_Lapse47.csv * *Likelihood_PredictOTHERS_bandit4arm_lapse.R* – calculate average of future predictive probability of all but current subject. Saves files: * ./BanditTask/S1_OTHERparamsPredict_S2_bandit4_Lapse47subs47.csv * *Likelihood_S1priorMeanPredictS2_bandit4arm_lapse.R* - calculate S1 group prior parameters in predicting S2 data compared with subject's own S1 parameters. Saves: * ./BanditTask/S1PRIORS_PredictS2_bandit4_Lapse47.csv * *simulate_bandit4arm_lapse.R* – create & save artificial data based on model parameters. Saves file (example): * ./BanditTask/S1_bandit4_Lapse_SimData_47subs47.txt * use this file to 1) fit lapse model & then extract parameter estimates on the simulated data for parameter recovery checks and 2) check simulated versus real data. Currently need to manually adjust headers in txt file **./GambleTask/ scripts & folders** * same ones as in ./BanditTask/ but called 'prospect' or 'gamble' instead of 'bandit'
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.