pain_tsl_eeg

Confidence of probabilistic predictions modulates the cortical response to pain

https://github.com/dmulders/pain_tsl_eeg

Science Score: 57.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.5%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Confidence of probabilistic predictions modulates the cortical response to pain

Basic Info
  • Host: GitHub
  • Owner: dmulders
  • License: mit
  • Language: MATLAB
  • Default Branch: main
  • Homepage:
  • Size: 4.39 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 1
Created over 3 years ago · Last pushed about 3 years ago
Metadata Files
Readme License Citation

README.md

Confidence of probabilistic predictions modulates the cortical response to pain

Dounia Mulders, Ben Seymour, André, Mouraux, Flavia Mancini

Article published in PNAS.

Associated preprint

Image

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.

The codes for the Bayesian models were written by Florent Meyniel. They are provided in this repository in /IdealObserversCode/ with some updates to test variants of the initial models (with different priors, learning AF, ...).

  • 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 runallstim_TCS2.m (check sessions, training, test sessions)
  • To analyze the behavioral data

    • behavioral data from the OSF repository
    • always start by running addallpaths_TSL.m that will add the required sub-folders to the Matlab path
    • TSLanayzeratings.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.
    • TSLfiton_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 addallpaths_TSL.m that will add the required sub-folders to the Matlab path
    • TSLanalyzeEEG.m: loads and analyzes the EEG recordings. The path fndirEEG should correspond to the EEG data folder. Data are saved as specified in the function and can be reloaded and plotted using other functions.
    • TSLplotavgEEG.m: reloads useful data and displays the average EEG responses. Data must have been saved by running TSLanalyzeEEG.m with saveavg_eeg = 1 beforehand.
    • TSLplotIOfit.m: reloads useful data and displays the model fitting. Data must have been saved by running TSLanalyzeEEG.m with IOfit_opt = 1 beforehand.
  • To perform the parameter recovery analysis, using codes from the folder /param_recovery/

    • start by running addpathsrecov.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.
    • fitsimulateddata.m: computes the quality of fit on data simulated in simulate_behavior.m.
    • dispparamrecovery.m: plots the outcomes of the parameter recovery analysis. The data saved in /data_simu/ enables producing the figures without re-computing the simulations.

Contact

You can contact me at dounia dot mulders at uclouvain.be for any question. :-)

Owner

  • Name: Dounia Mulders
  • Login: dmulders
  • Kind: user

Citation (CITATION.cff)

message: "If you use this software, please cite it as below."
authors:
- family-names: "Mulders"
  given-names: "Dounia"
  orcid: "https://orcid.org/0000-0003-4855-5331"
- family-names: "Seymour"
  given-names: "Ben"
  orcid: "https://orcid.org/0000-0003-1724-5832"
- family-names: "Mouraux"
  given-names: "André"
  orcid: "https://orcid.org/0000-0003-1056-5980"
- family-names: "Mancini"
  given-names: "Flavia"
  orcid: "https://orcid.org/0000-0001-8441-9236"
title: "Confidence of probabilistic predictions modulates the cortical response to pain"
version: 1.0.0
doi: 10.5281/zenodo.7509927
date-released: 2023-01-06
url: "https://github.com/dmulders/pain_TSL_EEG"

GitHub Events

Total
Last Year