[FieldTrip] using indepsamplesregrT for connectivity data(wPLI)
Schoffelen, J.M. (Jan Mathijs)
janmathijs.schoffelen at donders.ru.nl
Thu Nov 14 09:25:52 CET 2024
Hi ….,
I don’t understand what you mean with the data is foramatted as 10878x1x4 (dataxtimexfrequency bin). For instance, you don’t mention the subject dimension anywhere.
So it’s impossible to comment.
Also, I would start first by looking at the statistical value in the observed data, i.e. without thinking about p-values. Are the parameter estimates (beta weights of the regression, or simply the correlations) as expected? Also, I woud read the code in detail about what is done in terms of computations (from data to test statistic), so that you understand what is actually done in the computation of said test statistic.
Good luck with your endeavours.
Jan-Mathijs
On 14 Nov 2024, at 08:13, 봉수현 via fieldtrip <fieldtrip at science.ru.nl> wrote:
Dear fieldtrip experts!
Hello? I'm having some difficulties with statistical analysis and have a question.
I am planning to perform an independent sample regression analysis in FieldTrip using wPLI values calculated from 148 atlas-based scouts extracted from Brainstorm time series.
I have imported the difference in wPLI between two conditions from Brainstorm into FieldTrip, and the data is formatted as 10878x1x4 (data x time x frequency bin).
I've appended individual behavioral measures as independent variables for 18 subjects' data.
Afterwards, I created code to find significant masks in 'stat'.
However, I have not found any significant masks, which seems unusual.
I am using FDR for multiple corrections, and it might mean that my hypothesis is rejected, but it seems odd that there are no significant masks even when I set the alpha value to 1.
Could there be any issues in the code that might be causing problems?
Without setting corrections, approximately 500 channels are found to be significant...
stat = struct();all_p_values = [];
load('c_stat.mat');
independent_variable = zscore(independent_variable);
total_data = {};
for i = 1:length(files)
data = load(fullfile(dataPath, files(i).name));
nan_indices = all(isnan(data.powspctrm), 3);
valid_indices = find(~nan_indices);
data.powspctrm = data.powspctrm(valid_indices, :, :);
total_data{i} = data;
end
design(1,1:18) =independent_variable;
cfg = [];
cfg.statistic = 'ft_statfun_indepsamplesregrT';
cfg.method = 'montecarlo';
cfg.numrandomization = 1000;
cfg.design = design;
cfg.ivar = 1;
cfg.correctm = 'fdr';
cfg.alpha = 0.05;
cfg.tail = 0;
stat = ft_freqstatistics(cfg, total_data{:});
significant_indices = find(stat.mask);
if ~isempty(significant_indices) fprintf('Found %d significant results:\n', length(significant_indices)); disp(significant_indices);else disp('No significant results found.');end
[https://kaist.gov-dooray.com/mail-receipts?img=35484142365a502f-2c1e41124599bc5e-36a129ef9e602815-36a12b74bca78de0.gif]
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20241114/6805fc0d/attachment.htm>
More information about the fieldtrip
mailing list