**A brief guide to the files:**
- Analyses files. Files starting with "analysis_" analyze each dataset. Files starting with "ana_" are organized by type of analysis. All figures and results in the paper can be reproduced by running the corresponding "ana_" functions.
- Folder "Preprocess" contains the original csv files from the Confidence Database (in folder orig_csv_files). The file combine_Adler_datasets.m combines the relevant data from the two original Adler datasets. The file step1_importDataToMatlab.m performs an initial import of the data into Matlab (saved in the folder raw_matlab_files), while the file step2_preprocessData.m performs the remaining preprocesing (e.g., excluding subjects).
- Folder "helperFunctions" includes many helper functions, including all functions for computing the 17 measures of metacognition, as well as functions for plotting.
- Folder "Results" includes the computed measures of metacognition for each dataset. Because these computations take time, the codes for analyzing each dataset save their output in this folder and load it in future iterations without re-computing.