<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif">Hi!</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">Thanks in advance for your support.</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif"><b>Context</b>:</div><div class="gmail_default" style="font-family:georgia,serif">I am trying to run "ft_freqstatistics" comparing conditions within an individual subject. </div><div class="gmail_default" style="font-family:georgia,serif"><b>Issue</b>:</div><div class="gmail_default" style="font-family:georgia,serif">When running the code, I get the following error:</div><div class="gmail_default" style="font-family:georgia,serif">---</div><div class="gmail_default" style="font-family:georgia,serif">generated 1000 random permutations<br>computing a parametric threshold for clustering<br>computing statistic<br>estimated time per randomization is 0.13 seconds<br>computing statistic 1000 from 1000<br><br>Error using spm_bwlabel (line 27)<br>spm_bwlabel.c not compiled - see Makefile<br></div><div class="gmail_default" style="font-family:georgia,serif">---</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif"><b>Troubleshooting</b>:</div><div class="gmail_default" style="font-family:georgia,serif">1. I inspected my fieldtrip SPM toolbox (''...GitHub/fieldtrip/external/spm12'') has the spm_bwlabel files but not the spm_bwlabel.mexmaca64. I think I need the spm_bwlabel.mexmaca64 to run it on my machine; is that correct?</div><div class="gmail_default" style="font-family:georgia,serif">2. Doing some reading, I may need to compile the spm_make_standalone.m file. However, I do not know how to do it in Fieldtrip's path.</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif"><b>My code</b>:</div><div class="gmail_default" style="font-family:georgia,serif"><div class="gmail-rtcContent" style="padding:30px"><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">cfg = [];</span></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">cfg.parameter    = <span style="color:rgb(167,9,245)">'powspctrm'</span>;     <span style="color:rgb(0,128,19)">% Specify power spectrum parameter</span></span></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">cfg.method       = <span style="color:rgb(167,9,245)">'montecarlo'</span>;    <span style="color:rgb(0,128,19)">% Use permutation testing</span></span></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">cfg.statistic    = <span style="color:rgb(167,9,245)">'depsamplesT'</span>;   <span style="color:rgb(0,128,19)">% Dependent samples t-test</span></span></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">cfg.correctm     = <span style="color:rgb(167,9,245)">'cluster'</span>;       <span style="color:rgb(0,128,19)">% Use cluster-based correction</span></span></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">cfg.clusteralpha = 0.05;            <span style="color:rgb(0,128,19)">% Threshold for forming clusters</span></span></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">cfg.clusterstatistic = <span style="color:rgb(167,9,245)">'maxsum'</span>;    <span style="color:rgb(0,128,19)">% Sum of t-values for defining clusters</span></span></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">cfg.alpha        = 0.025;           <span style="color:rgb(0,128,19)">% Significance level for two-tailed test</span></span></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">cfg.tail         = 0;               <span style="color:rgb(0,128,19)">% Two-tailed test</span></span></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">cfg.clustertail  = 0;               <span style="color:rgb(0,128,19)">% Two-tailed cluster statistics</span></span></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">cfg.numrandomization = 1000;        <span style="color:rgb(0,128,19)">% Number of random permutation</span></span><span style="white-space:pre">cfg.neighbours = [];  </span><span style="white-space:pre;color:rgb(0,128,19)">% No neighborhood structure needed for iEEG</span></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre"><span style="color:rgb(0,128,19)">% Design matrix   </span></span></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">design = zeros(2, ntrials_low + ntrials_high);</span></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">design(1, 1:ntrials_low) = 1;       <span style="color:rgb(0,128,19)">% Assign label 1 to trials in the low condition</span></span></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">design(1, ntrials_low+1:end) = 2;   <span style="color:rgb(0,128,19)">% Assign label 2 to trials in the high condition</span></span></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">design(2, :) = [1:ntrials_low, 1:ntrials_high]; <span style="color:rgb(0,128,19)">% Assign trial indices</span></span></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">    </span></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">cfg.design = design;</span></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">cfg.uvar  = 2; <span style="color:rgb(0,128,19)">% unit of observation (subject)</span></span></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">cfg.ivar  = 1; <span style="color:rgb(0,128,19)">% independent variable (condition)</span></span></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre">    </span></div><div class="gmail-lineNode" style="font-size:13px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace"><span style="white-space:pre"><span style="color:rgb(0,128,19)">%7 Compute statistics</span></span><span style="white-space:pre">[stat] = ft_freqstatistics(cfg, TFR_low, TFR_high);</span></div></div></div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif">With gratitude,<br>Camilo</div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><b style="color:rgb(80,0,80)"><span style="font-size:12pt;color:rgb(99,144,68)"><font face="georgia, serif">================================</font></span></b><font face="georgia, serif"><b><br></b></font></div><div><font face="georgia, serif" color="#38761d"><b>Camilo Castelblanco Riveros (He/His)</b></font></div><div><font face="georgia, serif" color="#274e13">Ph.D. Candidate (G3)</font></div><div><div><font face="georgia, serif" color="#274e13"><a href="https://www.robertsonlab.com/" target="_blank">Robertson Lab</a> & <a href="https://www.dartmouth-hitchcock.org/research/search-clinical-trials/trial/STUDY02001606" target="_blank">Bujarski Lab</a></font></div><div><font face="georgia, serif" color="#274e13">Student Interest Group in Neurology (<a href="https://geiselmed.dartmouth.edu/student-gov/student-groups/" target="_blank">SIGN</a>) Co-Leader<u></u></font></div></div><div><font face="georgia, serif" color="#274e13">Diversity Student Advisory Board Member</font></div><div><font face="georgia, serif" color="#274e13">e: <a href="mailto:camilo.a.castelblanco.riveros.gr@dartmouth.edu" target="_blank">ccastelblanco.gr@dartmouth.edu</a></font></div><div><font face="georgia, serif" color="#274e13"><a href="https://dartmouth.zoom.us/my/ccastelblanco" target="_blank">Zoom</a></font></div><div><div style="color:rgb(34,34,34)"><div><font face="georgia, serif"><br></font></div></div></div><div><font face="georgia, serif"><img src="https://pbs.twimg.com/profile_images/1442874308360032261/L7MnNrBk_400x400.jpg" alt="Integrative Neuroscience at Dartmouth (IND) (@DartmouthNeuro) / Twitter" width="96" height="96"><img src="https://jobsearch.dartmouth-hitchcock.org/wp-content/uploads/DH-Bug-e1666020448423.png" width="96" height="96"></font></div></div></div></div></div>