<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">
Hi …., 
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>So it’s impossible to comment.</div>
<div><br>
</div>
<div>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. </div>
<div><br>
</div>
<div>Good luck with your endeavours.</div>
<div><br>
</div>
<div>Jan-Mathijs</div>
<div><br id="lineBreakAtBeginningOfMessage">
<div><br>
<blockquote type="cite">
<div>On 14 Nov 2024, at 08:13, 봉수현 via fieldtrip <fieldtrip@science.ru.nl> wrote:</div>
<br class="Apple-interchange-newline">
<div>
<div style="font-family: system-ui; font-size: 14px">
<div>Dear fieldtrip experts!</div>
<div><br>
</div>
<div>Hello? I'm having some difficulties with statistical analysis and have a question.</div>
<div>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.</div>
<div>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).</div>
<div>I've appended individual behavioral measures as independent variables for 18 subjects' data.</div>
<div>Afterwards, I created code to find significant masks in 'stat'.</div>
<div>However, I have not found any significant masks, which seems unusual.</div>
<div>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.</div>
<div>Could there be any issues in the code that might be causing problems?</div>
<div>Without setting corrections, approximately 500 channels are found to be significant...</div>
<div><br>
</div>
<div><br>
</div>
<div><span style="white-space: pre;">stat = struct();</span><span style="white-space: pre;">all_p_values = [];  </span></div>
<div><span style="white-space: pre;">load(<span style="color: #a709f5;">'c_stat.mat'</span>);</span></div>
<div><span style="white-space: pre;">independent_variable = zscore(independent_variable);</span></div>
<div><span style="white-space: pre;">total_data = {};</span></div>
<div><span style="white-space: pre;"><span style="color: #0e00ff;">for </span>i = 1:length(files)</span><span style="white-space: pre;">   </span></div>
<div><span style="white-space: pre;"> data = load(fullfile(dataPath, files(i).name));</span><span style="white-space: pre;">    </span></div>
<div><span style="white-space: pre;"> nan_indices = all(isnan(data.powspctrm), 3);</span><span style="white-space: pre;">    </span><span style="white-space: pre;">   
</span></div>
<div><span style="white-space: pre;"><font color="#008013"></font>valid_indices = find(~nan_indices);</span><span style="white-space: pre;">    </span><span style="white-space: pre;">   
</span></div>
<div><span style="white-space: pre;"><font color="#008013"></font>data.powspctrm = data.powspctrm(valid_indices, :, :);</span><span style="white-space: pre;">   
</span></div>
<div><span style="white-space: pre;">total_data{i} = data;</span></div>
<div><span style="white-space: pre;"><span style="color: #0e00ff;">end</span></span></div>
<div><span style="white-space: pre;"><br>
</span></div>
<div><span style="white-space: pre;">design(1,1:18) =independent_variable;</span></div>
<div><span style="white-space: pre;"><br>
</span></div>
<div><span style="white-space: pre;">cfg = [];</span></div>
<div><span style="white-space: pre;">cfg.statistic        = <span style="color: #a709f5;">
'ft_statfun_indepsamplesregrT'</span>;</span></div>
<div><span style="white-space: pre;">cfg.method           = <span style="color: #a709f5;">
'montecarlo'</span>;</span></div>
<div><span style="white-space: pre;">cfg.numrandomization = 1000;</span></div>
<div><span style="white-space: pre;">cfg.design           = design;</span></div>
<div><span style="white-space: pre;">cfg.ivar             = 1;</span></div>
<div><span style="white-space: pre;">cfg.correctm    = <span style="color: #a709f5;">
'fdr'</span>;</span></div>
<div><span style="white-space: pre;">cfg.alpha       = 0.05;</span></div>
<div><span style="white-space: pre;">cfg.tail        = 0;</span></div>
<div><span style="white-space: pre;">stat = ft_freqstatistics(cfg, total_data{:});</span></div>
<div><span style="white-space: pre;"><br>
</span></div>
<div><span style="white-space: pre;"><br>
</span></div>
<div><span style="white-space: pre;"><br>
</span></div>
<div><span style="white-space: pre;">significant_indices = find(stat.mask);</span></div>
<div><span style="white-space: pre;"><span style="color: #0e00ff;">if </span>~isempty(significant_indices)</span><span style="white-space: pre;">    fprintf(<span style="color: #a709f5;">'Found %d significant results:\n'</span>, length(significant_indices));</span><span style="white-space: pre;"> 
   disp(significant_indices);</span><span style="white-space: pre;"><span style="color: #0e00ff;">else</span></span><span style="white-space: pre;">    disp(<span style="color: #a709f5;">'No significant results found.'</span>);</span><span style="white-space: pre;"><span style="color: #0e00ff;">end</span></span></div>
<!-- begin signature --><!-- end signature --></div>
<!--[if mso]>
<table style ="display:none"><tr><td><img src="https://kaist.gov-dooray.com/mail-receipts?img=35484142365a502f-2c1e41124599bc5e-36a129ef9e602815-36a12b74bca78de0.gif" border="0"></td></tr></table>
<![endif]--><!--[if !mso]><!-- -->
<table style="visibility: hidden;">
<tbody>
<tr>
<td><img src="https://kaist.gov-dooray.com/mail-receipts?img=35484142365a502f-2c1e41124599bc5e-36a129ef9e602815-36a12b74bca78de0.gif" border="0"></td>
</tr>
</tbody>
</table>
<!--[endif]-->_______________________________________________<br>
fieldtrip mailing list<br>
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip<br>
https://doi.org/10.1371/journal.pcbi.1002202<br>
</div>
</blockquote>
</div>
<br>
</div>
</body>
</html>