This repository contains data and code supporting the following paper:
FigureX.m files will generate the specified plots from the paper by loading behavioural data, model predictions and/or fMRI ROI data.
The paths in these scripts require altering the directory variable ‘repoBase’ to point to your local version of the repository.
Unthresholded group-level statistical maps supporting whole-brain analyses are available on NeuroVault: https://neurovault.org/collections/3792/.
Contains custom scripts for data extraction and plotting.
Contains anonymised behavioural data for the pre-scan (Data/Behaviour/Prescen) and the scan (Data/Behaviour/Prescen) sessions, ROI contrast estimates (Data/Scan/Contrast), ROI single-trial activity estimates (Data/Scan/Activity) and ROI activity time courses (Data/Scan/Timecourse).
Contains scripts for hierarchical DDM fitting using the HDDM toolbox (http://ski.clps.brown.edu/hddm_docs/) and generation of posterior predictives using the DMAT toolbox (https://ppw.kuleuven.be/okp/software/dmat/).
Contains scripts for fitting confidence model to pre-scan data and generating out-of-sample predictions about subjective confidence for scan data.
Contains scripts for permutation testing for analysis of ROI activity time courses.
Contains scripts for setting up GLMs of fMRI data. fMRI data were pre-processed using standard pipelines available here: https://github.com/metacoglab/MetaLabCore. All fMRI analyses were done using SPM 12 (www.fil.ion.ucl.ac.uk/spm).
Contains example script for creating ROI activity time courses.
A preprint of this article can be found on bioRxiv.
This code is being released with a permissive open-source license. You should feel free to use or adapt the code as long as you follow the terms of the license. If you make use of the behavioural, modelling or neuroimaging analyses, we would appreciate that you cite the paper.