[FieldTrip] Issue running "ft_freqstatistics" on macOS with Apple silicon

Camilo Castelblanco Riveros camilo.a.castelblanco.riveros.gr at dartmouth.edu
Mon Oct 7 17:11:20 CEST 2024


Hi!

Thanks in advance for your support.

*Context*:
I am trying to run "ft_freqstatistics" comparing conditions within an
individual subject.
*Issue*:
When running the code, I get the following error:
---
generated 1000 random permutations
computing a parametric threshold for clustering
computing statistic
estimated time per randomization is 0.13 seconds
computing statistic 1000 from 1000

Error using spm_bwlabel (line 27)
spm_bwlabel.c not compiled - see Makefile
---

*Troubleshooting*:
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?
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.

*My code*:
cfg = [];
cfg.parameter = 'powspctrm'; % Specify power spectrum parameter
cfg.method = 'montecarlo'; % Use permutation testing
cfg.statistic = 'depsamplesT'; % Dependent samples t-test
cfg.correctm = 'cluster'; % Use cluster-based correction
cfg.clusteralpha = 0.05; % Threshold for forming clusters
cfg.clusterstatistic = 'maxsum'; % Sum of t-values for defining clusters
cfg.alpha = 0.025; % Significance level for two-tailed test
cfg.tail = 0; % Two-tailed test
cfg.clustertail = 0; % Two-tailed cluster statistics
cfg.numrandomization = 1000; % Number of random permutationcfg.neighbours =
[]; % No neighborhood structure needed for iEEG
% Design matrix
design = zeros(2, ntrials_low + ntrials_high);
design(1, 1:ntrials_low) = 1; % Assign label 1 to trials in the low
condition
design(1, ntrials_low+1:end) = 2; % Assign label 2 to trials in the high
condition
design(2, :) = [1:ntrials_low, 1:ntrials_high]; % Assign trial indices
cfg.design = design;
cfg.uvar = 2; % unit of observation (subject)
cfg.ivar = 1; % independent variable (condition)
%7 Compute statistics[stat] = ft_freqstatistics(cfg, TFR_low, TFR_high);

With gratitude,
Camilo
*================================*
*Camilo Castelblanco Riveros (He/His)*
Ph.D. Candidate (G3)
Robertson Lab <https://www.robertsonlab.com/> & Bujarski Lab
<https://www.dartmouth-hitchcock.org/research/search-clinical-trials/trial/STUDY02001606>
Student Interest Group in Neurology (SIGN
<https://geiselmed.dartmouth.edu/student-gov/student-groups/>) Co-Leader
Diversity Student Advisory Board Member
e: ccastelblanco.gr at dartmouth.edu
<camilo.a.castelblanco.riveros.gr at dartmouth.edu>
Zoom <https://dartmouth.zoom.us/my/ccastelblanco>

[image: Integrative Neuroscience at Dartmouth (IND) (@DartmouthNeuro) /
Twitter]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20241007/11da5275/attachment.htm>


More information about the fieldtrip mailing list