[FieldTrip] Threshold free cluster enhancement for a Repeated Measures design

Bhonsle, Aishwarya aishwarya.bhonsle at med.uni-goettingen.de
Mon May 13 13:19:50 CEST 2024


Hi all,
I am still struggling with this. I'm now trying to use F-statistics for my cluster analysis as Jan-Mathijs recommended, and my code is as follows:
cfg = [];
cfg.method      = 'template';                              % try 'distance' as well
cfg.template    = 'actiCapSnap-64ch-standard_neighb.mat';  % specify type of template
cfg.layout      = 'actiCapSnap-64ch-standard.mat';             % specify layout of channels
neighbours      = ft_prepare_neighbours(cfg, GA_R_alpha_visinvis); % define neighbouring channels

cfg = [];
cfg.channel     = 'EEG';
cfg.neighbours  = neighbours; % defined as above
cfg.latency     = [2 3];
cfg.avgovertime = 'no';
cfg.parameter   = 'alpha';
cfg.method      = 'montecarlo';
cfg.statistic   = 'ft_statfun_depsamplesFunivariate';
cfg.alpha       = 0.05;
cfg.correctm    = 'cluster';
cfg.numrandomization = 5000;
cfg.minnbchan        = 2;      % minimal number of neighbouring channels

Nsub = 30;
cfg.design(1,1:2*Nsub)  = [ones(1,Nsub) 2*ones(1,Nsub)];
cfg.design(2,1:2*Nsub)  = [1:Nsub 1:Nsub];
cfg.ivar                = 1; % the 1st row in cfg.design contains the independent variable
cfg.uvar                = 2; % the 2nd row in cfg.design contains the subject number

RL_stat_cluster_preRDM_noavg = ft_timelockstatistics(cfg, R_alpha_visinvis{:}, L_alpha_visinvis{:});
But I get the following error:
Error using ft_statistics_montecarlo
could not determine the parametric critical value for clustering
Error in ft_timelockstatistics (line 182)
            [stat, cfg] = statmethod(cfg, dat, design);
I imagine this is referring to cfg.alpha, which I am specifying? Or is there something I am missing?
Also, sorry to repeat this from my previous message but I am still a bit confused as to how to proceed. Should I be doing fine-grained pairwise comparisons as above? Or should I just compare both main effects, of cycling (averaging across vis and invis, and comparing R, L, H) and of perception (averaging across R/L/H and comparing vis versus invis)? Is a design like this possible:
Nsub = 30;
cfg.design(1,1:3*Nsub)  = [ones(1,Nsub) 2*ones(1,Nsub) 3*ones(1,Nsub)];
cfg.design(2,1:3*Nsub)  = [1:Nsub 1:Nsub 1:Nsub];
cfg.ivar                = 1; % the 1st row in cfg.design contains the independent variable
cfg.uvar                = 2; % the 2nd row in cfg.design contains the subject number

% Main effect of cycling
RLH_stat_cluster_preRDM_noavg = ft_timelockstatistics(cfg, R_alpha_visinvis{:}, L_alpha_visinvis{:}, H_alpha_visinvis{:});
I actually tried this out but I got the same error as above.
Also, I am also trying out TFCE correction and I've still not found the answer to my question from my previous post, so I am going to post it again here:
The TFCE example on the FieldTrip website is only for on one channel (https://www.fieldtriptoolbox.org/example/threshold_free_cluster_enhancement/) and I was wondering what it looks like scaled up for multiple channels. How would I evaluate any effects and possibly even visualise them?

I'm sorry about repeating my questions and I would really appreciate any help addressing them, thanks!
Best,
Ash




From: Bhonsle, Aishwarya
Sent: 29 April 2024 17:39
To: 'fieldtrip at science.ru.nl' <fieldtrip at science.ru.nl>
Subject: Re: [FieldTrip] Threshold free cluster enhancement for a Repeated Measures design

Hi Jan-Mathijs,
Thank you so much for your response! I have some follow-up questions:

1)    True, using F-statistics makes more sense for my design. But to clarify, you are recommending using F-statistics (ft_statfun_depsamplesFunivariate) and then doing pairwise tests for the main effects to get around the fact that the depsamplesF functions only take 1xN factorial design? Or do you mean I should continue using T-statistics, and do the pairwise tests?



2)    Thank you for pointing out that bit of documentation about testing interactions effects, I totally missed that before. All things considered now I am leaning towards not getting into interaction effects, since it doesn't seem to be recommended for my design and especially if I end up using F-statistics, these will not inform me about the pattern in the data responsible for the interaction effect. But I am still a bit uncertain as to what I should do for the main effects - should I just compare both main effects, of cycling (averaging across vis and invis, and comparing R, L, H) and of perception (averaging across R/L/H and comparing vis versus invis), just like in a two-way RM-ANOVA and leave it at that? What would you recommend?



3)    I was clearly confusing cluster based and TFCE approaches. Also, I apologise for my poor choice of wording - I have read Benedikt Ehinger's post of TFCE as well as the FieldTrip page on how not to interpret results from cluster-based permutation tests, so I do understand it doesn't make sense to talk about significant clusters. But one thing I am uncertain about - will I be able to plot an effect topographically using ft_clusterplot when I run an analysis with TFCE? Or is that only possible for other methods of correcting for multiple comparisons in cluster based permutation analyses? I am asking this because the TFCE example on the FieldTrip website is only for on one channel (https://www.fieldtriptoolbox.org/example/threshold_free_cluster_enhancement/) and I was wondering what it looks like scaled up for multiple channels. I actually tried running the TFCE analysis for all channels on the dataset used in the example but I couldn't plot the effect using ft_clusterplot. But maybe, this is something that doesn't even make sense to attempt?



4)    The reason I was asking about this analysis without a prior constraints was also to further my understanding about these analyses. I am puzzled by the fact the same test in not significant on data obtained for very similar paradigms with a very similar number of subjects. So in essence, if in the previous experiment, the cluster-based tests were not significant and we didn't have a prior constraints to limit our analysis then, we would have likely missed the effect in the time window and channels that we are now using as a prior constraints in the current experiment.



This is also relevant to me because I will also be performing a similar cluster based analysis for other parameters (e.g. heart-evoked potential amplitudes) on the same dataset, where I don't have any a priori topographical constraints, and I am wondering if there are additional tests I should perform for fear of missing out on some effect that is not evident in cluster based tests?
Best,
Ash

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20240513/8069742f/attachment.htm>


More information about the fieldtrip mailing list