Resting-State Theta and Alpha Oscillations in Amputation and Phantom Limb Pain: A Pre-Registered High-Density EEG Study.
The 11 matches · 3 of them tie a paragraph to a whole file, not to given lines: weak matches, whose lines are not tinted
- [1] § Methods › Data Preprocessing ↔ preprocessing.m, lines 115–158 · score 0.70 · CleanLine, ZapLine Plus, noise, Preprocessing
- [2] § Methods › Data Analysis and Statistical Comparisons › RQ1 – Theta Power ↔ main_analysis.m, lines 188–268 · score 0.60 · log transformed, theta band, frequency band, Sex, Age, PLP
- [3] § Results › Research Question 2: Peak Alpha Frequency (PAF) ↔ main_analysis.m, lines 71–177 · score 0.58 · linear model, right tailed, AmpNoPLP, AmpPLP, unadjusted, bootstrapped
- [4] § Methods › Data Analysis and Statistical Comparisons › RQ1 – Theta Power ↔ exploratory_analysis.m, lines 1–19 · score 0.56 · DISCOVER EEG, FieldTrip toolbox
- [5] § Methods › Data Analysis and Statistical Comparisons › RQ1 – Theta Power ↔ main_analysis.m, lines 1–19 · score 0.56 · DISCOVER EEG, FieldTrip toolbox
- [6] § Results › Research Question 1: Theta Power ↔ Supporting functions/RunModelDiagnostics.m, the whole file · a weak match · score 0.54 · Model diagnostics, random intercepts, marginal, R2, PLP
- [7] § Results › Research Question 2: Peak Alpha Frequency (PAF) ↔ Supporting functions/RunModelDiagnostics.m, the whole file · a weak match · score 0.54 · Model diagnostics, random intercepts, marginal, R2, PLP
- [8] § Methods › Data Preprocessing ↔ preprocessing.m, lines 285–347 · score 0.53 · discontinuities, rejected, overlap, epochs, segments, preprocessed
- [9] § Methods › Data Analysis and Statistical Comparisons › Exploratory Analyses ↔ exploratory_analysis.m, lines 64–100 · score 0.53 · 1–100 Hz, alpha band, spectrum, CBPT, Exploratory, power
- [10] § Results › Research Question 1: Theta Power ↔ main_analysis.m, lines 71–177 · score 0.51 · right tailed, AmpNoPLP, AmpPLP, theta power, raincloud, linear
- [11] § Results › Research Question 2: Peak Alpha Frequency (PAF) ↔ Supporting functions/GetStats.m, the whole file · a weak match · score 0.50 · bootstrapped CIs, coefficients, AmpNoPLP, AmpPLP, mixed, Sex
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 · 588 lines · 19 KB · CC-BY-4.0 · 4 matches
- %% Comparison of EEG features AmpPLP, AmpNoPLP and IC
- clear;
- % Packages, toolboxes and supporting functions
- restoredefaultpath
- addpath('./Supporting functions/')
- % Required supporting packages:
- % discover-eeg-master
- % eeglab2025.0.0 (or later, then adjust eeglab_path and params.json)
- % Fieldtrip toolbox
- % BCT/2019_03_03_BCT (or later, then just then adjust params.json)
- discover_path = './Supporting functions/discover-eeg-master/';
- eeglab_path = './Supporting functions/eeglab2025.0.0/';
- ft_path = './Supporting functions/FieldTrip Toolbox/';
- addpath(genpath(discover_path))
- addpath(eeglab_path)
- addpath(ft_path)
- ft_defaults % initiate Fieldtrip
- %%
- % Path to params.json file
- params_path = 'params.json';
- params = define_params(params_path);
- % Path to STUDY file
- study_path = params.PreprocessedDataPath;
- STUDY = pop_loadstudy('filename', 'Investigating Neuro-Ocillatory Correlates of Phantom Limb Pain with Resting State High-Density EEG-clean.study', 'filepath', study_path);
- % Destination of figures and results
- figures_path = append(study_path, '/analysis/figures');
- results_path = append(study_path, '/analysis/results');
- if ~isdir(figures_path)
- mkdir(figures_path)
- end
- if ~isdir(results_path)
- mkdir(results_path)
- end
- % Colors for plotting
- colors = lines(4);
- cAmpPLP = colors(3,:);
- cAmpNoPLP = colors(1,:);
- cIC = colors(2,:);
- cPooled = colors(4,:);
- % Regression formulas
- lmFormula = ' ~ Amp + Pain + Age + Sex';
- lmeFormula = ' ~ Amp + Pain + Age + Sex + (1|Subject)';
- %% Analysis settings
- % Whether to randomize subjects (for blinding while preparing the data analysis)
- randomizeSubjects = false;
- % Task = {'EYESOPEN', 'EYESCLOSED'}
- task = 'EYESCLOSED';
- % Number of bootstraps
- nBoot = 5000;
- %% Get features for each recording
- % Average feature over repeated measures
- avgFeature = false;
- % {'APF', 'Power', 'Connectivity', 'Graph'}
- features = {'Power', 'APF'};
- bidsIDToSkip = {};
- features_tbl = GetStudyFeatures(STUDY, task, randomizeSubjects,...
- features, avgFeature, bidsIDToSkip);
- %% Theta power
- % Compute average theta power across channels and theta band frequencies
- allPow = features_tbl.Power;
- cfg.channel = 'all';
- cfg.parameter = 'powspctrm';
- cfg.foilim = params.FreqBand.theta;
- cfg.keepindividual = 'yes'; % here individual = trial
- grandavg = ft_freqgrandaverage(cfg,allPow{:}); % extract the theta band
- avgThetaPow = squeeze(mean(mean(grandavg.powspctrm,3),2)); % avg across channels and freqs
- % Create new table with log(AvgThetaPow) as variable
- tbl = features_tbl;
- tbl.Max = []; tbl.Cog = []; tbl.Power = []; % remove redundant rows
- for i = 1:height(tbl)
- tbl.AvgThetaPow(i) = log(avgThetaPow(i));
- end
- % Fit model and get stats
- fprintf('\n---- Main results ----')
- main_stats = GetStats(tbl, ['AvgThetaPow', lmeFormula], nBoot, true);
- save(fullfile(results_path,'main_stats_theta'),'main_stats');
- % Sensitivity analysis - Linear model of per-subject averages
- % Iterate over table and create average power per subject
- uniqueSubjects = unique(tbl.Subject);
- tbl2 = tbl;
- tbl2(:,:) = [];
- for i = 1:length(uniqueSubjects)
- subjectRows = tbl.Subject == uniqueSubjects(i);
- rows = find(subjectRows);
- tbl2 = [tbl2; tbl(rows(1),:)];
- tbl2.AvgThetaPow(i) = mean(tbl.AvgThetaPow(rows));
- end
- % Fit model and get stats
- fprintf('\n---- Sensitivity analysis ----')
- sens_stats = GetStats(tbl2, ['AvgThetaPow', lmFormula], nBoot, true);
- save(fullfile(results_path,'sens_stats_theta'),'sens_stats');
- % Unadjusted t-test AmpPLP vs AmpNoPLP
- iAmpPLP = find(tbl2.Pain == "1");
- iAmpNoPLP = find(tbl2.Amp=="1" & tbl2.Pain=="0");
- iIC = find(tbl2.Amp=="0");
- [~,p1,ci1,~] = ttest2(tbl2.AvgThetaPow(iAmpPLP),tbl2.AvgThetaPow(iAmpNoPLP), 'Tail', 'right');
- [~,p2,ci2,~] = ttest2(tbl2.AvgThetaPow(iAmpNoPLP),tbl2.AvgThetaPow(iIC), 'Tail', 'both');
- fprintf('\nUnadjusted t-test AmpPLP vs AmpNoPLP: p = %.4f, CI = [%.3f, %.3f] (right-tailed) \n', p1, ci1(1), ci1(2));
- fprintf( 'Unadjusted t-test AmpNoPLP vs IC: p = %.4f, CI = [%.3f, %.3f] (two-tailed) \n', p2, ci2(1), ci2(2));
- % Raincloud plots per measurement
- theta_PLP_meas = tbl.AvgThetaPow(tbl.Pain == "1");
- theta_AmpNoPLP_meas = tbl.AvgThetaPow((tbl.Amp == "1") & (tbl.Pain == "0"));
- theta_IC_meas = tbl.AvgThetaPow(tbl.Amp == "0");
- f = figure('Units','centimeters','Position', [10 10 24 7]);
- rm_raincloud({theta_PLP_meas,theta_AmpNoPLP_meas,theta_IC_meas},[cAmpPLP;cAmpNoPLP;cIC]);
- xlabel('logPower');
- xlim([-5.2, 1.6])
- ylim([-0.4, 0.7])
- title('Average theta power per trial')
- yticks([])
- ax = gca;
- ax.FontSize = 12;
- % fake legend
- h(1) = scatter(nan,nan,10,cAmpPLP,'filled');
- h(2) = scatter(nan,nan,10,cAmpNoPLP,'filled');
- h(3) = scatter(nan,nan,10,cIC,'filled');
- legend(h,'AmpPLP','AmpNoPLP', 'IC');
- if randomizeSubjects
- ha = annotation('textbox',[.2 .5 .6 .1],'string','Dummy results');
- ha.HorizontalAlignment = 'center';
- ha.BackgroundColor = [0.9 0.5 1]; % make the box opaque with some color
- ha.FaceAlpha = 0.6;
- end
- figname = ['Theta_raincloud_meas_' task '.svg'];
- saveas(f,fullfile(figures_path,figname));
- % Raincloud plots per subject
- theta_PLP_subj = tbl2.AvgThetaPow(tbl2.Pain == "1");
- theta_AmpNoPLP_subj = tbl2.AvgThetaPow((tbl2.Amp == "1") & (tbl2.Pain == "0"));
- theta_IC_subj = tbl2.AvgThetaPow(tbl2.Amp == "0");
- f = figure('Units','centimeters','Position', [10 10 24 7]);
- rm_raincloud({theta_PLP_subj,theta_AmpNoPLP_subj,theta_IC_subj},[cAmpPLP;cAmpNoPLP;cIC]);
- xlabel('logPower');
- xlim([-5.2, 1.6])
- ylim([-0.4, 0.7])
- title('Average theta power per subject')
- yticks([])
- ax = gca;
- ax.FontSize = 12;
- if randomizeSubjects
- ha = annotation('textbox',[.2 .5 .6 .1],'string','Dummy results');
- ha.HorizontalAlignment = 'center';
- ha.BackgroundColor = [0.9 0.5 1]; % make the box opaque with some color
- ha.FaceAlpha = 0.6;
- end
- figname = ['Theta_raincloud_subj_' task '.svg'];
- saveas(f,fullfile(figures_path,figname));
- %%
- close all
- % To check model fits
- figure; histogram(tbl.AvgThetaPow,10); title('AvgThetaPow per trial'); xlabel('logPower');
- figure; histogram(tbl2.AvgThetaPow,10); title('AvgThetaPow per subject'); xlabel('logPower');
- load(fullfile(results_path,'main_stats_theta'),'main_stats')
- RunModelDiagnostics(main_stats, 'AvgThetaPow', true);
- load(fullfile(results_path,'sens_stats_theta'),'sens_stats')
- RunModelDiagnostics(sens_stats, 'AvgThetaPow', false);
- %% CBPT over theta band
- % ============== Specify which analysis to perform ================
- % Contrast {'PLP', 'Amp', 'Pooled'} = {AmpPLP vs AmpNoPLP, AmpNoPLP vs IC, AmpPLP vs AmpNoPLP+IC}
- contrast = 'Pooled';
- % Weather to perform adjusted or unadjusted analysis
- adjust = true;
- % =================================================================
- % Copy table of features
- tbl = features_tbl;
- fBand = params.FreqBand.theta;
- % If PLP contrast -> remove ICs
- if strcmp(contrast, 'PLP')
- toDelete = tbl.Amp == "0";
- tbl(toDelete,:) = [];
- % If Amp contrast -> remove AmpPLPs
- elseif strcmp(contrast, 'Amp')
- toDelete = tbl.Pain == "1";
- tbl(toDelete,:) = [];
- end
- % Iterate over table and create struct with average power per subject and covariates
- uniqueSubjects = unique(tbl.Subject);
- contrastData = struct();
- for i = 1:length(uniqueSubjects)
- subjectRows = tbl.Subject == uniqueSubjects(i);
- rows = find(subjectRows);
- % Get grand average power across trials
- cfg = [];
- cfg.channel = 'all';
- cfg.parameter = 'powspctrm';
- cfg.keepindividual = 'no'; % here individual = trials
- pwrRows = tbl.Power(rows);
- grandavg = ft_freqgrandaverage(cfg,pwrRows{:});
- % log-transform power spectrum for more robust normailty assumption
- grandavg.powspctrm = log(grandavg.powspctrm);
- contrastData(i).Power = grandavg;
- contrastData(i).Age = tbl.Age(rows(1));
- if tbl.Sex(rows(1)) == 'F' % F
- contrastData(i).Sex = 1;
- else % M
- contrastData(i).Sex = 2;
- end
- if tbl.Amp(rows(1)) == '1' % Amp
- contrastData(i).Amp = 1;
- else % No amp
- contrastData(i).Amp = 2;
- end
- if tbl.Pain(rows(1)) == '1' % Pain
- contrastData(i).Pain = 1;
- else % No pain
- contrastData(i).Pain = 2;
- end
- subj = strsplit(string(uniqueSubjects(i)), '-');
- contrastData(i).Subject = str2num(subj(2));
- end
- cfg = [];
- cfg.avgoverchan = 'yes';
- cfg.method = 'montecarlo';
- if adjust
- cfg.statistic = 'ft_statfun_indepsamplesregrT';
- else
- cfg.statistic = 'ft_statfun_indepsamplesT';
- end
- cfg.parameter = 'powspctrm';
- cfg.frequency = fBand;
- cfg.correctm = 'cluster';
- cfg.clusteralpha = 0.05;
- cfg.clusterstatistic = 'maxsum';
- cfg.alpha = 0.05;
- cfg.tail = 1; % 0 = two-sided, 1 = positive/right tail, -1 = negative/left tail
- cfg.clustertail = cfg.tail;
- cfg.numrandomization = 5000;
- % design matrix
- if strcmp(contrast, 'Amp') % Amp as independent variable
- design = [contrastData.Amp]; ...
- else % contrast PLP or Pooled --> Pain as independent variable
- design = [contrastData.Pain]; ...
- end
- % Add covariates for adjusted test
- if adjust
- design = [ design; ...
- [contrastData.Age]; ... % covariate 1
- [contrastData.Sex]]; % covariate 2
- end
- cfg.design = design;
- cfg.ivar = 1; % Independent variable, main effect to test
- if adjust
- cfg.covariate = [2 3]; % Covariates
- end
- cfg.avgoverfreq = 'no';
- if strcmp(contrast, 'Amp')
- idx = [contrastData.Amp] == 1;
- stat_contrast = ft_freqstatistics(cfg, contrastData(idx).Power, contrastData(~idx).Power);
- else % contrast PLP or Pooled --> Pain
- idx = [contrastData.Pain] == 1;
- stat_contrast = ft_freqstatistics(cfg, contrastData(idx).Power, contrastData(~idx).Power);
- end
- % Set plot colors based on contrast
- if strcmp(contrast, 'PLP')
- c1 = cAmpPLP;
- c2 = cAmpNoPLP;
- elseif strcmp(contrast, 'Amp')
- c1 = cAmpNoPLP;
- c2 = cIC;
- elseif strcmp(contrast, 'Pooled')
- c1 = cAmpPLP;
- c2 = cPooled;
- end
- power_fig = figure('Units','centimeters','Position', [10 10 18 6],'Visible','on');
- cfg = [];
- cfg.channel = 'all';
- cfg.parameter = 'powspctrm';
- cfg.avgoverchan = 'yes';
- cfg.keepindividual = 'no'; % here individual = subjects
- grandavgPain = ft_freqgrandaverage(cfg,contrastData(idx).Power);
- l{1} = stdshade(squeeze(grandavgPain.powspctrm),0.1,c1,grandavgPain.freq);
- hold on
- grandavgNoPain = ft_freqgrandaverage(cfg,contrastData(~idx).Power);
- l{2} = stdshade(squeeze(grandavgNoPain.powspctrm),0.1,c2,grandavgNoPain.freq);
- if strcmp(contrast, 'PLP')
- legend([l{:}],'AmpPLP','AmpNoPLP');
- elseif strcmp(contrast, 'Pooled')
- legend([l{:}],'AmpPLP','AmpNoPLP+IC');
- elseif strcmp(contrast, 'Amp')
- legend([l{:}],'AmpNoPLP','IC');
- end
- xlim(fBand)
- ylim([-3.1, -1])
- if adjust
- ttl = strcat(contrast, ' contrast, adjusted');
- else
- ttl = strcat(contrast, ' contrast, unadjusted');
- end
- %title(ttl)
- ylabel('logPower');
- xlabel('Frequency (Hz)');
- ax = gca;
- ax.FontSize = 12;
- % Indicate significant clusters
- siglvl = 0.05;
- if isfield(stat_contrast, 'posclusters')
- pos_cluster_pvals = [stat_contrast.posclusters(:).prob];
- pos_clust = find(pos_cluster_pvals < siglvl);
- pos = ismember(stat_contrast.posclusterslabelmat, pos_clust);
- significant_freqs = stat_contrast.freq(pos);
- plot(significant_freqs,-3*ones(1,length(significant_freqs)),'k','LineWidth',3);
- else
- disp("No significant positive clusters")
- end
- if isfield(stat_contrast, 'negclusters')
- neg_cluster_pvals = [stat_contrast.negclusters(:).prob];
- neg_clust = find(neg_cluster_pvals < siglvl);
- neg = ismember(stat_contrast.negclusterslabelmat, neg_clust);
- significant_freqs = stat_contrast.freq(neg);
- plot(significant_freqs,-3*ones(1,length(significant_freqs)),'k','LineWidth',3);
- else
- disp("No significant negative clusters")
- end
- if randomizeSubjects
- ha = annotation('textbox',[.2 .6 .6 .1],'string','Dummy results');
- ha.HorizontalAlignment = 'center';
- ha.BackgroundColor = [0.9 0.5 1]; % make the box opaque with some color
- ha.FaceAlpha = 0.6;
- end
- if adjust
- figname = ['Theta_' contrast '_adjusted_' task '.svg'];
- else
- figname = ['Theta_' contrast '_unadjusted_' task '.svg'];
- end
- saveas(power_fig,fullfile(figures_path,figname));
- %% APF Max
- maxTbl = features_tbl;
- maxTbl.Power = []; maxTbl.Cog = []; % remove redundant rows
- maxTbl(isnan(maxTbl.Max),:) = []; % remove NaN entries
- % Fit model and get stats
- fprintf('\n---- Main results - Max ----')
- main_stats = GetStats(maxTbl, ['Max', lmeFormula], nBoot, true);
- save(fullfile(results_path,'main_stats_APFMax'),'main_stats');
- % Sensitivity analysis - Per-subject model
- % Iterate over table and create average power per subject
- uniqueSubjects = unique(maxTbl.Subject);
- maxTbl2 = maxTbl;
- maxTbl2(:,:) = [];
- for i = 1:length(uniqueSubjects)
- subjectRows = maxTbl.Subject == uniqueSubjects(i);
- rows = find(subjectRows);
- maxTbl2 = [maxTbl2; maxTbl(rows(1),:)];
- maxTbl2.Max(i) = mean(maxTbl.Max(rows));
- end
- % Fit model and get stats
- fprintf('\n---- Sensitivity analysis - Max ----')
- sens_stats = GetStats(maxTbl2, ['Max', lmFormula], nBoot, true);
- save(fullfile(results_path,'sens_stats_APFMax'),'sens_stats');
- % Unadjusted t-test AmpPLP vs AmpNoPLP
- iAmpPLP = find(maxTbl2.Pain == "1");
- iAmpNoPLP = find(maxTbl2.Amp=="1" & maxTbl2.Pain=="0");
- iIC = find(maxTbl2.Amp=="0");
- [~,p1,ci1,~] = ttest2(maxTbl2.Max(iAmpPLP),maxTbl2.Max(iAmpNoPLP), 'Tail', 'right');
- [~,p2,ci2,~] = ttest2(maxTbl2.Max(iAmpNoPLP),maxTbl2.Max(iIC), 'Tail', 'both');
- fprintf('\nUnadjusted t-test AmpPLP vs AmpNoPLP: p = %.4f, CI = [%.3f, %.3f] (right-tailed) \n', p1, ci1(1), ci1(2));
- fprintf( 'Unadjusted t-test AmpNoPLP vs IC: p = %.4f, CI = [%.3f, %.3f] (two-tailed) \n', p2, ci2(1), ci2(2));
- % Raincloud plots per measurement
- max_PLP_meas = maxTbl.Max(maxTbl.Pain == "1");
- max_AmpNoPLP_meas = maxTbl.Max((maxTbl.Amp == "1") & (maxTbl.Pain == "0"));
- max_IC_meas = maxTbl.Max(maxTbl.Amp == "0");
- % Raincloud plots per subject
- max_PLP_subj = maxTbl2.Max(maxTbl2.Pain == "1");
- max_AmpNoPLP_subj = maxTbl2.Max((maxTbl2.Amp == "1") & (maxTbl2.Pain == "0"));
- max_IC_subj = maxTbl2.Max(maxTbl2.Amp == "0");
- f = figure('Units','centimeters','Position', [10 10 16 16]);
- tiledlayout(2,1,'Padding','compact');
- nexttile
- rm_raincloud({max_PLP_meas,max_AmpNoPLP_meas,max_IC_meas},[cAmpPLP;cAmpNoPLP;cIC]);
- xlim(params.FreqBand.alpha + [-0.2, 0.2]);
- ylim([-0.5, 1.2])
- xticklabels([])
- yticks([])
- title('Per trial')
- ax = gca;
- ax.FontSize = 12;
- % fake legend
- h(1) = scatter(nan,nan,10,cAmpPLP,'filled');
- h(2) = scatter(nan,nan,10,cAmpNoPLP,'filled');
- h(3) = scatter(nan,nan,10,cIC,'filled');
- legend(h,'AmpPLP','AmpNoPLP', 'IC');
- nexttile
- rm_raincloud({max_PLP_subj,max_AmpNoPLP_subj,max_IC_subj},[cAmpPLP;cAmpNoPLP;cIC]);
- xlim(params.FreqBand.alpha + [-0.2, 0.2]);
- ylim([-0.5, 1.2])
- yticks([])
- xlabel('Frequency [Hz]')
- title('Per subject')
- ax = gca;
- ax.FontSize = 12;
- sgtitle('Peak Alpha Frequency - Max')
- if randomizeSubjects
- ha = annotation('textbox',[.2 .5 .6 .05],'string','Dummy results');
- ha.HorizontalAlignment = 'center';
- ha.BackgroundColor = [0.9 0.5 1]; % make the box opaque with some color
- ha.FaceAlpha = 0.6;
- end
- figname = ['Alpha_raincloud_max_' task '.svg'];
- saveas(f,fullfile(figures_path,figname));
- %%
- close all
- % To check model fits
- figure; histogram(maxTbl.Max,10); title('PAF-Max per trial'); xlabel('Frequency [Hz]');
- figure; histogram(maxTbl2.Max,10); title('PAF-Max per subject'); xlabel('Frequency [Hz]');
- RunModelDiagnostics(main_stats, 'Max', true);
- RunModelDiagnostics(sens_stats, 'Max', false);
- %% Run model wihtout Amp to see if Age-effect pops out
- % Note – only as diagnostics
- lme = fitlme(maxTbl, ['Max', ' ~ Pain + Age + Sex + (1|Subject)']);
- lm = fitlm(maxTbl2, ['Max', ' ~ Pain + Age + Sex']);
- %% APF CoG
- cogTbl = features_tbl;
- cogTbl.Power = []; cogTbl.Max = []; % remove redundant rows
- % Fit model and get stats
- fprintf('\n---- Main results - CoG ----')
- main_stats = GetStats(cogTbl, ['Cog', lmeFormula], nBoot, true);
- save(fullfile(results_path,'main_stats_APFCog'),'main_stats');
- % Sensitivity analysis - Per-subject model
- % Iterate over table and create average power per subject
- uniqueSubjects = unique(cogTbl.Subject);
- cogTbl2 = cogTbl;
- cogTbl2(:,:) = [];
- for i = 1:length(uniqueSubjects)
- subjectRows = cogTbl.Subject == uniqueSubjects(i);
- rows = find(subjectRows);
- cogTbl2 = [cogTbl2; cogTbl(rows(1),:)];
- cogTbl2.Cog(i) = mean(cogTbl.Cog(rows));
- end
- % Fit model and get stats
- fprintf('\n---- Sensitivity analysis - CoG ----')
- sens_stats = GetStats(cogTbl2, ['Cog', lmFormula], nBoot, true);
- save(fullfile(results_path,'sens_stats_APFCog'),'sens_stats');
- % Unadjusted t-test AmpPLP vs AmpNoPLP
- iAmpPLP = find(cogTbl2.Pain == "1");
- iAmpNoPLP = find(cogTbl2.Amp=="1" & cogTbl2.Pain=="0");
- iIC = find(cogTbl2.Amp=="0");
- [~,p1,ci1,~] = ttest2(cogTbl2.Cog(iAmpPLP),cogTbl2.Cog(iAmpNoPLP), 'Tail', 'right');
- [~,p2,ci2,~] = ttest2(cogTbl2.Cog(iAmpNoPLP),cogTbl2.Cog(iIC), 'Tail', 'both');
- fprintf('\nUnadjusted t-test AmpPLP vs AmpNoPLP: p = %.4f, CI = [%.3f, %.3f] (right-tailed) \n', p1, ci1(1), ci1(2));
- fprintf( 'Unadjusted t-test AmpNoPLP vs IC: p = %.4f, CI = [%.3f, %.3f] (two-tailed) \n', p2, ci2(1), ci2(2));
- % Raincloudplots per measurement
- cog_PLP_meas = cogTbl.Cog(cogTbl.Pain == "1");
- cog_AmpNoPLP_meas = cogTbl.Cog((cogTbl.Amp == "1") & (cogTbl.Pain == "0"));
- cog_IC_meas = cogTbl.Cog(cogTbl.Amp == "0");
- % Raincloudplots per subject
- cog_PLP_subj = cogTbl2.Cog(cogTbl2.Pain == "1");
- cog_AmpNoPLP_subj = cogTbl2.Cog((cogTbl2.Amp == "1") & (cogTbl2.Pain == "0"));
- cog_IC_subj = cogTbl2.Cog(cogTbl2.Amp == "0");
- f = figure('Units','centimeters','Position', [10 10 16 16]);
- tiledlayout(2,1,'Padding','compact');
- nexttile
- rm_raincloud({cog_PLP_meas,cog_AmpNoPLP_meas,cog_IC_meas},[cAmpPLP;cAmpNoPLP;cIC]);
- xlim(params.FreqBand.alpha + [-0.2, 0.2]);
- ylim([-0.5, 1.2])
- yticks([])
- xticklabels([])
- %xlabel('Frequency [Hz]')
- title('Per trial')
- ax = gca;
- ax.FontSize = 12;
- % fake legend
- %h(1) = scatter(nan,nan,10,cAmpPLP,'filled');
- %h(2) = scatter(nan,nan,10,cAmpNoPLP,'filled');
- %h(3) = scatter(nan,nan,10,cIC,'filled');
- %legend(h,'AmpPLP','AmpNoPLP', 'IC');
- nexttile
- rm_raincloud({cog_PLP_subj,cog_AmpNoPLP_subj,cog_IC_subj},[cAmpPLP;cAmpNoPLP;cIC]);
- xlim(params.FreqBand.alpha + [-0.2, 0.2]);
- ylim([-0.5, 1.2])
- yticks([])
- xlabel('Frequency [Hz]')
- title('Per subject')
- ax = gca;
- ax.FontSize = 12;
- sgtitle('Peak Alpha Frequency - CoG')
- if randomizeSubjects
- ha = annotation('textbox',[.2 .5 .6 .05],'string','Dummy results');
- ha.HorizontalAlignment = 'center';
- ha.BackgroundColor = [0.9 0.5 1]; % make the box opaque with some color
- ha.FaceAlpha = 0.6;
- end
- figname = ['Alpha_raincloud_cog_' task '.svg'];
- saveas(f,fullfile(figures_path,figname));
- %%
- close all
- % To check model fits
- figure; histogram(cogTbl.Cog,8); title('PAF-CoG per trial'); xlabel('Frequency [Hz]');
- figure; histogram(cogTbl2.Cog,8); title('PAF-CoG per subject'); xlabel('Frequency [Hz]');
- RunModelDiagnostics(main_stats, 'Cog', true);
- RunModelDiagnostics(sens_stats, 'Cog', false);
main_analysis.m, under CC-BY-4.0 · at the source
Overview
- Department of Electrical Engineering, Chalmers University of Technology, Gothenburg, Sweden
- Department of Brain and Cognitive Sciences, MIT, Cambridge, USA
Abstract
Phantom limb pain (PLP) affects a substantial portion of individuals with limb amputation, yet its neural mechanisms remain poorly understood. While neuroimaging studies have predominantly employed functional magnetic resonance imaging and magnetoencephalography, resting-state EEG could offer complementary insight into intrinsic brain oscillations but remains underexplored in this context. More generally, neuropathic pain has been associated with increased theta-band power and slowing of peak alpha frequency but whether these patterns extend to PLP is unknown. Here, we conducted a pre-registered, cross-sectional investigation of high-density resting-state EEG (58 channels) in 19 intact controls, 6 amputees without PLP, and 13 amputees with PLP. We employed mixed-effects models with bootstrap inference, multiple sensitivity analyses, and exploratory cluster-based permutation testing. Across primary and sensitivity analyses, we found no evidence for a robust association between PLP and either theta power or peak alpha frequency. Amputation-related differences in the alpha band reached statistical significance in some analyses, suggesting possible alpha-band alterations associated with limb loss rather than pain per se. Exploratory analyses showed a positive association between one measure of peak alpha frequency and pain intensity. However, inconsistent replication across spectral measures and tests indicates that these amputation and pain intensity-related findings should be interpreted with caution. For instance, results differed depending on the metric used (spectral maximum vs. center of gravity), highlighting the sensitivity of peak alpha frequency analyses to methodological choices. Together, these results suggest that resting-state EEG markers commonly reported in chronic pain do not straightforwardly generalize to PLP.
Supplementary Information: The online version contains supplementary material available at 10.1007/
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 11 matches between paragraphs and lines of code.
Zenodo 17977343
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
- 28 September 2026: the link answers (HTTP 200)
11 files
- Supporting functions/
BinPSD.m , MATLAB, 19 lines - Supporting functions/
BootstrapCIs.m , MATLAB, 68 lines - Supporting functions/
EstimateEffectSize.m , MATLAB, 26 lines - Supporting functions/
GetAndRenameCommonChanne , MATLAB, 15 linesls.m - Supporting functions/
GetStats.m , MATLAB, 98 lines, 1 match - Supporting functions/
GetStudyFeatures.m , MATLAB, 293 lines - Supporting functions/
RunModelDiagnostics.m , MATLAB, 98 lines, 2 matches - exploratory_analysis.m, MATLAB, 506 lines, 2 matches
- main_analysis.m, MATLAB, 588 lines, 4 matches
- preprocessing.m, MATLAB, 504 lines, 2 matches
- README.txt, Text, 17 lines
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;
- 10 scripts, each with its path and the digest of its content;
- 11 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
- openneuro:ds006921, at OpenNeuro; found in “Code and Data Availability”
- openneuro:ds006921](http
s: , at OpenNeuro; found in “Data Availability”
Data Availability Statement
The data is available open access in BIDS-EEG format at: https://
Code for the statistical analysis is available at: 10.5281/
The data is available open access in BIDS-EEG format at: [https://
Reproduced under the paper's license (CC BY), from the paper cited above.
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 → Springer Science+Business Media
Version 1, 28 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 2 authors, 12 keywords, 13 MeSH terms, 1 funder, 40 references.
Cite
This paper
Ramne, M., & Lendaro, E. (2026). Resting-State Theta and Alpha Oscillations in Amputation and Phantom Limb Pain: A Pre-Registered High-Density EEG Study. Brain topography, 39(4), 58. https://
BibTeX
@article{ramne2026restin
author = {Ramne, Malin and Lendaro, Eva},
title = {{Resting-State Theta and Alpha Oscillations in Amputation and Phantom Limb Pain: A Pre-Registered High-Density EEG Study}},
journal = {Brain topography},
year = {2026},
month = may,
volume = {39},
number = {4},
pages = {58},
publisher = {Springer Science+Business Media},
issn = {0896-0267},
doi = {10.1007/
url = {https://
pmid = {42171820},
pmcid = {PMC13197317}
}
RIS
TY - JOUR
AU - Ramne, Malin
AU - Lendaro, Eva
TI - Resting-State Theta and Alpha Oscillations in Amputation and Phantom Limb Pain: A Pre-Registered High-Density EEG Study
T2 - Brain topography
J2 - Brain Topogr
PY - 2026
DA - 2026/
VL - 39
IS - 4
SP - 58
SN - 0896-0267
PB - Springer Science+Business Media
DO - 10.1007/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1007/
"type": "article-journal",
"title": "Resting-State Theta and Alpha Oscillations in Amputation and Phantom Limb Pain: A Pre-Registered High-Density EEG Study",
"container-title": "Brain topography",
"author": [
{
"family": "Ramne",
"given": "Malin"
},
{
"family": "Lendaro",
"given": "Eva"
}
],
"container-title-short":
"volume": "39",
"issue": "4",
"page": "58",
"DOI": "10.1007/
"PMID": "42171820",
"PMCID": "PMC13197317",
"ISSN": "0896-0267",
"publisher": "Springer Science+Business Media",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
22
]
]
}
}
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.1186/s12984-026-01998-5
- Sensory and cortical biomarkers unveil pain modulation mechanisms induced by targeted multisensory neurostimulation.Journal: Journal of neuroengineering and rehabilitationIn common: pain, EEG, 5 references
- [2] doi:10.1002/ejp.70313 [code]
- Predicting Pain: Electroencephalography Signatures of Neural Integration During Experimental Tonic Thermal Pain.Journal: European journal of pain (London, England)In common: EEGLAB, Statistics and Machine Learning Toolbox, pain, EEG, 3 references
- [3] doi:10.7554/elife.111114 [code]
- Theta beta ratio in attention deficit hyperactivity disorder using a multiverse analysis.Journal: eLifeIn common: EEGLAB, FieldTrip, Statistics and Machine Learning Toolbox, EEG, 3 references
- [4] doi:10.1371/journal.pbio.3003948 [code]
- Neural encoding of pain is robust within but unstable between individuals.Journal: PLoS biologyIn common: FieldTrip, pain, EEG, 4 references
- [5] doi:10.1038/s41467-026-73553-8 [code]
- Universal rhythmic architecture uncovers two modes of neural dynamics.Journal: Nature communicationsIn common: FieldTrip, Statistics and Machine Learning Toolbox, EEG, 4 references
- [6] doi:10.7554/elife.108408 [code]
- Frequency and laminar profile of feature-specific visual activity revealed by interleaved EEG-fMRI.Journal: eLifeIn common: FieldTrip, Statistics and Machine Learning Toolbox, systems, EEG, 3 references
- [7] doi:10.1016/j.neuroimage.2026.122002
- EEG-based clustering shows distinct separation of chronic pain patients before spinal cord stimulation surgery.Journal: NeuroImageIn common: pain, EEG, 4 references
- [8] doi:10.1093/braincomms/fcag351 [code]
- Time-resolved aperiodic dynamics in event segmentation in attention-deficit/
hyperactivity disorder. Journal: Brain communicationsIn common: EEGLAB, FieldTrip, Statistics and Machine Learning Toolbox, EEG, 2 references - [9] doi:10.1371/journal.pbio.3003979 [code]
- Impaired midfrontal‑motor theta phase synchronization characterizes maladaptive motivational behavior in people with obsessive‑compulsive disorder.Journal: PLoS biologyIn common: EEGLAB, FieldTrip, Statistics and Machine Learning Toolbox, systems, EEG, 1 reference
- [10] doi:10.1038/s41467-026-71600-y [code]
- Temporal predictions shape somatosensory perception.Journal: Nature communicationsIn common: FieldTrip, Statistics and Machine Learning Toolbox, pain, EEG, 2 references
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, 10 scripts, and 11 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:888ebdbb5554166c…
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.
