Skip to content

Desmondgtx/MATLAB-PPD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This study investigates how feedback processing signals the emergence of rule-based strategies during probabilistic category learning (PCL). Participants (N = 56, after exclusions) classified stimuli composed of three binary features into two categories under two levels of feedback reliability (90% and 70%). Neural activity was recorded via EEG, attentional allocation was tracked with eye-tracking, and behavioral responses were logged trial by trial. The key ERP components of interest are the Feedback-Related Negativity (FRN) and the P300 (P3b), both time-locked to feedback onset.

The task was programmed in PsychoPy (v2022.2.5), EEG was recorded with the Emotiv EPOC Flex Gel system (32 channels, 128 Hz), and eye-tracking was performed with an SR Research EyeLink 1000+ (2000 Hz).


Repository Structure

1. behavioral_eyetracking_data.csv

Unified trial-level dataset (13,440 rows × 13 columns) combining behavioral responses and eye-tracking fixation counts for all 56 participants across 240 trials each (3 blocks × 80 trials). Columns:

Column Description
participant Participant identifier (e.g., subject_2)
Stimuli Path to the stimulus image file
CorrAns Correct answer for the trial (m or z)
stimuli_code Binary stimulus code (e.g., S101 = Feature 1 on, Feature 2 off, Feature 3 on)
key_resp_training.keys Participant's response key (m or z)
key_resp_training.corr Accuracy (1 = correct, 0 = incorrect)
key_resp_training.rt Response time in seconds
roi_der.numLooks Number of fixations on the upper-right ROI (Feature 2)
roi_izq.numLooks Number of fixations on the upper-left ROI (Feature 1)
roi_abajo.numLooks Number of fixations on the bottom-center ROI (Feature 3)
block Learning block (1, 2, or 3)
cond Diagnostic feature condition (A, B, or C)
fb Feedback reliability (0.7 = 70%, 0.9 = 90%)

Eye-tracking data were recorded with an SR Research EyeLink 1000+ system (monocular, left eye, 2000 Hz). Three ROIs were defined corresponding to the three stimulus features, positioned at the vertices of an inverted triangle (upper-left, upper-right, bottom-center).

2. EEG Raw Data/

Raw continuous EEG recordings for each participant. Data were acquired from 32 active electrodes arranged according to the International 10–20 system using the Emotiv EPOC Flex Gel system (128 Hz sampling rate). Event markers inserted via Lab Streaming Layer (LSL) denote stimulus onset, motor response, and feedback delivery. Electrodes TP9 and TP10 served as system ground and were excluded from analysis.

Pre-processing was carried out offline in MATLAB (2024a) using EEGLAB (v2024.0) and ERPLAB (v12.01), and included re-referencing, band-pass filtering (0.1–35 Hz), manual artifact rejection, and Independent Component Analysis (ICA) for removal of ocular and muscle artifacts.

3. ERPs/

Processed ERP files (.erp format, compatible with ERPLAB) for each participant. Epochs were time-locked to feedback onset (−500 ms to +1500 ms) and categorized by feedback type (correct vs. incorrect). These files are the basis for extracting the two ERP components of interest:

  • FRN (Feedback-Related Negativity): Computed as the difference wave (incorrect − correct) within a 200–350 ms window post-feedback. Analyzed at fronto-central electrodes: Fz, Cz, FC1, FC2.
  • P300 (P3b): Computed as mean amplitude within a 300–600 ms window post-feedback. Analyzed at centro-parietal electrodes: Cz, CP1, CP2, P3, P4, Pz. This component includes the perceived feedback label (correct/incorrect) as a factor.

4. Measurement Tool/

Extracted mean amplitude values obtained from the ERPLAB Measurement Tool within EEGLAB. Using the .erp files from the ERPs/ folder, mean amplitude was computed within the specified time windows for each participant, separated by feedback reliability condition:

  • FRN measurements: Mean amplitude (200–350 ms), separated by condition (70% and 90% feedback reliability).
  • P300 measurements: Mean amplitude (300–600 ms), separated by condition (70% and 90% feedback reliability).

These extracted values serve as the dependent variables entered into the statistical models (Linear Mixed Models and GLMMs implemented in R).


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors