Confidence of probabilistic predictions modulates the cortical response to pain
- 1. UCLouvain
- 2. University of Oxford
- 3. University of Cambridge
Description
Initial release
Article published in PNAS.
Description
This project provides the codes written to analyze the data of the above article and produce all figures shown in the manuscript.
The folder /TSL_experiments/ contains the codes to generate and deliver the sequences of stimuli.
Associated data are available on an OSF repository.
Running
All codes are written in Matlab and were ran using Matlab R2019b.
- To collect data and run experiments in the lab, you need
- a stimulator and DAQ device
- Matlab with the DAQ and Psychtoolbox
- all codes can be ran from run_all_stim_TCS2.m (check sessions, training, test sessions)
- To analyze the behavioral data
- behavioral data from the OSF repository
- always start by running add_all_paths_TSL.m that will add the required sub-folders to the Matlab path
- TSL_anayze_ratings.m: loads and analyzes the behavioral data of all the subjects, for one model and one parameter set. The path fn_dir should correspond to the behavioral data folder.
- TSL_fit_on_ratings.m: computes the fit of different models (with different parameters) and does the model comparison.
- To analyze the EEG data
- EEG data from the OSF repository
- always start by running add_all_paths_TSL.m that will add the required sub-folders to the Matlab path
- TSL_analyze_EEG.m: loads and analyzes the EEG recordings. The path fn_dir_EEG should correspond to the EEG data folder. Data are saved as specified in the function and can be reloaded and plotted using other functions.
- TSL_plot_avg_EEG.m: reloads useful data and displays the average EEG responses. Data must have been saved by running TSL_analyze_EEG.m with save_avg_eeg = 1 beforehand.
- TSL_plot_IO_fit.m: reloads useful data and displays the model fitting. Data must have been saved by running TSL_analyze_EEG.m with IO_fit_opt = 1 beforehand.
- To perform the parameter recovery analysis, using codes from the folder /param_recovery/
- start by running add_paths_recov.m to add the required folders to the Matlab path
- simulate_behavior.m: simulates behavior using a range of parameters consistent with the ones observed in the original data set.
- fit_simulated_data.m: computes the quality of fit on data simulated in simulate_behavior.m.
- disp_param_recovery.m: plots the outcomes of the parameter recovery analysis. The data saved in /data_simu/ enables producing the figures without re-computing the simulations.
Dependencies
The codes for the Bayesian models (in the “IdealObserversCode” folder) were written by Florent Meyniel and Maxime Maheau (Minimal Transition Probs Model Library - Meyniel F, Maheu M, Dehaene S (2016) Human Inferences about Sequences: A Minimal Transition Probability Model. PLoS Comput Biol 12(12): e1005260). These codes are provided in this repository with some updates enabling to test variants of the initial models (with different priors, learning AF, ...).
The VBA toolbox (in the "VBA-toolbox" folder) was developed by J. Daunizeau, V. Adam, L. Rigoux (2014): VBA: a probabilistic treatment of nonlinear models for neurobiological and behavioural data. PLoS Comp Biol 10(1): e1003441.
Contact
You can contact me at dounia **dot** mulders **at** uclouvain.be for any question. :-)
Files
dmulders/pain_TSL_EEG-v1.0.0.zip
Files
(4.7 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:7767530e7ce3d09ebce58ed2277e8d87
|
4.7 MB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/dmulders/pain_TSL_EEG/tree/v1.0.0 (URL)
Funding
- Wellcome Trust
- Neural mechanisms of endogenous pain control 214251
- UK Research and Innovation
- Computation and regulation of pain dynamics in the human central nervous system MR/T010614/1