Aberrant Neural Entrainment to Word-Level Speech Patterns in Fragile X Syndrome: Evidence for a Statistical Learning Deficit.
The 5 matches
- [1] § Methods › EEG Recording and Analysis › Preprocessing ↔ statistical_learning_analysis_scripts.zip/MainITCScript.m, lines 102–134 · score 0.79 · Artifact Blocking, artifact corrected, outer ring, algorithm, threshold, AB
- [2] § Methods › EEG Recording and Analysis › Time Course of Neural Entrainment Over Learning ↔ statistical_learning_analysis_scripts.zip/MainITCScript.m, lines 1541–1584 · score 0.62 · ITC pseudovalue, normalized jackknifed, formula, syllable, word
- [3] § Methods › EEG Recording and Analysis › Computation of Intertrial Phase Coherence and Statistical Analysis › Scalp‐Level Statistical Analysis ↔ statistical_learning_analysis_scripts.zip/MainITCScript.m, lines 1340–1409 · score 0.61 · Shaded error bars, standard error, scored ITC, syllable frequency, Topographical, word frequency
- [4] § Methods › EEG Recording and Analysis › Computation of Intertrial Phase Coherence and Statistical Analysis ↔ statistical_learning_analysis_scripts.zip/MainITCScript.m, lines 1586–1660 · score 0.59 · phase locked, word structure, coherence, epochs, ITC, syllable
- [5] § Results › Source‐Level Analysis › Word Entrainment ↔ statistical_learning_analysis_scripts.zip/MainITCScript.m, lines 1340–1409 · score 0.52 · Shaded error bars, standard error, scored ITC, word frequency, zITC, FXS
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
MATLAB · 1,661 lines · 74 KB · CC-BY-4.0 · 5 matches
- % Apply the Infant Pipeline initially applied in Choi, Batterink 2020 to
- % the child data from FXS Project
- %datafile_names must remain consistent each time script is run.
- %notes
- %0770 AB algorithm seemed to create completely tiny voltages - excluded anyway though
- %% Read files to analyse
- clear % clear matlab workspace
- clc % clear matlab command window
- CurrentDirectory = '/Volumes/Laura_data/Laura Backup/eeglab 2024/';
- cd(CurrentDirectory)
- eeglab
- %Enter the path of the folder that has the raw data to be analyzed
- rawdata_location = [CurrentDirectory 'FXS Project/incoming/structured'];
- datafile_names=dir(rawdata_location);
- datafile_names=datafile_names(~ismember({datafile_names.name},{'.', '..', '.DS_Store'}));
- datafile_names={datafile_names.name};
- [filepath,name,ext] = fileparts(char(datafile_names{1}));
- %Channel Locations
- channel_locations = [CurrentDirectory 'FXS Project/channel location file/GSN-HydroCel-129.sfp'];
- %Outer ring of channels:
- outerlayer_channel = {'E17' 'E38' 'E43' 'E44' 'E48' 'E49' 'E113' 'E114' 'E119' 'E120' 'E121' 'E125' 'E126' 'E127' 'E128' 'E56' 'E63' 'E68' 'E73' 'E81' 'E88' 'E94' 'E99' 'E107'}; % list of channels
- %Codes:
- %1-12-10
- %11-2-4
- %8-3-5
- %9-7-6
- SyllableCodeStrings = {'DIN1', 'DIN2', 'DIN3', 'DIN4', 'DIN5', 'DIN6', 'DIN7', 'DIN8', 'DIN9', 'DI10', 'DI11', 'DI12', ...
- 'D101', 'D102', 'D103', 'D104', 'D105', 'D106', 'D107', 'D108', 'D109', 'D110', 'D111', 'D112'}; %most subjects have the top row of codes, 2310 has bottom row
- WordOnsetStrings = {'DIN1', 'DIN8', 'DIN9', 'DI11', ...
- 'D101', 'D108', 'D109', 'D111'};
- %algorithm parameters for AB algorithm.
- threshold = 50; %50 originally; %0 code for didn't apply AB algorithm at all. 999 code for filter from 0.1 to 30 and no alogirthm.
- approach = 'total'; %single smoothing matrix used
- % ---- Subject Information ---
- TDC = {'2481', '1646', '3367', '2860', '1844', '2920', '1136', '2808', '1498', '1655', '2577', '2802', '1343', '1430', ...
- '3260', '2181', '1025', '1692', '0076', '0439', '2835', '3186', '0694', '1466', '3107', '2723', '1008', '2313', '1864', '1340', '2805'};
- FXS = {'2978', '0836', '1721', '0649', '0468', '0871', '2195', '0913', '1649', '2151', '2472', '2604', '1037', '0392', '1841', '2238', '1798'};
- %ASD = {'3463', '2219', '0409', '0502', '0114', '1292', '2410', '2866', '2339', '2100', '0878', '1963','2215', '1995', '2695'};
- AllSubjects = [TDC, FXS, ASD];
- NewSubjectIDs = {'1798', '1841', '2238', '1963', '1995', '2215', '2695'};
- NewSubjectIndices = find(contains(datafile_names, NewSubjectIDs));
- AllSubjectIndices = find(contains(datafile_names, [TDC, FXS])); %for now just run TDC and FXS, run ASD later
- %% Preprocessing following Fujioka et al. 2011
- for subjecti = NewSubjectIndices
- STUDY = []; CURRENTSTUDY = 0; ALLEEG = []; EEG=[]; CURRENTSET=[]; %clear any dataset currently loaded in GUI.
- EEG=mff_import([rawdata_location filesep datafile_names{subjecti}]);
- [ALLEEG EEG CURRENTSET] = pop_newset( ALLEEG, EEG, CURRENTSET, 'gui','off');
- %import channel locations
- EEG=pop_chanedit(EEG, 'load',{channel_locations 'filetype' 'autodetect'});
- EEG = eeg_checkset( EEG );
- % Check whether the channel locations were properly imported. The EEG signals and channel numbers should be same.
- if size(EEG.data, 1) ~= length(EEG.chanlocs)
- error('The size of the data does not match with channel numbers.');
- end
- %remove outer ring of channels (see Fujioka et al. 2011)
- EEG = pop_select( EEG,'nochannel', outerlayer_channel);
- %filter between 0.5 and 20 Hz - same as before.
- %ton of 60 hz noise
- %filter first with notch, then with buttersworth filter?
- EEG = pop_basicfilter( EEG, 1:EEG.nbchan, 'Boundary', 'boundary', 'Cutoff', 60, 'Design', 'notch', 'Filter', 'PMnotch', 'Order', 180, 'RemoveDC', 'on' ); % GUI: 07-Jun-2017 18:55:44
- %filter the data using ERPLAB [ 0.5 20]
- EEG = pop_basicfilter( EEG, 1:EEG.nbchan, 'Cutoff', [ 0.5 20], 'Design', 'butter', 'Filter', 'bandpass', 'Order', 2, 'RemoveDC', 'on' ); % GUI: 15-Jan-2014 16:49:27
- %save the dataset into the appropriate folder
- SubjectName = datafile_names{subjecti}(1:4);
- EEG.setname = [SubjectName '_preprocessed'];
- EEG = pop_saveset( EEG, 'filename', [SubjectName '_preprocessed'], 'filepath', [CurrentDirectory 'FXS project/infant pipeline/preprocessed/']); %
- end
- %% APPLY ARTIFACT BLOCKING (AB) ALGORITHM
- for subjecti = NewSubjectIndices
- SubjectName = datafile_names{subjecti}(1:4);
- %load preprocessed dataset
- STUDY = []; CURRENTSTUDY = 0; ALLEEG = []; EEG=[]; CURRENTSET=[];
- EEG = pop_loadset( 'filename', [SubjectName '_preprocessed.set'], 'filepath', [CurrentDirectory 'FXS project/infant pipeline/preprocessed/']);
- [ALLEEG, EEG, CURRENTSET] = eeg_store( ALLEEG, EEG );
- %outer ring of channels already removed. %remove CZ - algorithm doesn't
- %work if ref channel is included.
- EEG = pop_select( EEG,'rmchannel', {'Cz'});
- %call algorithm
- CleanEEG = AB_alg_window(EEG.data,EEG.srate,threshold, approach); %algorithm won't work properly if ref channel is included.
- %EEGDataOriginal = EEG.data;
- EEG.data = CleanEEG;
- %rerefernce the data - I didn't retain the Cz channel because it gave me an
- %warning about the same channel label.
- EEG = pop_reref( EEG, []);
- %save the dataset into the appropriate folder
- EEG.setname = [SubjectName '_artifact corrected'];
- EEG = pop_saveset( EEG, 'filename', [SubjectName '_artifact corrected'], 'filepath', [CurrentDirectory 'FXS project/infant pipeline/ABCleaned/']); %"real" subjects (not pilot subjects) will be named Infant1, Infant2, Infant3, etc.
- end
- %% CREATE EPOCHS
- NumSyllablesPerEpoch = 30; %syllables as in PsychSci Paper corresponding to 9 seconds.
- EpochLength = NumSyllablesPerEpoch*0.3; %in seconds --> this assumes presentation rate of 300ms per syllable
- for subjecti = NewSubjectIndices %11:length(datafile_names)
- SubjectName = datafile_names{subjecti}(1:4);
- %load preprocessed dataset
- STUDY = []; CURRENTSTUDY = 0; ALLEEG = []; EEG=[]; CURRENTSET=[];
- EEG = pop_loadset( 'filename', [SubjectName '_artifact corrected.set'], 'filepath', [CurrentDirectory 'FXS project/infant pipeline/ABCleaned/']);
- [ALLEEG, EEG, CURRENTSET] = eeg_store( ALLEEG, EEG );
- UnacceptableJitter = 320; %1000hz sampling rate --> 320 msec rather than 300 msec SOA between syllables is not acceptable. Expect 300
- EventsToRemove = [];
- for x = 2:size(EEG.event,2) %for each code beginning at the second code (first few are start codes anyway)
- if strcmp(EEG.event(x).type, 'DI64')
- EventsToRemove = [EventsToRemove, x];
- end
- end
- if size(EventsToRemove, 1) > 0
- EEG = pop_selectevent( EEG, 'event', EventsToRemove,'select','inverse','deleteevents','on');
- end
- %epoch to every 10th word (every 30 syllables in the random condition)
- y = 5; %don't include the very first syllable due to sharp auditory onset response; skip over three "start codes" plus first syllable
- while y < size(EEG.event,2) %number of events
- if contains(EEG.event(y).type, WordOnsetStrings) %ismember( EEG.event(y).type, WordOnsetStrings)
- CandidateEpochOnset = y; %found a candidate code to onset to.
- syllablecounter = 0;
- for z = y:size(EEG.event,2) %candidate code is syllable 1, and so on.
- %if a pause or break in auditory stimulation is detected
- if EEG.event(z).latency - EEG.event(z-1).latency > UnacceptableJitter %155 %unacceptable level of stim jitter or pause. %should typically have an interstim interval of 154 sampling points (300 ms) --> if not, pause is detected (165 originally)
- disp('break in auditory stimulation detected!')
- disp(EEG.event(z))
- syllablecounter = 0; %reset
- y = z;
- break
- end
- if contains( EEG.event(z).type, SyllableCodeStrings)
- syllablecounter = syllablecounter + 1;
- if syllablecounter == NumSyllablesPerEpoch % 36 syllables without running into a boundary or other unexpected code
- EEG = pop_editeventvals(EEG,'changefield',{CandidateEpochOnset,'type','NE'});%NE - New Epoch
- disp(CandidateEpochOnset)
- y = z; %search for next candidate epoch onset 30 positions later.
- break
- end
- elseif ~ismember( EEG.event(z).type, SyllableCodeStrings) %a 'boundary' event --> reset the counter in this case as it needs to be 36 continuous syllables.
- disp('other code found')
- disp(EEG.event(z).type)
- syllablecounter = 0; %reset
- y = z; %if you hit a boundary need to start looking again for a candidate epoch onset...
- break
- end
- end
- end
- y = y + 1;
- end
- % STEP 12: Segment data into fixed length epochs
- %task_event_markers = {'NE'}; %new epoch events, created in step 11.5 (Entrain)
- EEG = eeg_checkset(EEG);
- EEG = pop_epoch(EEG, {'NE'}, [0 EpochLength], 'epochinfo', 'yes');
- EEG = eeg_checkset( EEG );
- EEG = pop_rmbase( EEG, [EEG.times(1) EEG.times(end)]); %baseline correct to the entire epoch
- EEG = eeg_checkset( EEG );
- EEG.setname = [SubjectName '_epoched'];
- EEG = pop_saveset( EEG, 'filename', [SubjectName '_epoched'], 'filepath', [CurrentDirectory 'FXS project/infant pipeline/epochs/']); %"real" subjects (not
- end
- %% LOAD PARAMETERS (recommended by Ana) and RUN FFT
- % Output frequencies to keep
- foutput = [0.6 10];
- % Range of frequnecies to use to compute SNR.
- % It is better if it includes the foutput and if the lower limit is bigger than the high-pass filter used in the data
- fband = [0.2 15];
- % target frequencies if indeicated won't be used to compute the SNR.
- % Not really necessary, if left empty should give more or less the same
- ftarget = []; % [1.11 3.33] | []
- % Bins around each frequnecy bin to compute SNR
- binsSNR = [-5 -4 -3 -2 -1 1 2 3 4 5];
- % SNR method for the power
- % based on the linear fit of log(Power) vs log(freq) of the adjacent
- % freuency bins. it seems the most sensitive
- typeSNRPWR = 'linear';
- % SNR method for the PLV
- % In principle it shouldn't be necessary but by computing it sensitivity
- % may slightly improve. I put 'none' but you can try 'linear' or 'mean'
- typeSNRPLV = 'none';
- % Z-score or not the final power.
- % Not really necessary, only to center at zero the final data
- zscorePWR = 0;
- % Z-score or not the final PLV.
- % Not really necessary, only to center at zero the final data
- zscorePLV = 0;
- cd([CurrentDirectory 'FXS Project/infant pipeline/FFT files/']) %so that files go in proper place
- DataQualityMtx = [];
- for subjecti= NewSubjectIndices %1:length(datafile_names)
- clear EEGfrq
- SubjectName = datafile_names{subjecti}(1:4);
- %load dataset
- %load preprocessed dataset
- STUDY = []; CURRENTSTUDY = 0; ALLEEG = []; EEG=[]; CURRENTSET=[];
- EEG = pop_loadset( 'filename', [SubjectName '_epoched.set'], 'filepath', [CurrentDirectory 'FXS project/infant pipeline/epochs/']);
- [ALLEEG, EEG, CURRENTSET] = eeg_store( ALLEEG, EEG );
- EEGfrq = frqa_plvpwr(EEG, 'foutput',foutput,'fband',fband,'binsSNR',binsSNR,...
- 'typeSNRPWR',typeSNRPWR,'typeSNRPLV',typeSNRPLV,...
- 'zscorePWR',zscorePWR,'zscorePLV',zscorePLV);
- filename = char(strcat(SubjectName, '_Structured_EEGfreq'));
- save(filename, 'EEGfrq'); %how to save when filename is a variable set beforehand
- end
- %% Individual FFT plots
- FFTfile_location = [CurrentDirectory 'FXS Project/infant pipeline/FFT files'];
- cd(FFTfile_location)
- %FFTfiles = dir('*Structured_EEGfreq.mat'); %this only considers the files that were succesfully preprocessed and not those tagged with 'no usable data, all bad epochs.'
- %FFTfile_names={FFTfiles.name};
- plotchan= 1:104; % we removed the outer ring of electrodes
- locsfile = [CurrentDirectory 'FXS Project/channel location file/EGI104InnerChannelsNoCz.locs']; %exported this .locs file one time from EEG dataset. writelocs( chanstruct, filename ); writelocs( EEG.chanlocs, 'testlocs' );
- for subji = NewSubjectIndices %1:length(FFTfile_names)
- cd([CurrentDirectory 'FXS Project/infant pipeline/FFT files'])
- %Load struct_ersp and rand_ersp for each subject
- clear Struct_PLV EEGfrq*
- SubjectName = datafile_names{subji}(1:4);
- %SubjectNumber = extractBetween(FFTfile_names{subji}, 1, 4);
- load([SubjectName '_Structured_EEGfreq.mat'])
- %load(FFTfile_names{subji})
- Struct_PLV = EEGfrq.plv(:,:);
- freqvals = EEGfrq.freqs; %freqs based on last file loaded
- freqvalindicesunder5Hz = find(freqvals <= 5);
- [~, WordFreq] = min(abs(freqvals-1.1111));
- [~, SyllableFreq] = min(abs(freqvals-3.3333)); %syllable freq = 3.33 Hz
- %extract neighbouring bins
- NeighbouringWordFreqBins = [WordFreq-3, WordFreq-2, WordFreq-1, WordFreq+1, WordFreq+2, WordFreq+3];
- NeighbouringSyllableFreqBins = [SyllableFreq-3, SyllableFreq-2, SyllableFreq-1, SyllableFreq+1, SyllableFreq+2, SyllableFreq+3];
- %compute actual and normalized ITC values for topoplot
- WordITC = Struct_PLV(plotchan, WordFreq);
- SyllableITC = Struct_PLV(plotchan, SyllableFreq);
- WordNeighboursITC = squeeze(mean(Struct_PLV(plotchan, NeighbouringWordFreqBins ),2));
- SyllableNeighboursITC = squeeze(mean(Struct_PLV(plotchan, NeighbouringSyllableFreqBins ),2));
- WordITCNormalized = WordITC - WordNeighboursITC;
- SyllableITCNormalized = SyllableITC - SyllableNeighboursITC;
- cd([CurrentDirectory 'FXS Project/infant pipeline/individual plots'])
- figure; plot(freqvals(freqvalindicesunder5Hz), mean(Struct_PLV(plotchan,freqvalindicesunder5Hz),1), 'r');
- hold on
- xline(1.111, '--')
- hold on
- xline(2.222, '--')
- hold on
- xline(3.333, '--')
- hold on
- legend([SubjectName ' structured'])
- figurename = char(strcat(SubjectName, '_Structured'));
- print('-dpdf', figurename); %save as postscript in order to merge two files
- %topoplot
- WordFreqScaleLimits = [-0.25 .25];
- SyllableFreqScaleLimits = [-0.6 0.6];
- figure;
- subplot(2,2,1); topoplot(WordITC, locsfile, 'style', 'map', 'colormap', jet, 'maplimits', WordFreqScaleLimits , 'shading','interp'); colorbar;
- title([SubjectName 'ITC Word Frequency']);
- set(gcf,'PaperPositionMode','manual', 'PaperOrientation', 'portrait', 'PaperPosition', [0.05 0.15 12.0 8.50]) %corresponds to settings on Print Preview. %good measurements for not cutting off title.
- subplot(2,2,2); topoplot(SyllableITC, locsfile, 'style', 'map', 'colormap', jet, 'maplimits', SyllableFreqScaleLimits , 'shading','interp'); colorbar;
- title('ITC Syllable Frequency');
- subplot(2,2,3); topoplot(WordITCNormalized, locsfile, 'style', 'map', 'colormap', jet, 'maplimits', WordFreqScaleLimits , 'shading','interp'); colorbar;
- title('Normalized ITC Word Frequency');
- set(gcf,'PaperPositionMode','manual', 'PaperOrientation', 'portrait', 'PaperPosition', [0.05 0.15 12.0 8.50]) %corresponds to settings on Print Preview. %good measurements for not cutting off title.
- subplot(2,2,4); topoplot(SyllableITCNormalized, locsfile, 'style', 'map', 'colormap', jet, 'maplimits', SyllableFreqScaleLimits , 'shading','interp'); colorbar;
- title('Normalized ITC Syllable Frequency');
- set(gcf,'PaperPositionMode','manual', 'PaperOrientation', 'portrait', 'PaperPosition', [0.05 0.15 12.0 8.50]) %corresponds to settings on Print Preview. %good measurements for not cutting off title.
- filename = char(strcat(SubjectName, ' ITC Topoplot'));
- print ('-dtiff', filename);
- end
- %% GRAND AVERAGE - FFT -- ALL PARTICIPANTS - OVERALL EXPOSURE
- clear SubjectIDs ITCVars
- clear FFTfile* Structured_PLVMtx
- clear Structured_PLVMtx
- plotchan= 1:104; %SigWordElectrodes; %1:105; % we removed the outer ring of electrodes
- locsfile = [CurrentDirectory 'FXS Project/channel location file/EGI104InnerChannelsNoCz.locs']; %exported this .locs file one time from EEG dataset. writelocs( chanstruct, filename ); writelocs( EEG.chanlocs, 'testlocs' );
- FFTfile_location = [CurrentDirectory 'FXS Project/infant pipeline/FFT files'];
- cd(FFTfile_location)
- FFTfiles = dir('*Structured_EEGfreq.mat'); %this only considers the files that were succesfully preprocessed and not those tagged with 'no usable data, all bad epochs.'
- FFTfile_names={FFTfiles.name};
- SubjectList = [];
- GroupName = ASD; %FXS; %TDC; %FXS; %ASD %TDC; %ASD; %FXS; %TDC; %FXS; %TDC; AllSubjects; %
- %get subject list
- for x = 1:length(FFTfile_names)
- SubjectNumber = cell2mat(extractBetween(FFTfile_names{x}, 1, 4));
- if ismember(SubjectNumber, GroupName)
- SubjectList = [SubjectList, x];
- end
- end
- % -- STRUCTURED --
- clear PLVMtx Struct* Rand* Grand* PLV*
- for i = SubjectList
- display(i)
- %Load struct_ersp and rand_ersp for each subject
- %load([SubjectID{i} '_EEGfrq.mat'])
- load(FFTfile_names{i})
- disp(FFTfile_names{i})
- PLV = EEGfrq.plv(plotchan,:); %only extracts relevant channels
- Structured_PLVMtx(i,:,:) = PLV; %rows without corresponding subjects (e.g., 20) just contains 0s. This is taken into account below by selecting SubjectsToInclude as a dimension.
- % -- to extract individual level variables --
- freqvals = EEGfrq.freqs; %freqs based on last subject loaded
- [~, WordFreq] = min(abs(freqvals-1.1111));
- [~, SyllableFreq] = min(abs(freqvals-3.3333)); %syllable freq = 3.33 Hz
- %extract neighbouring bins
- NeighbouringWordFreqBins = [WordFreq-3, WordFreq-2, WordFreq-1, WordFreq+1, WordFreq+2, WordFreq+3];
- NeighbouringSyllableFreqBins = [SyllableFreq-3, SyllableFreq-2, SyllableFreq-1, SyllableFreq+1, SyllableFreq+2, SyllableFreq+3];
- %compute individual actual and normalized ITC values to store for analysis
- WordITC = PLV(:, WordFreq);
- SyllableITC = PLV(:, SyllableFreq);
- WordNeighboursITC = squeeze(mean(PLV(:, NeighbouringWordFreqBins ),2));
- SyllableNeighboursITC = squeeze(mean(PLV(:, NeighbouringSyllableFreqBins ),2));
- WordITCNormalized = WordITC - WordNeighboursITC;
- SyllableITCNormalized = SyllableITC - SyllableNeighboursITC;
- %average across channels
- MeanWordITC = mean(WordITC,1);
- MeanSyllableITC = mean(SyllableITC,1);
- MeanWordITCNormalized = mean(WordITCNormalized,1);
- MeanSyllableITCNormalized = mean(SyllableITCNormalized,1);
- ITCVars(i,:,:,:) = [MeanWordITC, MeanSyllableITC, MeanWordITCNormalized, MeanSyllableITCNormalized];
- %store subject and group information
- SubjectNumber = cell2mat(extractBetween(FFTfile_names{i}, 1, 4));
- if ismember(SubjectNumber, TDC)
- GroupNum = 1;
- elseif ismember(SubjectNumber, FXS)
- GroupNum = 2;
- elseif ismember(SubjectNumber, ASD)
- GroupNum = 3;
- end
- SubjectIDs{i,1} = SubjectNumber;
- SubjectIDs{i,2} = GroupNum; %also store group membership
- %CongruentSubjectIDs{i,:} = SubjectID{i};
- end
- %freqvals = EEGfrq.freqs; %freqs based on last subject loaded
- %average across channels
- GrandAveragePLV_Structured = squeeze(mean(Structured_PLVMtx(SubjectList,:,:),1));
- GrandAveragePLV_avacrosschans_Structured = mean(GrandAveragePLV_Structured(:,:),1);
- %Standard Error
- PLV_averageacrosschans_Structured = squeeze(mean(Structured_PLVMtx(SubjectList,:,:),2)); %now nsubj x nfreq
- STD_Structured = std(PLV_averageacrosschans_Structured(:,:)); %nfreqs
- SE_Structured = STD_Structured/sqrt(numel(SubjectList));
- NSubjects = numel(SubjectList);
- %---- Plots ------
- cd([CurrentDirectory 'FXS Project/infant pipeline/grand averages/'])
- %truncated
- freqvalindicesunder5Hz = find(freqvals <= 5);
- figure; plot(freqvals(freqvalindicesunder5Hz), GrandAveragePLV_avacrosschans_Structured(freqvalindicesunder5Hz),'r');
- hold on
- %shadedErrorBar(freqvals(freqvalindicesunder5Hz),GrandAveragePLV_avacrosschans_Structured(freqvalindicesunder5Hz), SE_Structured(freqvalindicesunder5Hz), 'lineprops','r') %old syntax for shadedErrorBar
- shadedErrorBar(freqvals(freqvalindicesunder5Hz),GrandAveragePLV_avacrosschans_Structured(freqvalindicesunder5Hz), SE_Structured(freqvalindicesunder5Hz), {'Color', 'r' }, 1);
- hold on
- xline(1.111, '--')
- hold on
- xline(2.222, '--')
- hold on
- xline(3.333, '--')
- legend('structured', 'SE')
- pdfname = ['ITC FFT All Channels, n = ' num2str(NSubjects)];
- %pdfname = ['ITC FFT Auditory ROI'];
- print('-dpdf', pdfname); %save as postscript in order to merge two files
- % PLOT TOPOS
- %figure out freqs of interest
- [~, WordFreq] = min(abs(freqvals-1.1111));
- [~, SyllableFreq] = min(abs(freqvals-3.3333)); %syllable freq = 3.33 Hz
- %extract neighbouring bins
- NeighbouringWordFreqBins = [WordFreq-3, WordFreq-2, WordFreq-1, WordFreq+1, WordFreq+2, WordFreq+3];
- NeighbouringSyllableFreqBins = [SyllableFreq-3, SyllableFreq-2, SyllableFreq-1, SyllableFreq+1, SyllableFreq+2, SyllableFreq+3];
- Structured_ITC_WordFreq = squeeze(GrandAveragePLV_Structured(:,WordFreq));
- Structured_ITC_SyllableFreq = squeeze(GrandAveragePLV_Structured(:,SyllableFreq));
- WordNeighboursITC = squeeze(mean(GrandAveragePLV_Structured(:, NeighbouringWordFreqBins ),2));
- SyllableNeighboursITC = squeeze(mean(GrandAveragePLV_Structured(:, NeighbouringSyllableFreqBins ),2));
- WordITCNormalized = Structured_ITC_WordFreq - WordNeighboursITC;
- SyllableITCNormalized = Structured_ITC_SyllableFreq - SyllableNeighboursITC;
- WordFreqScaleLimits = [-0.2 .2];
- SyllableFreqScaleLimits = [-0.5 0.5];
- NormalizedWordFreqScaleLimits = [-0.05 .05];
- NormalizedSyllableFreqScaleLimits = [-0.4 0.4];
- PValueLimits = [0 0.1];
- figure;
- %regular raw values
- subplot(2,2,1); topoplot(Structured_ITC_WordFreq, locsfile, 'style', 'map', 'colormap', jet, 'maplimits', WordFreqScaleLimits , 'shading','interp'); colorbar;
- title('Structured ITC Word Frequency');
- subplot(2,2,2); topoplot(Structured_ITC_SyllableFreq, locsfile, 'style', 'map', 'colormap', jet, 'maplimits', SyllableFreqScaleLimits , 'shading','interp'); colorbar;
- title('Structured ITC Syllable Frequency');
- %normalized
- subplot(2,2,3); topoplot(WordITCNormalized, locsfile, 'style', 'map', 'colormap', jet, 'maplimits', NormalizedWordFreqScaleLimits , 'shading','interp'); colorbar;
- title('ITC Word Normalized');
- subplot(2,2,4); topoplot(SyllableITCNormalized, locsfile, 'style', 'map', 'colormap', jet, 'maplimits', NormalizedSyllableFreqScaleLimits , 'shading','interp'); colorbar;
- title('ITC Syllable Normalized');
- set(gcf,'PaperPositionMode','manual', 'PaperOrientation', 'portrait', 'PaperPosition', [0.05 0.15 12.0 8.50]) %corresponds to settings on Print Preview. %good measurements for not cutting off title.
- filename = ['Condition x Frequency Topo Plots n = ' num2str(NSubjects)];
- print ('-dtiff', filename);
- %figure out which electrodes are significant
- NormalizedWordITC_SubjectByChannel = Structured_PLVMtx(SubjectList,:,WordFreq) - mean(Structured_PLVMtx(SubjectList,:,NeighbouringWordFreqBins),3); %NSubject x NChan
- NormalizedSyllableITC_SubjectByChannel = Structured_PLVMtx(SubjectList,:,SyllableFreq) - mean(Structured_PLVMtx(SubjectList,:,NeighbouringSyllableFreqBins),3);
- [SigWordElectrodesArray, PWord] = ttest(NormalizedWordITC_SubjectByChannel, 0, 'tail', 'right'); %one directional t-test, mean is greater than 0
- [SigSyllableElectrodesArray, PSyllable] = ttest(NormalizedSyllableITC_SubjectByChannel, 0, 'tail', 'right'); %one directional t-test, mean is greater than 0
- SigWordElectrodes = find(SigWordElectrodesArray ==1);
- SigSyllableElectrodes = find(SigSyllableElectrodesArray ==1);
- NumSigWordElectrodes = numel(SigWordElectrodes);
- %plot significant electrodes
- figure;
- subplot(1,2,1)
- topoplot(WordITCNormalized, locsfile, 'style', 'map', 'colormap', jet, 'maplimits', NormalizedWordFreqScaleLimits,'shading','interp', 'emarker2', {SigWordElectrodes ,'p','k', 7, 1} ); colorbar;
- title(['Significant Word ITC Electrodes: ' num2str(NumSigWordElectrodes)]);
- subplot(1,2,2)
- topoplot(SyllableITCNormalized, locsfile, 'style', 'map', 'colormap', jet, 'maplimits', NormalizedSyllableFreqScaleLimits,'shading','interp', 'emarker2', {SigSyllableElectrodes ,'p','k', 7, 1} ); colorbar;
- title(['Significant Syllable ITC Electrodes']);
- set(gcf,'PaperPositionMode','manual', 'PaperOrientation', 'portrait', 'PaperPosition', [0.05 0.15 12.0 8.50]) %corresponds to settings on Print Preview. %good measurements for not cutting off title.
- filename = ['Sig Electrodes Topo Plots n = ' num2str(NSubjects)];
- print ('-dtiff', filename);
- %if you want you could run it from the top one more time to plot the ITC
- %graph with only the significant word electrodes
- % %create a table
- % ITCVarsCell = num2cell(ITCVars);
- % ITCVarsWithSubjectIDs = horzcat(SubjectIDs, ITCVarsCell);
- %
- % ColumnNames = {'Subject', 'Group', 'WordITC', 'SyllableITC', 'WordITCNormalized', 'SyllableITCNormalized'};
- % IndividualLevelVariablesTableForAnalysis = cell2table(ITCVarsWithSubjectIDs(1:end,:), 'VariableNames', ColumnNames);
- %
- % LocationForCSV = [CurrentDirectory 'FXS Project/infant pipeline/grand averages/stats for analysis']; %on the server
- % cd(LocationForCSV)
- %
- % writetable(IndividualLevelVariablesTableForAnalysis,'IndividualLevelVariablesTableForAnalysis.csv')
- %% CREATE 100 SURROGATE DATASETS PER PARTICIPANT
- %load the same FFT parameters as above.
- EpochLength = 9;
- cd([CurrentDirectory 'FXS Project/infant pipeline/shuffled FFT files/']) %so that files go in proper place
- NumIterations = 100;
- for subjecti = 1:length(datafile_names)
- clear EEGfrq_ByIteration
- disp(subjecti)
- %load dataset
- SubjectName = datafile_names{subjecti}(1:4);
- STUDY = []; CURRENTSTUDY = 0; ALLEEG = []; EEG=[]; CURRENTSET=[];
- EEG = pop_loadset( 'filename', [SubjectName '_epoched.set'], 'filepath', [CurrentDirectory 'FXS project/infant pipeline/epochs/']);
- [ALLEEG, EEG, CURRENTSET] = eeg_store( ALLEEG, EEG );
- %for each 200 "actual onset" event code, get the "urevent" - in EGI, this
- %is stored as EEG.event.description
- %double check to make sure each epoch has the correct number of events
- OnsetCodeStrings = {'NE'};
- EventDescriptionMtx = [];
- for x = 1:size(EEG.event,2) %epoch
- if ismember( EEG.event(x).type, OnsetCodeStrings )
- EventDescription = str2double(EEG.event(x).description);
- EventDescriptionMtx = [EventDescriptionMtx, EventDescription];
- end
- end
- EventDescriptionMtxUnique = unique(EventDescriptionMtx); %remove duplicates
- %load preprocessed AB corrected continuous data
- STUDY = []; CURRENTSTUDY = 0; ALLEEG = []; EEG=[]; CURRENTSET=[];
- EEG = pop_loadset( 'filename', [SubjectName '_artifact corrected.set'], 'filepath', [CurrentDirectory 'FXS project/infant pipeline/ABCleaned/']);
- [ALLEEG, EEG, CURRENTSET] = eeg_store( ALLEEG, EEG );
- ParentEEG = EEG; %parentEEG will now be used for all iterations
- %for each iteration
- for iter = 1:NumIterations
- disp(iter)
- %for each UR Event identified above (corresponding to a 200 code), randomly select an onset from -1 to 1 seconds before or
- %after to shuffle the timing while preserving the general sleep state
- DatapointLength = 1000/EEG.srate;
- %plus or minus 900 ms (word rate) from the true event
- ShufflingWindowMin = -1*900/(DatapointLength); % -900;
- ShufflingWindowMax = 900/(DatapointLength); %+900 datapoints (EEG.srate = 1000).
- EventsToAdd = [];
- for x = 1:size(ParentEEG.event,2) %number of events
- if ismember( str2double(ParentEEG.event(x).description), EventDescriptionMtxUnique)
- %randomly select an interval +/- 1.0 seconds
- RandomInterval = ShufflingWindowMin + (ShufflingWindowMax-ShufflingWindowMin).*rand(1); %in data points
- ShuffledOnsetLatency = ParentEEG.event(x).latency + RandomInterval; %in datapoints
- EventsToAdd = [EventsToAdd; 300, ShuffledOnsetLatency];
- end
- end
- %insert new events (300 codes) that are +/- 900 msec prior to the real onsets
- EEG = pop_importevent(ParentEEG, 'event', EventsToAdd, 'fields', {'type', 'latency'}, 'append', 'yes', 'optimalign', 'off', 'timeunit', NaN ); %datapoints
- EEG = eeg_checkset( EEG );
- %epoch to all 300 codes.
- EEG = pop_epoch( EEG, { '300'}, [0 EpochLength], 'epochinfo', 'yes'); %epoch all the selected events.
- EEG = eeg_checkset( EEG );
- EEG = pop_rmbase( EEG, [EEG.times(1) EEG.times(end)]); %baseline correct to the entire epoch (better for running ICA).
- EEG = eeg_checkset( EEG );
- %double check to make sure each epoch has the correct number of events
- for x = 1:size(EEG.epoch,2) %epoch
- NumSyllables = 0; %each epoch should have 30 or 31 syllables exactly (31 because the next syllable might just make it into the epoch)
- for y = 1:size(EEG.epoch(x).event,2) %event within each epoch
- if ismember( EEG.epoch(x).eventtype{y}, SyllableCodeStrings )
- NumSyllables = NumSyllables + 1;
- end
- end
- if NumSyllables <30|| NumSyllables >31
- disp(['Epoch Error! Epoch to Remove:' num2str(x) ])
- disp(['Epoch as only ' num2str(NumSyllables) ' syllable codes, which can happen at the end of a naturally occurring block.'])
- else
- disp('All epochs contain the expected number of syllable codes!')
- end
- end
- %run FFT
- clear EEGfrq
- EEGfrq = frqa_plvpwr(EEG, 'foutput',foutput,'fband',fband,'binsSNR',binsSNR,...
- 'typeSNRPWR',typeSNRPWR,'typeSNRPLV',typeSNRPLV,...
- 'zscorePWR',zscorePWR,'zscorePLV',zscorePLV);
- %for the first iteration ONLY, create the big structure
- %this will be filled in eventually with all iterations
- if iter == 1
- EEGfrq_ByIteration.iteration(1:NumIterations) = EEGfrq; %in order to have a bigger structure with the same structure
- disp('creating the big structure for all subsequent iterations...')
- end
- EEGfrq_ByIteration.iteration(iter) = EEGfrq;
- end %end final iteration
- % save the big structure
- filename = char(strcat(SubjectName, '_EEGfreq_ByIteration'));
- save(filename, 'EEGfrq_ByIteration'); %how to save when filename is a variable set beforehand
- end
- %% EXTRACT PLV FROM TRUE DATA AND SURROGATE DATA, AND PLOT
- clear SubjectIDs ITCVars
- clear FFTfile* Structured_PLVMtx
- clear Structured_PLVMtx
- plotchan= 1:104; %SigWordElectrodes; %1:105; % we removed the outer ring of electrodes
- locsfile = [CurrentDirectory 'FXS Project/channel location file/EGI104InnerChannelsNoCz.locs']; %exported this .locs file one time from EEG dataset. writelocs( chanstruct, filename ); writelocs( EEG.chanlocs, 'testlocs' );
- FFTfile_location = [CurrentDirectory 'FXS Project/infant pipeline/FFT files'];
- cd(FFTfile_location)
- FFTfiles = dir('*Structured_EEGfreq.mat'); %this only considers the files that were succesfully preprocessed and not those tagged with 'no usable data, all bad epochs.'
- FFTfile_names={FFTfiles.name};
- FFTsurrogatefile_location = [CurrentDirectory 'FXS Project/infant pipeline/shuffled FFT files'];
- SubjectList = [];
- GroupName = FXS; %ASD %TDC; %ASD; %FXS; %TDC; %FXS; %TDC; AllSubjects; %
- %get subject list
- for x = 1:length(FFTfile_names)
- SubjectNumber = cell2mat(extractBetween(FFTfile_names{x}, 1, 4));
- if ismember(SubjectNumber, GroupName)
- SubjectList = [SubjectList, x];
- end
- end
- % -- STRUCTURED --
- clear PLVMtx Struct* Rand* Grand* PLV*
- TruePLVMtx = [];
- SurrogatePLVMtx = [];
- PLVSurrogate = [];
- for i = SubjectList
- clear EEGfrq* SurrogateDataFileName SurrogateDatasetsMtx
- display(i)
- %load "true" data
- cd(FFTfile_location)
- load(FFTfile_names{i})
- disp(FFTfile_names{i})
- PLVTrue = EEGfrq.plv(plotchan,:); %only extracts relevant channels
- TruePLVMtx(i,:,:) = PLVTrue; %rows without corresponding subjects (e.g., 20) just contains 0s. This is taken into account below by selecting SubjectsToInclude as a dimension.
- %load corresponding surrogate data
- cd(FFTsurrogatefile_location)
- SurrogateDataFileName = [char(extractBetween(FFTfile_names{i}, 1,4)) '_EEGfreq_ByIteration.mat'];
- load(SurrogateDataFileName)
- for iterationnum = 1:size(EEGfrq_ByIteration.iteration,2)
- SurrogateDatasetsMtx(iterationnum,:,:) = EEGfrq_ByIteration.iteration(iterationnum).plv(plotchan,:); %nchan x nfreqs for each surrogate dataset; ndataset x nchan x nfreq
- end
- PLVSurrogate = squeeze(mean(SurrogateDatasetsMtx,1)); %average across the 5 surrogate datasets for the subject
- SurrogatePLVMtx(i,:,:) = PLVSurrogate ; %nchan x nfreqs
- end
- % -- to extract individual level variables --
- freqvals = EEGfrq.freqs; %freqs based on last subject loaded
- [~, WordFreq] = min(abs(freqvals-1.1111));
- [~, SyllableFreq] = min(abs(freqvals-3.3333)); %syllable freq = 3.33 Hz
- GrandAverageTruePLV = squeeze(mean(TruePLVMtx(SubjectList,:,:),1));
- GrandAverageTruePLV_avacrosschans = mean(GrandAverageTruePLV(:,:),1);
- GrandAverageSurrogatePLV = squeeze(mean(SurrogatePLVMtx(SubjectList,:,:),1));
- GrandAverageSurrogatePLV_avacrosschans = mean(GrandAverageSurrogatePLV(:,:),1);
- %Standard Error
- TruePLV_averageacrosschans = squeeze(mean(TruePLVMtx(SubjectList,:,:),2)); %now nsubj x nfreq
- STD_TruePLV = std(TruePLV_averageacrosschans(:,:)); %nfreqs
- SE_TruePLV = STD_TruePLV /sqrt(numel(SubjectList));
- SurrogatePLV_averageacrosschans = squeeze(mean(SurrogatePLVMtx(SubjectList,:,:),2)); %now nsubj x nfreq
- STD_SurrogatePLV = std(SurrogatePLV_averageacrosschans(:,:)); %nfreqs
- SE_SurrogatePLV = STD_SurrogatePLV /sqrt(numel(SubjectList));
- NSubjects = numel(SubjectList);
- %---- Plots ------
- cd([CurrentDirectory 'FXS Project/infant pipeline/grand averages/'])
- %truncated
- freqvalindicesunder5Hz = find(freqvals <= 5);
- figure; plot(freqvals(freqvalindicesunder5Hz), GrandAverageTruePLV_avacrosschans(freqvalindicesunder5Hz),'r');
- hold on
- %shadedErrorBar(freqvals(freqvalindicesunder5Hz),GrandAveragePLV_avacrosschans_Structured(freqvalindicesunder5Hz), SE_Structured(freqvalindicesunder5Hz), 'lineprops','r') %old syntax for shadedErrorBar
- shadedErrorBar(freqvals(freqvalindicesunder5Hz),GrandAverageTruePLV_avacrosschans(freqvalindicesunder5Hz), SE_TruePLV(freqvalindicesunder5Hz), {'Color', 'r' }, 1);
- hold on
- plot(freqvals(freqvalindicesunder5Hz), GrandAverageSurrogatePLV_avacrosschans(freqvalindicesunder5Hz),'b');
- hold on
- shadedErrorBar(freqvals(freqvalindicesunder5Hz),GrandAverageSurrogatePLV_avacrosschans(freqvalindicesunder5Hz), SE_SurrogatePLV(freqvalindicesunder5Hz), {'Color', 'b' }, 1);
- hold on
- xline(1.111, '--')
- hold on
- xline(2.222, '--')
- hold on
- xline(3.333, '--')
- legend('structured', 'SE', 'surrogate', 'SE')
- pdfname = ['ITC FFT True data versus Surrogate data, All Channels, n = ' num2str(NSubjects)];
- %pdfname = ['ITC FFT Auditory ROI'];
- print('-dpdf', pdfname); %save as postscript in order to merge two files
- % plot distribution
- WordFreqScaleLimits = [-0.25 0.25]; %[-0.15 .15]; %so that 0 is centered on green.
- SyllableFreqScaleLimits = [-0.5 .5];
- DifferenceEffectScaleLimits = [-0.05 0.05];
- figure;
- subplot(2,2,1)
- topoplot(GrandAverageTruePLV(:,WordFreq), locsfile, 'style', 'map', 'colormap', jet, 'maplimits', WordFreqScaleLimits, 'plotrad',.5,'headrad',.5,'shading','interp'); colorbar;
- title('True Data, Word Frequency');
- subplot(2,2,2)
- topoplot(GrandAverageTruePLV(:,SyllableFreq), locsfile, 'style', 'map', 'colormap', jet, 'maplimits', SyllableFreqScaleLimits, 'plotrad',.5,'headrad',.5,'shading','interp'); colorbar;
- title('True Data, Syllable Frequency');
- subplot(2,2,3)
- topoplot(GrandAverageSurrogatePLV(:,WordFreq), locsfile, 'style', 'map', 'colormap', jet, 'maplimits', WordFreqScaleLimits, 'plotrad',.5,'headrad',.5,'shading','interp'); colorbar;
- title('Surrogate Data, Word Frequency');
- subplot(2,2,4)
- topoplot(GrandAverageSurrogatePLV(:,SyllableFreq), locsfile, 'style', 'map', 'colormap', jet, 'maplimits', SyllableFreqScaleLimits, 'plotrad',.5,'headrad',.5,'shading','interp'); colorbar;
- title('Surrogate Data, Syllable Frequency');
- set(gcf,'PaperPositionMode','manual', 'PaperOrientation', 'portrait', 'PaperPosition', [0.05 0.15 12.0 8.50]) %corresponds to settings on Print Preview. %good measurements for not cutting off title.
- filename = ['Topographical Distributions, True versus Surrogate, n = ' num2str(NSubjects)];
- print ('-dtiff', filename);
- %difference topo
- WordFreqDifference = GrandAverageTruePLV(:,WordFreq) - GrandAverageSurrogatePLV(:,WordFreq);
- SyllableFreqDifference = GrandAverageTruePLV(:,SyllableFreq) - GrandAverageSurrogatePLV(:,SyllableFreq);
- % figure;
- % subplot(2,2,1)
- % %topoplot(WordFreqDifference, locsfile, 'style', 'map', 'colormap', jet, 'maplimits', DifferenceEffectScaleLimits, 'plotrad',.5,'headrad',.5,'shading','interp'); colorbar;
- % topoplot(WordFreqDifference, locsfile, 'style', 'map', 'colormap', jet, 'maplimits', DifferenceEffectScaleLimits, 'plotrad',.5,'headrad',.5,'shading','interp', 'emarker2', {SignificantElectrodes_Word ,'p','k', 10, 1}); colorbar;
- % title('True minus Surrogate, Word Frequency');
- % subplot(2,2,2)
- % %topoplot(SyllableFreqDifference, locsfile, 'style', 'map', 'colormap', jet, 'maplimits', SyllableFreqScaleLimits, 'plotrad',.5,'headrad',.5,'shading','interp'); colorbar;
- % topoplot(SyllableFreqDifference, locsfile, 'style', 'map', 'colormap', jet, 'maplimits', SyllableFreqScaleLimits, 'plotrad',.5,'headrad',.5,'shading','interp', 'emarker2', {SignificantElectrodes_Syllable,'p','k', 10, 1}); colorbar;
- % title('True minus Surrogate, Syllable Frequency');
- % set(gcf,'PaperPositionMode','manual', 'PaperOrientation', 'portrait', 'PaperPosition', [0.05 0.15 12.0 8.50]) %corresponds to settings on Print Preview. %good measurements for not cutting off title.
- % filename = ['Topographical Distributions, True versus Surrogate, Difference, Sig Electrodes'];
- % print ('-dtiff', filename);
- figure;
- subplot(2,2,1)
- topoplot(WordFreqDifference, locsfile, 'style', 'map', 'colormap', jet, 'maplimits', DifferenceEffectScaleLimits, 'plotrad',.5,'headrad',.5,'shading','interp'); colorbar;
- %topoplot(WordFreqDifference, locsfile, 'style', 'map', 'colormap', jet, 'maplimits', DifferenceEffectScaleLimits, 'plotrad',.5,'headrad',.5,'shading','interp', 'emarker2', {SignificantElectrodes_Word ,'p','k', 10, 1}); colorbar;
- title('True minus Surrogate, Word Frequency');
- subplot(2,2,2)
- topoplot(SyllableFreqDifference, locsfile, 'style', 'map', 'colormap', jet, 'maplimits', SyllableFreqScaleLimits, 'plotrad',.5,'headrad',.5,'shading','interp'); colorbar;
- %topoplot(SyllableFreqDifference, locsfile, 'style', 'map', 'colormap', jet, 'maplimits', SyllableFreqScaleLimits, 'plotrad',.5,'headrad',.5,'shading','interp', 'emarker2', {SignificantElectrodes_Syllable,'p','k', 10, 1}); colorbar;
- title('True minus Surrogate, Syllable Frequency');
- set(gcf,'PaperPositionMode','manual', 'PaperOrientation', 'portrait', 'PaperPosition', [0.05 0.15 12.0 8.50]) %corresponds to settings on Print Preview. %good measurements for not cutting off title.
- title('True minus Surrogate, Syllable Frequency');
- set(gcf,'PaperPositionMode','manual', 'PaperOrientation', 'portrait', 'PaperPosition', [0.05 0.15 12.0 8.50]) %corresponds to settings on Print Preview. %good measurements for not cutting off title.
- filename = ['Topographical Distributions, True versus Surrogate, Difference, n = ' num2str(NSubjects)];
- print ('-dtiff', filename);
- %% EXTRACT PLV FROM TRUE DATA AND SURROGATE DATA, AND PLOT AS Z SCORES
- clear SubjectIDs ITCVars
- clear FFTfile* Structured_PLVMtx
- clear Structured_PLVMtx
- plotchan= 1:104; %SigWordElectrodes; %1:105; % we removed the outer ring of electrodes
- locsfile = [CurrentDirectory 'FXS Project/channel location file/EGI104InnerChannelsNoCz.locs']; %exported this .locs file one time from EEG dataset. writelocs( chanstruct, filename ); writelocs( EEG.chanlocs, 'testlocs' );
- FFTfile_location = [CurrentDirectory 'FXS Project/infant pipeline/FFT files'];
- cd(FFTfile_location)
- FFTfiles = dir('*Structured_EEGfreq.mat'); %this only considers the files that were succesfully preprocessed and not those tagged with 'no usable data, all bad epochs.'
- FFTfile_names={FFTfiles.name};
- FFTsurrogatefile_location = [CurrentDirectory 'FXS Project/infant pipeline/shuffled FFT files'];
- SubjectList = [];
- SubjectIDList = []; %for bookkeeping for later analyses
- GroupName = ASD; %FXS; %TDC; %FXS; %TDC; AllSubjects; %
- %get subject list
- for x = 1:length(FFTfile_names)
- SubjectNumber = cell2mat(extractBetween(FFTfile_names{x}, 1, 4));
- if ismember(SubjectNumber, GroupName)
- SubjectList = [SubjectList, x];
- SubjectIDList = [SubjectIDList; str2double(SubjectNumber)];
- end
- end
- % -- STRUCTURED --
- clear PLVMtx Struct* Rand* Grand* PLV*
- TruePLVMtx = [];
- PLVSurrogate = [];
- SurrogatePLVMtx = [];
- zscoreTruePLVMtx = [];
- for i = SubjectList
- clear EEGfrq* SurrogateDataFileName SurrogateDatasetsMtx zscoreTruePLV
- display(i)
- %load "true" data
- cd(FFTfile_location)
- load(FFTfile_names{i})
- disp(FFTfile_names{i})
- PLVTrue = EEGfrq.plv(plotchan,:); %only extracts relevant channels
- TruePLVMtx(i,:,:) = PLVTrue; %rows without corresponding subjects (e.g., 20) just contains 0s. This is taken into account below by selecting SubjectsToInclude as a dimension.
- %load corresponding surrogate data
- cd(FFTsurrogatefile_location)
- SurrogateDataFileName = [char(extractBetween(FFTfile_names{i}, 1,4)) '_EEGfreq_ByIteration.mat'];
- load(SurrogateDataFileName)
- for iterationnum = 1:size(EEGfrq_ByIteration.iteration,2)
- SurrogateDatasetsMtx(iterationnum,:,:) = EEGfrq_ByIteration.iteration(iterationnum).plv(plotchan,:); %nchan x nfreqs for each surrogate dataset; ndataset x nchan x nfreq
- end
- % Z score the data according to the surrogate distribution
- % each subject serves as their own Z score distribution
- Mean_Surrogate = squeeze(mean(SurrogateDatasetsMtx,1)); %average across the 100 surrogate datasets for the subject
- STD_Surrogate = squeeze(std(SurrogateDatasetsMtx)); %std deviation
- %compute z score
- zscoreTruePLV = (PLVTrue - Mean_Surrogate) ./ STD_Surrogate;
- SurrogatePLVMtx(i,:,:) = Mean_Surrogate; %stores the mean surrogate ITCs for each subject; nregion x nfreqs
- zscoreTruePLVMtx(i,:,:) = zscoreTruePLV; %stores the z scored actual observed data for each subject, nregion x nfreqs
- end
- % -- to extract individual level variables --
- freqvals = EEGfrq.freqs; %freqs based on last subject loaded
- [~, WordFreq] = min(abs(freqvals-1.1111));
- [~, SyllableFreq] = min(abs(freqvals-3.3333)); %syllable freq = 3.33 Hz
- GrandAverageTruePLV = squeeze(mean(TruePLVMtx(SubjectList,:,:),1));
- GrandAverageTruePLV_avacrosschans = mean(GrandAverageTruePLV(:,:),1);
- GrandAverageSurrogatePLV = squeeze(mean(SurrogatePLVMtx(SubjectList,:,:),1));
- GrandAverageSurrogatePLV_avacrosschans = mean(GrandAverageSurrogatePLV(:,:),1);
- %Standard Error
- TruePLV_averageacrosschans = squeeze(mean(TruePLVMtx(SubjectList,:,:),2)); %now nsubj x nfreq
- STD_TruePLV = std(TruePLV_averageacrosschans(:,:)); %nfreqs
- SE_TruePLV = STD_TruePLV /sqrt(numel(SubjectList));
- SurrogatePLV_averageacrosschans = squeeze(mean(SurrogatePLVMtx(SubjectList,:,:),2)); %now nsubj x nfreq
- STD_SurrogatePLV = std(SurrogatePLV_averageacrosschans(:,:)); %nfreqs
- SE_SurrogatePLV = STD_SurrogatePLV /sqrt(numel(SubjectList));
- %Z scores
- GrandAverageZscore = squeeze(mean(zscoreTruePLVMtx(SubjectList,:,:),1)); %nelectrodes x nfreqs
- GrandAverageZscore_avacrosselectrodes = mean(GrandAverageZscore,1); %across all electrodes
- %standard error
- ZScoreTruePLV_averageacrosschans = squeeze(mean(zscoreTruePLVMtx(SubjectList,:,:),2)); %now nsubj x nfreq
- STD_ZScoreTruePLV = std(ZScoreTruePLV_averageacrosschans(:,:)); %nfreqs
- SE_ZScoreTruePLV = STD_ZScoreTruePLV /sqrt(numel(SubjectList));
- NSubjects = numel(SubjectList);
- %---- Plots ------
- cd([CurrentDirectory 'FXS Project/infant pipeline/grand averages/z scored grand averages/'])
- %truncated
- freqvalindicesunder5Hz = find(freqvals <= 5);
- %this is the same plot as created in the above cell
- % figure; plot(freqvals(freqvalindicesunder5Hz), GrandAverageTruePLV_avacrosschans(freqvalindicesunder5Hz),'r');
- % hold on
- % %shadedErrorBar(freqvals(freqvalindicesunder5Hz),GrandAveragePLV_avacrosschans_Structured(freqvalindicesunder5Hz), SE_Structured(freqvalindicesunder5Hz), 'lineprops','r') %old syntax for shadedErrorBar
- % shadedErrorBar(freqvals(freqvalindicesunder5Hz),GrandAverageTruePLV_avacrosschans(freqvalindicesunder5Hz), SE_TruePLV(freqvalindicesunder5Hz), {'Color', 'r' }, 1);
- % hold on
- % plot(freqvals(freqvalindicesunder5Hz), GrandAverageSurrogatePLV_avacrosschans(freqvalindicesunder5Hz),'b');
- % hold on
- % shadedErrorBar(freqvals(freqvalindicesunder5Hz),GrandAverageSurrogatePLV_avacrosschans(freqvalindicesunder5Hz), SE_SurrogatePLV(freqvalindicesunder5Hz), {'Color', 'b' }, 1);
- % hold on
- % xline(1.111, '--')
- % hold on
- % xline(2.222, '--')
- % hold on
- % xline(3.333, '--')
- % legend('structured', 'SE', 'surrogate', 'SE')
- % pdfname = ['ITC True data versus Surrogate data, All Channels, n = ' num2str(NSubjects)];
- % %pdfname = ['ITC FFT Auditory ROI'];
- % print('-dpdf', pdfname); %save as postscript in order to merge two files
- % z score plot as sanity check
- %truncated
- %freqvalindicesunder5Hz = find(freqvals <= 5);
- figure; plot(freqvals(freqvalindicesunder5Hz), GrandAverageZscore_avacrosselectrodes(freqvalindicesunder5Hz),'r');
- hold on
- %shadedErrorBar(freqvals(freqvalindicesunder5Hz),GrandAveragePLV_avacrosschans_Structured(freqvalindicesunder5Hz), SE_Structured(freqvalindicesunder5Hz), 'lineprops','r') %old syntax for shadedErrorBar
- shadedErrorBar(freqvals(freqvalindicesunder5Hz),GrandAverageZscore_avacrosselectrodes(freqvalindicesunder5Hz), SE_ZScoreTruePLV(freqvalindicesunder5Hz), {'Color', 'r' }, 1);
- hold on
- xline(1.111, '--')
- hold on
- xline(2.222, '--')
- hold on
- xline(3.333, '--')
- yline(0, 'k-', 'LineWidth', 1)
- ylabel('ZITC')
- xlabel('Frequency (Hz)')
- legend('ZITC', 'SE')
- pdfname = ['Z scored ITC, All Channels, n = ' num2str(NSubjects)];
- print('-dpdf', pdfname); %save as postscript in order to merge two files
- % plot topographical distribution of z scores
- WordFreqScaleLimits = [-1 1]; %[-0.15 .15]; %so that 0 is centered on green.
- SyllableFreqScaleLimits = [-8 8];
- DifferenceEffectScaleLimits = [-0.05 0.05];
- figure;
- subplot(1,2,1)
- topoplot(GrandAverageZscore(:,WordFreq), locsfile, 'style', 'map', 'colormap', jet, 'maplimits', WordFreqScaleLimits, 'plotrad',.5,'headrad',.5,'shading','interp'); colorbar;
- title('ZITC, Word Frequency');
- subplot(1,2,2)
- topoplot(GrandAverageZscore(:,SyllableFreq), locsfile, 'style', 'map', 'colormap', jet, 'maplimits', SyllableFreqScaleLimits, 'plotrad',.5,'headrad',.5,'shading','interp'); colorbar;
- title('ZITC, Syllable Frequency');
- set(gcf,'PaperPositionMode','manual', 'PaperOrientation', 'landscape', 'PaperPosition', [0.05 0.15 12.0 8.50]) %corresponds to settings on Print Preview. %good measurements for not cutting off title.
- filename = ['ZITC Topographical Distributions, n = ' num2str(NSubjects)];
- print ('-dtiff', filename);
- print ('-dpdf', filename);
- %plot significaint electrodes that show significant entrainment at each frequency,
- %use a one-sample t-test against 0
- WordZITCByElectrodesandBySubject = zscoreTruePLVMtx(SubjectList, :, WordFreq);
- SyllableZITCByElectrodesandBySubject = zscoreTruePLVMtx(SubjectList, :, SyllableFreq);
- [SigWordElectrodesArray, PWord] = ttest(WordZITCByElectrodesandBySubject, 0, 'tail', 'right'); %one directional t-test, mean is greater than 0
- [SigSyllableElectrodesArray, PSyllable] = ttest(SyllableZITCByElectrodesandBySubject, 0, 'tail', 'right'); %one directional t-test, mean is greater than 0
- SigWordElectrodes = find(SigWordElectrodesArray ==1);
- SigSyllableElectrodes = find(SigSyllableElectrodesArray ==1);
- NumSigWordElectrodes = numel(SigWordElectrodes);
- NumSigSyllableElectrodes = numel(SigSyllableElectrodes);
- figure;
- subplot(1,2,1)
- topoplot(GrandAverageZscore(:,WordFreq), locsfile, 'style', 'map', 'colormap', jet, 'maplimits', WordFreqScaleLimits,'shading','interp', 'emarker2', {SigWordElectrodes ,'p','k', 7, 1} ); colorbar;
- title(['Significant Word ITC Electrodes: ' num2str(NumSigWordElectrodes)]);
- subplot(1,2,2)
- topoplot(GrandAverageZscore(:,SyllableFreq), locsfile, 'style', 'map', 'colormap', jet, 'maplimits', SyllableFreqScaleLimits,'shading','interp', 'emarker2', {SigSyllableElectrodes ,'p','k', 7, 1} ); colorbar;
- title(['Significant Syllable ITC Electrodes: ' num2str(NumSigSyllableElectrodes)]);
- set(gcf,'PaperPositionMode','manual', 'PaperOrientation', 'portrait', 'PaperPosition', [0.05 0.15 12.0 8.50]) %corresponds to settings on Print Preview. %good measurements for not cutting off title.
- filename = ['ZITC Topo, Sig Electrodes, n = ' num2str(NSubjects)];
- print ('-dtiff', filename);
- % extract individual level variables for statistical analysis
- ZScoreITCWordFreqMtx = zscoreTruePLVMtx(SubjectList,:, WordFreq); %nsubj X nchan
- ZScoreITCSyllableFreqMtx = zscoreTruePLVMtx(SubjectList,:, SyllableFreq);
- %ZScoreWLI = (ZScoreITCWordFreqMtx ./ ZScoreITCSyllableFreqMtx); %no longer sure whether the WLI is that informative considering we are now already normalizing by the surrogate shuffled data for each participant and electrode
- %variables based on channel configurations
- allchans= 1:104;
- ZScoreITCWordFreqMtx_allchans = mean(ZScoreITCWordFreqMtx(:,allchans),2);
- ZScoreITCSyllableFreqMtx_allchans = mean(ZScoreITCSyllableFreqMtx(:,allchans),2);
- %ZScoreWLI_allchans = mean(ZScoreWLI(:,allchans),2);
- SPSSToCompare = [ZScoreITCWordFreqMtx_allchans, ZScoreITCSyllableFreqMtx_allchans];
- CorrespondingSubjectIDs = SubjectIDList;
- %can build the array one group at a time
- %% GROUP COMPARISONS - COMPARING TWO GROUPS AT TIME - ZITC GRAND AVERAGE
- Group1Name = TDC;
- Group2Name = FXS;
- % -- GROUP 1 ---
- Group1SubjectList = [];
- %get subject list
- for x = 1:length(FFTfile_names)
- SubjectNumber = cell2mat(extractBetween(FFTfile_names{x}, 1, 4));
- if ismember(SubjectNumber, Group1Name)
- Group1SubjectList = [Group1SubjectList, x];
- end
- end
- % -- GROUP 2 ---
- Group2SubjectList = [];
- %get subject list
- for x = 1:length(FFTfile_names)
- SubjectNumber = cell2mat(extractBetween(FFTfile_names{x}, 1, 4));
- if ismember(SubjectNumber, Group2Name)
- Group2SubjectList = [Group2SubjectList, x];
- end
- end
- % -- GROUP 1 --
- clear PLVMtx Struct* Rand* Grand* PLV*
- Group1TruePLVMtx = [];
- Group1SurrogatePLVMtx = [];
- Group1zscoreTruePLVMtx = [];
- for i = Group1SubjectList
- clear EEGfrq* SurrogateDataFileName SurrogateDatasetsMtx zscoreTruePLV
- display(i)
- %load "true" data
- cd(FFTfile_location)
- load(FFTfile_names{i})
- disp(FFTfile_names{i})
- PLVTrue = EEGfrq.plv(plotchan,:); %only extracts relevant channels
- Group1TruePLVMtx(i,:,:) = PLVTrue; %rows without corresponding subjects (e.g., 20) just contains 0s. This is taken into account below by selecting SubjectsToInclude as a dimension.
- %load corresponding surrogate data
- cd(FFTsurrogatefile_location)
- SurrogateDataFileName = [char(extractBetween(FFTfile_names{i}, 1,4)) '_EEGfreq_ByIteration.mat'];
- load(SurrogateDataFileName)
- for iterationnum = 1:size(EEGfrq_ByIteration.iteration,2)
- SurrogateDatasetsMtx(iterationnum,:,:) = EEGfrq_ByIteration.iteration(iterationnum).plv(plotchan,:); %nchan x nfreqs for each surrogate dataset; ndataset x nchan x nfreq
- end
- % Z score the data according to the surrogate distribution
- % each subject serves as their own Z score distribution
- Mean_Surrogate = squeeze(mean(SurrogateDatasetsMtx,1)); %average across the 100 surrogate datasets for the subject
- STD_Surrogate = squeeze(std(SurrogateDatasetsMtx)); %std deviation
- %compute z score
- zscoreTruePLV = (PLVTrue - Mean_Surrogate) ./ STD_Surrogate;
- Group1SurrogatePLVMtx(i,:,:) = Mean_Surrogate; %stores the mean surrogate ITCs for each subject; nregion x nfreqs
- Group1zscoreTruePLVMtx(i,:,:) = zscoreTruePLV; %stores the z scored actual observed data for each subject, nregion x nfreqs
- end
- % -- GROUP 2 --
- clear PLVMtx Struct* Rand* Grand* PLV*
- Group2TruePLVMtx = [];
- Group2SurrogatePLVMtx = [];
- Group2zscoreTruePLVMtx = [];
- for i = Group2SubjectList
- clear EEGfrq* SurrogateDataFileName SurrogateDatasetsMtx zscoreTruePLV
- display(i)
- %load "true" data
- cd(FFTfile_location)
- load(FFTfile_names{i})
- disp(FFTfile_names{i})
- PLVTrue = EEGfrq.plv(plotchan,:); %only extracts relevant channels
- Group2TruePLVMtx(i,:,:) = PLVTrue; %rows without corresponding subjects (e.g., 20) just contains 0s. This is taken into account below by selecting SubjectsToInclude as a dimension.
- %load corresponding surrogate data
- cd(FFTsurrogatefile_location)
- SurrogateDataFileName = [char(extractBetween(FFTfile_names{i}, 1,4)) '_EEGfreq_ByIteration.mat'];
- load(SurrogateDataFileName)
- for iterationnum = 1:size(EEGfrq_ByIteration.iteration,2)
- SurrogateDatasetsMtx(iterationnum,:,:) = EEGfrq_ByIteration.iteration(iterationnum).plv(plotchan,:); %nchan x nfreqs for each surrogate dataset; ndataset x nchan x nfreq
- end
- % Z score the data according to the surrogate distribution
- % each subject serves as their own Z score distribution
- Mean_Surrogate = squeeze(mean(SurrogateDatasetsMtx,1)); %average across the 100 surrogate datasets for the subject
- STD_Surrogate = squeeze(std(SurrogateDatasetsMtx)); %std deviation
- %compute z score
- zscoreTruePLV = (PLVTrue - Mean_Surrogate) ./ STD_Surrogate;
- Group2SurrogatePLVMtx(i,:,:) = Mean_Surrogate; %stores the mean surrogate ITCs for each subject; nregion x nfreqs
- Group2zscoreTruePLVMtx(i,:,:) = zscoreTruePLV; %stores the z scored actual observed data for each subject, nregion x nfreqs
- end
- % -- to extract individual level variables --
- freqvals = EEGfrq.freqs; %freqs based on last subject loaded
- [~, WordFreq] = min(abs(freqvals-1.1111));
- [~, SyllableFreq] = min(abs(freqvals-3.3333)); %syllable freq = 3.33 Hz
- % - Group 1 -
- Group1GrandAverageTruePLV = squeeze(mean(Group1TruePLVMtx(Group1SubjectList,:,:),1));
- Group1GrandAverageTruePLV_avacrosschans = mean(Group1GrandAverageTruePLV(:,:),1);
- Group1GrandAverageSurrogatePLV = squeeze(mean(Group1SurrogatePLVMtx(Group1SubjectList,:,:),1));
- Group1GrandAverageSurrogatePLV_avacrosschans = mean(Group1GrandAverageSurrogatePLV(:,:),1);
- %Standard Error
- Group1TruePLV_averageacrosschans = squeeze(mean(Group1TruePLVMtx(Group1SubjectList,:,:),2)); %now nsubj x nfreq
- Group1STD_TruePLV = std(Group1TruePLV_averageacrosschans(:,:)); %nfreqs
- Group1SE_TruePLV = Group1STD_TruePLV /sqrt(numel(Group1SubjectList));
- Group1SurrogatePLV_averageacrosschans = squeeze(mean(Group1SurrogatePLVMtx(Group1SubjectList,:,:),2)); %now nsubj x nfreq
- Group1STD_SurrogatePLV = std(Group1SurrogatePLV_averageacrosschans(:,:)); %nfreqs
- Group1SE_SurrogatePLV = Group1STD_SurrogatePLV /sqrt(numel(Group1SubjectList));
- %Z scores
- Group1GrandAverageZscore = squeeze(mean(Group1zscoreTruePLVMtx(Group1SubjectList,:,:),1));
- Group1GrandAverageZscore_avacrosselectrodes = mean(Group1GrandAverageZscore,1);
- %standard error
- Group1ZScoreTruePLV_averageacrosschans = squeeze(mean(Group1zscoreTruePLVMtx(Group1SubjectList,:,:),2)); %now nsubj x nfreq
- Group1STD_ZScoreTruePLV = std(Group1ZScoreTruePLV_averageacrosschans(:,:)); %nfreqs
- Group1SE_ZScoreTruePLV = Group1STD_ZScoreTruePLV /sqrt(numel(Group1SubjectList));
- % - Group 2 -
- Group2GrandAverageTruePLV = squeeze(mean(Group2TruePLVMtx(Group2SubjectList,:,:),1));
- Group2GrandAverageTruePLV_avacrosschans = mean(Group2GrandAverageTruePLV(:,:),1);
- Group2GrandAverageSurrogatePLV = squeeze(mean(Group2SurrogatePLVMtx(Group2SubjectList,:,:),1));
- Group2GrandAverageSurrogatePLV_avacrosschans = mean(Group2GrandAverageSurrogatePLV(:,:),1);
- %Standard Error
- Group2TruePLV_averageacrosschans = squeeze(mean(Group2TruePLVMtx(Group2SubjectList,:,:),2)); %now nsubj x nfreq
- Group2STD_TruePLV = std(Group2TruePLV_averageacrosschans(:,:)); %nfreqs
- Group2SE_TruePLV = Group2STD_TruePLV /sqrt(numel(Group2SubjectList));
- Group2SurrogatePLV_averageacrosschans = squeeze(mean(Group2SurrogatePLVMtx(Group2SubjectList,:,:),2)); %now nsubj x nfreq
- Group2STD_SurrogatePLV = std(Group2SurrogatePLV_averageacrosschans(:,:)); %nfreqs
- Group2SE_SurrogatePLV = Group2STD_SurrogatePLV /sqrt(numel(Group2SubjectList));
- %Z scores
- Group2GrandAverageZscore = squeeze(mean(Group2zscoreTruePLVMtx(Group2SubjectList,:,:),1));
- Group2GrandAverageZscore_avacrosselectrodes = mean(Group2GrandAverageZscore,1);
- %standard error
- Group2ZScoreTruePLV_averageacrosschans = squeeze(mean(Group2zscoreTruePLVMtx(Group2SubjectList,:,:),2)); %now nsubj x nfreq
- Group2STD_ZScoreTruePLV = std(Group2ZScoreTruePLV_averageacrosschans(:,:)); %nfreqs
- Group2SE_ZScoreTruePLV = Group2STD_ZScoreTruePLV /sqrt(numel(Group2SubjectList));
- NSubjectsGroup1 = numel(Group1SubjectList);
- NSubjectsGroup2 = numel(Group2SubjectList);
- %---- Plots ------
- cd([CurrentDirectory 'FXS Project/infant pipeline/grand averages/z scored grand averages/'])
- %truncated
- %freqvalindicesunder5Hz = find(freqvals <= 5);
- freqvalindicesunder5Hz = find(freqvals <= 4);
- %z score plot
- figure; h1 = plot(freqvals(freqvalindicesunder5Hz), Group1GrandAverageZscore_avacrosselectrodes(freqvalindicesunder5Hz),'k', 'LineWidth', 2);
- hold on
- %shadedErrorBar(freqvals(freqvalindicesunder5Hz),GrandAveragePLV_avacrosschans_Structured(freqvalindicesunder5Hz), SE_Structured(freqvalindicesunder5Hz), 'lineprops','r') %old syntax for shadedErrorBar
- h = shadedErrorBar(freqvals(freqvalindicesunder5Hz),Group1GrandAverageZscore_avacrosselectrodes(freqvalindicesunder5Hz), Group1SE_ZScoreTruePLV(freqvalindicesunder5Hz), {'Color', 'k' }, 1);
- hold on
- h2 = plot(freqvals(freqvalindicesunder5Hz), Group2GrandAverageZscore_avacrosselectrodes(freqvalindicesunder5Hz),'r', 'LineWidth', 2);
- hold on
- h = shadedErrorBar(freqvals(freqvalindicesunder5Hz),Group2GrandAverageZscore_avacrosselectrodes(freqvalindicesunder5Hz), Group2SE_ZScoreTruePLV(freqvalindicesunder5Hz), {'Color', 'r' }, 1);
- hold on
- xline(1.111, '--')
- hold on
- xline(2.222, '--')
- hold on
- xline(3.333, '--')
- yline(0, 'k-', 'LineWidth', 1)
- ylabel('ZITC')
- xlabel('Frequency (Hz)')
- %legend([h1, h2], {'TDC', 'FXS'})
- set(gca, 'FontSize', 14);
- set(gcf,'PaperPositionMode','manual', 'PaperOrientation', 'portrait', 'PaperPosition', [0.5 0.5 8.0 10.50]) %corresponds to settings on Print Preview. %good measurements for not cutting off title.
- figurename = ['Z scored ITC, Two Group Comparison, All Channels, No Legend, nGroup1 = ' num2str(NSubjectsGroup1), ' nGroup2 = ' num2str(NSubjectsGroup2) ];
- exportgraphics(gcf, [figurename '.pdf'], 'ContentType','vector'); %this should import as a vector now
- %print('-dpdf', figurename); %save as postscript in order to merge two files
- %print('-dtiff', figurename); %save as postscript in order to merge two files
- % plot topographical distribution of z scores
- WordFreqScaleLimits = [-1 1]; %[-0.15 .15]; %so that 0 is centered on green.
- SyllableFreqScaleLimits = [-8 8];
- DifferenceEffectScaleLimits = [-0.05 0.05];
- figure;
- subplot(2,2,1)
- topoplot(Group1GrandAverageZscore(:,WordFreq), locsfile, 'style', 'map', 'colormap', jet, 'maplimits', WordFreqScaleLimits, 'plotrad',.5,'headrad',.5,'shading','interp'); colorbar;
- %title('TDC Word Frequency');
- subplot(2,2,2)
- topoplot(Group1GrandAverageZscore(:,SyllableFreq), locsfile, 'style', 'map', 'colormap', jet, 'maplimits', SyllableFreqScaleLimits, 'plotrad',.5,'headrad',.5,'shading','interp'); colorbar;
- %title('TDC Syllable Frequency');
- subplot(2,2,3)
- topoplot(Group2GrandAverageZscore(:,WordFreq), locsfile, 'style', 'map', 'colormap', jet, 'maplimits', WordFreqScaleLimits, 'plotrad',.5,'headrad',.5,'shading','interp'); colorbar;
- %title('FXS Word Frequency');
- subplot(2,2,4)
- topoplot(Group2GrandAverageZscore(:,SyllableFreq), locsfile, 'style', 'map', 'colormap', jet, 'maplimits', SyllableFreqScaleLimits, 'plotrad',.5,'headrad',.5,'shading','interp'); colorbar;
- %title('FXS Syllable Frequency');
- set(gcf,'PaperPositionMode','manual', 'PaperOrientation', 'landscape', 'PaperPosition', [0.05 0.15 12.0 8.50]) %corresponds to settings on Print Preview. %good measurements for not cutting off title.
- filename = ['ZITC Group Comparison Topographical Distributions, no titles, nGroup1 = ' num2str(NSubjectsGroup1), ' nGroup2 = ' num2str(NSubjectsGroup2)];
- exportgraphics(gcf, filename + ".pdf", 'ContentType','vector');
- %print ('-dtiff', filename);
- %print ('-dpdf', filename);
- %% JACKKNIFE PROCEDURE TO ESTIMATE ITPC RELIABILITY
- %load the same FFT parameters as above. (LOAD PARAMETERS cell)
- ParticipantLevelData = [];
- PseudovalsByParticipantByEpoch = []; %timecourse data
- subjectcounter = 0;
- for subji = AllSubjectIndices %length(datafile_names)
- SubjectName = datafile_names{subji}(1:4); %string
- SubjectNumber = str2double(SubjectName); %number
- disp(subji)
- disp(SubjectName)
- subjectcounter = subjectcounter + 1;
- %figure out GroupID
- clear GroupID
- if any(strcmp(SubjectName, TDC))
- GroupID = 1;
- elseif any(strcmp(SubjectName, FXS))
- GroupID = 2;
- elseif any(strcmp(SubjectName, ASD))
- GroupID = 3;
- else
- GroupID = 0; %unclassified, but at least it won't disrupt the loop
- end
- %load dataset
- clear EEGfrq
- STUDY = []; CURRENTSTUDY = 0; ALLEEG = []; EEG=[]; CURRENTSET=[];
- EEG = pop_loadset( 'filename', [SubjectName '_epoched.set'], 'filepath', [CurrentDirectory 'FXS project/infant pipeline/epochs/']);
- [ALLEEG, EEG, CURRENTSET] = eeg_store( ALLEEG, EEG );
- ParentEEG = EEG;
- NumTrials = EEG.trials;
- FullTrialArray = 1:NumTrials;
- NumberofChannels = size(EEG.chanlocs,2);
- % ------
- %create temporarily subdivided datasets and run the function on each dataset
- %first create the big frq structure
- EEGfrq = frqa_plvpwr(EEG, 'foutput',foutput,'fband',fband,'binsSNR',binsSNR,...
- 'typeSNRPWR',typeSNRPWR,'typeSNRPLV',typeSNRPLV,...
- 'zscorePWR',zscorePWR,'zscorePLV',zscorePLV);
- freqvals = EEGfrq.freqs; %freqs based on last subject loaded
- [~, WordFreq] = min(abs(freqvals-1.1111));
- [~, SyllableFreq] = min(abs(freqvals-3.3333)); %syllable freq = 3.33 Hz
- %for normalization, extract neighbouring bins excluding the word,
- %harmonics, and syllable frequencies.
- [~, Harmonic1Freq] = min(abs(freqvals-2.22222)); %syllable freq = 3.33 Hz
- [~, Harmonic2Freq] = min(abs(freqvals-4.44444)); %syllable freq = 3.33 Hz
- NormalizationFreqBins = setdiff(find(freqvals <= 5), [WordFreq, SyllableFreq, Harmonic1Freq, Harmonic2Freq]);
- %compute ITC
- AllTrialsWordITC = EEGfrq.plv(:,WordFreq);
- AllTrialsSyllableITC = EEGfrq.plv(:,SyllableFreq);
- AllTrialsNormalizedBinsITC = squeeze(mean(EEGfrq.plv(:, NormalizationFreqBins ),2));
- AllTrialsWordITCNormalized = AllTrialsWordITC - AllTrialsNormalizedBinsITC;
- AllTrialsSyllableITCNormalized = AllTrialsSyllableITC - AllTrialsNormalizedBinsITC;
- EEGfrq_jackknifed.replication(1:NumTrials) = EEGfrq; %preallocate - delete extra rows later - in order to have a bigger structure with the same structure
- WordITCJackknifed_ByReplication= [];
- SyllableITCJackknifed_ByReplication = [];
- WordITCNormalizedJackknifed_ByReplication = [];
- SyllableITCNormalizedJackknifed_ByReplication = [];
- for replication = 1:NumTrials
- disp(['Replication Number :' num2str(replication)])
- %compute what ITC would be without that trial
- TrialArrayLessOneTrial = setdiff(FullTrialArray, replication); %removes N trial
- EEGLessOneTrial = pop_select( ParentEEG, 'trial', TrialArrayLessOneTrial);
- %run command on subsampled trials
- EEGfrqLessOneTrial = frqa_plvpwr(EEGLessOneTrial, 'foutput',foutput,'fband',fband,'binsSNR',binsSNR,...
- 'typeSNRPWR',typeSNRPWR,'typeSNRPLV',typeSNRPLV,...
- 'zscorePWR',zscorePWR,'zscorePLV',zscorePLV);
- EEGfrq_jackknifed.replication(replication) = EEGfrqLessOneTrial;
- %compute individual actual and normalized ITC values to store for analysis
- WordITCJackknifed = EEGfrqLessOneTrial.plv(:,WordFreq);
- SyllableITCJackknifed = EEGfrqLessOneTrial.plv(:,SyllableFreq);
- OtherFreqsITCJackknifed = squeeze(mean(EEGfrqLessOneTrial.plv(:, NormalizationFreqBins ),2));
- WordITCNormalizedJackknifed = WordITCJackknifed - OtherFreqsITCJackknifed;
- SyllableITCNormalizedJackknifed = SyllableITCJackknifed - OtherFreqsITCJackknifed;
- %store
- WordITCJackknifed_ByReplication(replication,:) = WordITCJackknifed; %Nreplications x NElectrodes
- SyllableITCJackknifed_ByReplication(replication,:) = SyllableITCJackknifed; %Nreplications x NElectrodes
- WordITCNormalizedJackknifed_ByReplication(replication,:) = WordITCNormalizedJackknifed; %Nreplications x NElectrodes
- SyllableITCNormalizedJackknifed_ByReplication(replication,:) = SyllableITCNormalizedJackknifed; %Nreplications x NElectrodes
- clear EEGfrqLessOneTrial
- end
- %save the participant's EEG freq matrix
- cd([CurrentDirectory 'FXS Project/infant pipeline/jackknifed FFT files/'])
- disp(SubjectNumber)
- %filename = strcat(num2str(SubjectNumber), '_EEGfrq_jackknifed');
- filename = [SubjectName '_EEGfrq_jackknifed'];
- save(filename, 'EEGfrq_jackknifed');
- %average steps to save in participant matrix
- %average across channels
- WordITCJackknifed_ByReplication_meanacrosschans = mean(WordITCJackknifed_ByReplication,2);
- SyllableITCJackknifed_ByReplication_meanacrosschans = mean(SyllableITCJackknifed_ByReplication,2);
- WordITCNormalizedJackknifed_ByReplication_meanacrosschans = mean(WordITCNormalizedJackknifed_ByReplication,2);
- SyllableITCNormalizedJackknifed_ByReplication_meanacrosschans = mean(SyllableITCNormalizedJackknifed_ByReplication,2);
- %average across replications
- MeanWordITCJackknifed_ByReplication_meanacrosschans = mean(WordITCJackknifed_ByReplication_meanacrosschans);
- MeanSyllableITCJackknifed_ByReplication_meanacrosschans = mean(SyllableITCJackknifed_ByReplication_meanacrosschans);
- MeanWordITCNormJackknifed_ByReplication_meanacrosschans = mean( WordITCNormalizedJackknifed_ByReplication_meanacrosschans);
- MeanSyllableITCNormJackknifed_ByReplication_meanacrosschans = mean(SyllableITCNormalizedJackknifed_ByReplication_meanacrosschans);
- %original ITC values as computed across all trials (from above), average across channels
- AllTrialsWordITC_meanacrosschans = mean(AllTrialsWordITC,1);
- AllTrialsSyllableITC_meanacrosschans = mean(AllTrialsSyllableITC,1);
- AllTrialsWordITCNormalized_meanacrosschans = mean(AllTrialsWordITCNormalized,1);
- AllTrialsSyllableITCNormalized_meanacrosschans = mean(AllTrialsSyllableITCNormalized,1);
- %jackknife pseudovals - a pseudo-value is calculated as the difference
- %between the whole sample estimate and the partial estimate. This tells
- %you whether each individual trial contributes to lowering or increasing the ITC and by how much. Perfectly inversely correlated with jackknifed
- %ITC values (rest of the sample ITC). So a higher pseudoval would
- %indicate that the contribution of that specific trial INCREASES the
- %overall ITC (such that when that trial is removed, the remaining trial
- %ITC is lower). Formula from https://www.mattcraddock.com/blog/2020/09/07/jackknife-intertrial-coherence-and-phase/
- WordITCPseudovals_ByReplication_meanacrosschans = NumTrials*AllTrialsWordITC_meanacrosschans - ((NumTrials-1) *WordITCJackknifed_ByReplication_meanacrosschans); %Ntrial
- SyllableITCPseudovals_ByReplication_meanacrosschans = NumTrials*AllTrialsSyllableITC_meanacrosschans - ((NumTrials-1) *SyllableITCJackknifed_ByReplication_meanacrosschans);
- WordITCNormalizedPseudovals_ByReplication_meanacrosschans = NumTrials*AllTrialsWordITCNormalized_meanacrosschans - ((NumTrials-1) *WordITCNormalizedJackknifed_ByReplication_meanacrosschans); %Ntrial
- SyllableITCNormalizedPseudovals_ByReplication_meanacrosschans = NumTrials*AllTrialsSyllableITCNormalized_meanacrosschans - ((NumTrials-1) *SyllableITCNormalizedJackknifed_ByReplication_meanacrosschans);
- %exact values to store in participant level matrices
- %mean of pseudovalues can be viewed as a bias reduced version of the original statistic
- MeanWordITCPseudovals_ByReplication_meanacrosschans = mean(WordITCPseudovals_ByReplication_meanacrosschans);
- MeanSyllableITCPseudovals_ByReplication_meanacrosschans = mean(SyllableITCPseudovals_ByReplication_meanacrosschans);
- MeanWordITCNormalPseudovals_ByReplication_meanacrosschans = mean(WordITCNormalizedPseudovals_ByReplication_meanacrosschans);
- MeanSyllableITCNormalPseudovals_ByReplication_meanacrosschans = mean(SyllableITCNormalizedPseudovals_ByReplication_meanacrosschans);
- %standard deviation of pseudovalues
- StDevWordITCPseudovals_ByReplication_meanacrosschans = std(WordITCPseudovals_ByReplication_meanacrosschans);
- StDevSyllableITPseudovals_ByReplication_meanacrosschans = std(SyllableITCPseudovals_ByReplication_meanacrosschans);
- StDevWordITCNormalPseudovals_ByReplication_meanacrosschans = std(WordITCNormalizedPseudovals_ByReplication_meanacrosschans);
- StDevSyllableITCNormalPseudovals_ByReplication_meanacrosschans = std(SyllableITCNormalizedPseudovals_ByReplication_meanacrosschans);
- %take the highest 5 and 10 pseudovalues:
- %5
- Max5WordITCPseudovals_ByReplication_meanacrosschans = mean(maxk(WordITCPseudovals_ByReplication_meanacrosschans, 5));
- Max5SyllableITPseudovals_ByReplication_meanacrosschans = mean(maxk(SyllableITCPseudovals_ByReplication_meanacrosschans, 5));
- Max5WordITCNormalPseudovals_ByReplication_meanacrosschans = mean(maxk(WordITCNormalizedPseudovals_ByReplication_meanacrosschans, 5));
- Max5SyllableITCNormalPseudovals_ByReplication_meanacrosschans = mean(maxk(SyllableITCNormalizedPseudovals_ByReplication_meanacrosschans, 5));
- %10th
- Max10WordITCPseudovals_ByReplication_meanacrosschans = mean(maxk(WordITCPseudovals_ByReplication_meanacrosschans, 10));
- Max10SyllableITPseudovals_ByReplication_meanacrosschans = mean(maxk(SyllableITCPseudovals_ByReplication_meanacrosschans, 10));
- Max10WordITCNormalPseudovals_ByReplication_meanacrosschans = mean(maxk(WordITCNormalizedPseudovals_ByReplication_meanacrosschans, 10));
- Max10SyllableITCNormalPseudovals_ByReplication_meanacrosschans = mean(maxk(SyllableITCNormalizedPseudovals_ByReplication_meanacrosschans, 10));
- %Trial indices associated with >0 Positive Pseudovalues
- %positive pseudovalues means that the trial was contributing positively to the overall
- %ITC estimate; in other words, when that trial is removed, ITC across
- %the remaining trials DECREASES.
- %A negative pseudovalue means that the trial was disrupting or reducing
- %phase coherence potentially due to noise, phase jitter, or phase-locking at a different angle. In other words, removing that trial INCREASES ITPC
- %this could give insight to the temporal trajecotry of participants' learning.
- PositiveContributingTrialsToWordITC= find(WordITCPseudovals_ByReplication_meanacrosschans >0);
- PositiveContributingTrialsToSyllableITC = find(SyllableITCPseudovals_ByReplication_meanacrosschans >0);
- PositiveContributingTrialsToWordITCNormalized= find(WordITCNormalizedPseudovals_ByReplication_meanacrosschans >0);
- PositiveContributingTrialsToSyllableITCNormalized= find(SyllableITCNormalizedPseudovals_ByReplication_meanacrosschans >0);
- %summarize the total number of positive contributing trials - perhaps
- %this is a proxy of participants' overall time spent parsing or
- %processing the word structures
- NumberPositiveContributingTrialsToWordITC = numel(PositiveContributingTrialsToWordITC);
- NumberPositiveContributingTrialsToSyllableITC = numel(PositiveContributingTrialsToSyllableITC);
- NumberPositiveContributingTrialsToWordITCNormalized = numel(PositiveContributingTrialsToWordITCNormalized);
- NumberPositiveContributingTrialsToSyllableITCNormalized = numel(PositiveContributingTrialsToSyllableITCNormalized);
- ParticipantLevelData(subjectcounter,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:,:) = [SubjectNumber, GroupID, AllTrialsWordITC_meanacrosschans, AllTrialsSyllableITC_meanacrosschans, ...
- AllTrialsWordITCNormalized_meanacrosschans, AllTrialsSyllableITCNormalized_meanacrosschans, MeanWordITCPseudovals_ByReplication_meanacrosschans, MeanSyllableITCPseudovals_ByReplication_meanacrosschans , ...
- MeanWordITCNormalPseudovals_ByReplication_meanacrosschans, MeanSyllableITCNormalPseudovals_ByReplication_meanacrosschans, ...
- Max5WordITCPseudovals_ByReplication_meanacrosschans, Max5SyllableITPseudovals_ByReplication_meanacrosschans, ...
- Max5WordITCNormalPseudovals_ByReplication_meanacrosschans, Max5SyllableITCNormalPseudovals_ByReplication_meanacrosschans, Max10WordITCPseudovals_ByReplication_meanacrosschans, Max10SyllableITPseudovals_ByReplication_meanacrosschans, ...
- Max10WordITCNormalPseudovals_ByReplication_meanacrosschans, Max10SyllableITCNormalPseudovals_ByReplication_meanacrosschans, ...
- NumberPositiveContributingTrialsToWordITC, NumberPositiveContributingTrialsToSyllableITC, NumberPositiveContributingTrialsToWordITCNormalized, ...
- NumberPositiveContributingTrialsToSyllableITCNormalized];
- %now we will save the pseudovals to enable time course analysis:
- TrialArrayToUse = [1:NumTrials]';
- PseudovalArrays = [WordITCPseudovals_ByReplication_meanacrosschans, SyllableITCPseudovals_ByReplication_meanacrosschans, ...
- WordITCNormalizedPseudovals_ByReplication_meanacrosschans, SyllableITCNormalizedPseudovals_ByReplication_meanacrosschans];
- SubjectIDRepArray = repmat(SubjectNumber, size(TrialArrayToUse));
- GroupIDRepArray = repmat(GroupID, size(TrialArrayToUse));
- CurrentSubjectData = [SubjectIDRepArray, GroupIDRepArray, TrialArrayToUse, PseudovalArrays];
- PseudovalsByParticipantByEpoch = vertcat( PseudovalsByParticipantByEpoch , CurrentSubjectData);
- end
- cd([CurrentDirectory 'FXS Project/infant pipeline/jackknifed FFT files/summary tables']) %so that files go in proper place
- %after all participants have run, create and save as a table
- %save as table
- ColumnNames = {'Subject', 'Group', 'AllTrialsWordITC', 'AllTrialsSyllableITC', 'AllTrialsWordITCNormalized', 'AllTrialsSyllableITCNormalized', ...
- 'MeanWordITCPseudovals', 'MeanSyllableITCPseudovals', 'MeanWordITCNormalPseudovals_ByReplication_meanacrosschans', 'MeanSyllableITCNormalPseudovals_ByReplication_meanacrosschans', ...
- 'Max5WordITCPseudovals', 'Max5SyllableITPseudovals', 'Max5WordITCNormPseudovals', 'Max5SyllableITCNormPseudovals', 'Max10WordITCPseudovals', 'Max10SyllableITPseudovals', ...
- 'Max10WordITCNormalPseudovals', 'Max10SyllableITCNormalPseudovals', 'NumberPosContributingTrialsToWordITC', 'NumberPosContributingTrialsToSyllableITC', ...
- 'NumberPosContributingTrialsToWordITCNorm' 'NumberPosContributingTrialsToSyllableITCNorm'};
- ParticipantDataTableForAnalysis = array2table(ParticipantLevelData(1:end,:), 'VariableNames', ColumnNames);
- writetable(ParticipantDataTableForAnalysis,'ParticipantDataTableForAnalysis.csv')
- %Table 2 - timecourse data
- ColumnNames2 = {'Subject', 'Group', 'EpochNum', 'WordITCPseudoval', 'SyllableITCPseudoval', 'WordITCNormPseudoval', 'SyllableITCNormPseudoval'};
- PseudovalTimecourseTableForAnalysis = array2table(PseudovalsByParticipantByEpoch, 'VariableNames', ColumnNames2);
- writetable(PseudovalTimecourseTableForAnalysis,'PseudovalTimecourseTableForAnalysis.csv')
MainITCScript.m, under CC-BY-4.0 · at the source
Overview
- Department of Psychology; Western Centre for Brain and Mind, Western Institute for Neuroscience, University of Western Ontario, London, Ontario, Canada
- Division of Child and Adolescent Psychiatry, Cincinnati Children's Hospital Medical Center, Cincinnati, Ohio, USA
- Department of Psychiatry, University of Cincinnati College of Medicine, Cincinnati, Ohio, USA
- Department of Pediatrics, Section on Developmental and Behavioral Pediatrics, University of Oklahoma Health Sciences Center, Oklahoma City, Oklahoma, USA
- Department of Psychology, University of Oklahoma, Norman, Oklahoma, USA
- Division of Behavioral Medicine and Clinical Psychology, Cincinnati Children's Hospital Medical Center, Cincinnati, Ohio, USA
- School of Information Technology, University of Cincinnati, Ohio, USA
- Neuroscience Graduate Program, University of California, Riverside, Riverside, California, USA
- Department of Psychology, University of California, Riverside, Riverside, California, USA
- Division of Neurology, Cincinnati Children's Hospital Medical Center, Cincinnati, Ohio, USA
- Department of Pediatrics, University of Cincinnati College of Medicine, Cincinnati, Ohio, USA
Abstract
The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.
Repository
Its files are read in the Code ↔ Paper reader above, with 5 matches between paragraphs and lines of code.
Zenodo 18746668
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
- 27 September 2026: the link answers (HTTP 200)
5 files
- statistical_learning_ana
lysis_scripts.zip/ , MATLAB, 1,661 lines, 5 matchesMainITCScript.m - statistical_learning_ana
lysis_scripts.zip/ , MATLAB, 313 linesfrqa_norm.m - statistical_learning_ana
lysis_scripts.zip/ , MATLAB, 192 linesfrqa_plvpwr.m - statistical_learning_ana
lysis_scripts.zip/ , MATLAB, 192 linesfrqa_plvpwr_nanmedian.m - statistical_learning_ana
lysis_scripts.zip/ , MATLAB, 275 linesfrqa_powernorm.m
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 5 scripts, each with its path and the digest of its content;
- 5 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
Datasets cited
- zenodo:17435554, at Zenodo; found in “Data Availability Statement”
Code and data availability statement
The paper has a code and data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- it points to a dataset: Zenodo 17435554
- it points to the authors' code: Zenodo 18746668
Read it in the paper: doi.org/10.1002/aur.70312.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 2, 28 September 2026
- Publisher: n/a → Wiley
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 14 authors, 7 keywords, 13 MeSH terms, 2 funders, 104 references.
Cite
This paper
Batterink, L. J., Liu, Y., Westerkamp, G., Citarella, J., Siekierski, P., Voorhees, L., Ethridge, L. E., Smith, E., Elmaghraby, R., Erickson, C. A., ElSayed, Z., Goel, A., Wu, S. W., & Pedapati, E. V. (2026). Aberrant Neural Entrainment to Word-Level Speech Patterns in Fragile X Syndrome: Evidence for a Statistical Learning Deficit. Autism research : official journal of the International Society for Autism Research, 19(8), e70312. https://
BibTeX
@article{batterink2026ab
author = {Batterink, Laura J and Liu, Yanchen and Westerkamp, Grace and Citarella, Jae and Siekierski, Peyton and Voorhees, Lynxie and Ethridge, Lauren E and Smith, Elizabeth and Elmaghraby, Rana and Erickson, Craig A and ElSayed, Zag and Goel, Anubhuti and Wu, Steve W and Pedapati, Ernest V},
title = {{Aberrant Neural Entrainment to Word-Level Speech Patterns in Fragile X Syndrome: Evidence for a Statistical Learning Deficit}},
journal = {Autism research : official journal of the International Society for Autism Research},
year = {2026},
month = jul,
volume = {19},
number = {8},
pages = {e70312},
publisher = {Wiley},
issn = {1939-3792},
doi = {10.1002/
url = {https://
pmid = {42437723},
pmcid = {PMC13472007}
}
RIS
TY - JOUR
AU - Batterink, Laura J
AU - Liu, Yanchen
AU - Westerkamp, Grace
AU - Citarella, Jae
AU - Siekierski, Peyton
AU - Voorhees, Lynxie
AU - Ethridge, Lauren E
AU - Smith, Elizabeth
AU - Elmaghraby, Rana
AU - Erickson, Craig A
AU - ElSayed, Zag
AU - Goel, Anubhuti
AU - Wu, Steve W
AU - Pedapati, Ernest V
TI - Aberrant Neural Entrainment to Word-Level Speech Patterns in Fragile X Syndrome: Evidence for a Statistical Learning Deficit
T2 - Autism research : official journal of the International Society for Autism Research
J2 - Autism Res
PY - 2026
DA - 2026/
VL - 19
IS - 8
SP - e70312
SN - 1939-3792
PB - Wiley
DO - 10.1002/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1002/
"type": "article-journal",
"title": "Aberrant Neural Entrainment to Word-Level Speech Patterns in Fragile X Syndrome: Evidence for a Statistical Learning Deficit",
"container-title": "Autism research : official journal of the International Society for Autism Research",
"author": [
{
"family": "Batterink",
"given": "Laura J"
},
{
"family": "Liu",
"given": "Yanchen"
},
{
"family": "Westerkamp",
"given": "Grace"
},
{
"family": "Citarella",
"given": "Jae"
},
{
"family": "Siekierski",
"given": "Peyton"
},
{
"family": "Voorhees",
"given": "Lynxie"
},
{
"family": "Ethridge",
"given": "Lauren E"
},
{
"family": "Smith",
"given": "Elizabeth"
},
{
"family": "Elmaghraby",
"given": "Rana"
},
{
"family": "Erickson",
"given": "Craig A"
},
{
"family": "ElSayed",
"given": "Zag"
},
{
"family": "Goel",
"given": "Anubhuti"
},
{
"family": "Wu",
"given": "Steve W"
},
{
"family": "Pedapati",
"given": "Ernest V"
}
],
"container-title-short":
"volume": "19",
"issue": "8",
"page": "e70312",
"DOI": "10.1002/
"PMID": "42437723",
"PMCID": "PMC13472007",
"ISSN": "1939-3792",
"publisher": "Wiley",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
12
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1016/j.isci.2026.116458 [code]
- Neural tracking of prosodic and statistical rhythms jointly supports artificial language learning.Journal: iScienceIn common: Statistics and Machine Learning Toolbox, cognitive, 13 references
- [2] doi:10.7554/elife.109901
- Infants at high and low likelihood for autism show different EEG developmental trajectories in speech tracking and statistical learning.Journal: eLifeIn common: autism, EEG, 12 references
- [3] doi:10.1162/opmi.a.358 [code]
- Tracking Visual Statistical Learning with Steady-State Visual Evoked Potentials: Effects of Exemplar and Category Information.Journal: Open mind : discoveries in cognitive scienceIn common: EEG, cognitive, 11 references
- [4] doi:10.1111/desc.70116 [code]
- Words and Meters: Neural Evidence for a Connection Between Individual Differences in Statistical Learning and Rhythmic Ability in Infancy.Journal: Developmental scienceIn common: EEG, 10 references
- [5] doi:10.1162/imag.a.1161
- The infant brain rapidly entrains to visual statistical regularities during stimulus exposure.Journal: Imaging neuroscience (Cambridge, Mass.)In common: EEG, 10 references
- [6] doi:10.1016/j.dcn.2026.101767
- Neural correlates of learning speed reveal developmental differences in memory.Journal: Developmental cognitive neuroscienceIn common: 8 references
- [7] doi:10.1016/j.celrep.2026.117590 [code]
- Impaired behavioral inhibition in Fmr1 KO mice is linked to disrupted visual cortex theta oscillations.Journal: Cell reportsIn common: Statistics and Machine Learning Toolbox, autism, EEG, other condition, 5 references
- [8] doi:10.1111/cogs.70220 [code]
- Shared Neural Computations for Syntactic and Morphological Structures: Evidence From Mandarin Chinese.Journal: Cognitive scienceIn common: ERPLAB, EEGLAB, Statistics and Machine Learning Toolbox, EEG, cognitive, 1 reference
- [9] doi:10.1038/s41467-026-73878-4 [code]
- Neural Response to Familiar Names Predicts Outcome of Comatose ICU Patients: A Prospective Observational Cohort Study.Journal: Nature communicationsIn common: ERPLAB, EEGLAB, Statistics and Machine Learning Toolbox, EEG, other condition, 1 reference
- [10] doi:10.64898/2026.03.12.710517 [code]
- Cortical excitability inversely modulates fMRI connectivity via low-frequency neuronal couplingJournal: bioRxiv (preprint)In common: ERPLAB, shadedErrorBar, EEGLAB, 1 other tool
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 5 scripts, and 5 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:add2293cc272c1fc…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[.
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
