[FieldTrip] Design Matrix for 2 by 2 interaction in cluster-based permutation

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Tue Sep 15 07:39:06 CEST 2020


Hi Cay,

There’s a small typo in the cfg that you pass to ft_freqstatistics: cfg.uvar should read cfg.ivar.

Best wishes,
Jan-Mathijs


On 15 Sep 2020, at 06:30, Lee, Kyoung Eun <klee773 at gatech.edu<mailto:klee773 at gatech.edu>> wrote:

Hello FieldTrip users,

I want to test an interaction effect using cluster-based permutation test.
In my study, I have a between-subject conditions (older adults vs. younger adults) and a within-subject conditions(Hit vs. Miss). Therefore, it is 2 x 2 design.
I’ve tried to follow this tutorial (http://www.fieldtriptoolbox.org/faq/how_can_i_test_an_interaction_effect_using_cluster-based_permutation_tests/), but it gave an error.
I think my design matrix might be the problem.

First, I made two difference data structure like : Older adults (Hit-Miss difference) & Younger adults (Hit-Miss difference).
And let’s say I have 8 older adults and 12 younger adults. So I made my design matrix as : [1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 ]
And set the cfg.uvar = 1;  cfg.statistic    = 'indepsamplesT';
However, when I ran it, it gave me an error as below:

Error using ft_notification (line 314)
A within-units shuffling requires a at least one unit variable and at least one independent variable

Error in ft_error (line 39)
  ft_notification(varargin{:});

Error in resampledesign (line 168)
  ft_error('A within-units shuffling requires a at least one unit variable and at least one independent variable');

Error in ft_statistics_montecarlo (line 213)
resample = resampledesign(cfg, design);

Error in ft_freqstatistics (line 194)
    [stat, cfg] = statmethod(cfg, dat, design);

In this case, how can I get a result?
Thank you for your help in advance.

Best,
Cay
_______________________________________________
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/20200915/592ce30e/attachment.htm>


More information about the fieldtrip mailing list