This repository accompanies the manuscript by Zhou, Acerbi and Ma (2020). It includes human subjects' data and the MATLAB code used for fitting and comparing the models reported in the paper.
All subjects' raw data can be found in the ./data
folder, stored either in the newsubjdata.mat
file or in individual .csv
files for each subject and task. newsubjdataC
denote data for the collinearity judgment task and newsubjdataD
for the height judgment task (see paper for details).
For each subject and task, the data table contains the following columns:
- Eccentricity level (pixel)
- Offset (pixel)
- Trial type: 0 (non-collinear) or 1 (collinear)
- Response: 0 (non-collinear) or 1 (collinear)
- Confidence rating: 1 (lowest confidence) - 4 (highest confidence)
- Left line height (pixel)
- Right line height (pixel)
- Reaction time (s)
Code used to perform the model comparison reported in the paper is available in the ./code
folder. Commented code to run a model fit for a single subject and task is available in the example file model_fitting_example.m
. This example script will run both maximum-likelihood estimation (MLE) and posterior sampling via Markov Chain Monte Carlo (MCMC), as described in the paper.
To run the code, ensure to have installed these external MATLAB toolboxes:
- Bayesian Adaptive Direct Search (BADS) for optimization, available here;
- Ensemble (inversion) slice sampling lite for MCMC sampling, available here.
- Zhou, Y.*, Acerbi, L.* & Ma, W. J. (2020) The Role of Sensory Uncertainty in Simple Contour Integration, PLoS Computational Biology 16(11): e1006308. (*equal contribution authors; link)
All MATLAB files in the code
folder are released under the terms of the MIT license.