[FieldTrip] ft_freqstatistics in a 2 way ANOVA - design and implementation
Justin Tanner
justinctanner at gmail.com
Mon Oct 31 20:15:15 CET 2016
I have a dataset consisting of 6 stimulation locations and 8 stimulation
intensities. I am trying to calculate a 2 way (6 by 8) anova with regards
to those two variables.
Each input structure consists of freq_loc#{intensity#} output of
ft_freqanalysis with just the chosen 10 trials of the respective conditions
(so for location1 and intensity 1, chosen trial indices are indicated in
cfg.trials).
- cfg.keeptrials = 'yes'
cfg.design = [loc ; int ; tri]
1 1 ... 1 1 ... 1 1 ... 1 1 ... 2 2 ... 2 2 ... 2 2 ... 2 2 ... 6 6
> ... 6 6
>
1 1 ... 1 1 ... 8 8 ... 8 8 ... 1 1 ... 1 1 ... 8 8 ... 8 8 ... 8 8
> ... 8 8
>
1 2 ... 9 10 ... 1 2 ... 9 10 ... 1 2 ... 9 10 ... 1 2 ... 9 10 ...1 2 ...
> 9 10
>
*OR*
- cfg.keeptrials = 'no'
cfg.design = [loc ; int]
1 1 ... 1 1 ... 1 1 ... 1 1 ... 2 2 ... 2 2 ... 2 2 ... 2 2 ... 6 6
> ... 6 6
>
1 1 ... 1 1 ... 8 8 ... 8 8 ... 1 1 ... 1 1 ... 8 8 ... 8 8 ... 8 8
> ... 8 8
For ft_freqstatistics:
cfg.method = 'montecarlo';
>
cfg.numrandomization = 500;
cfg.correctm = 'bonferroni' % Going to do 'cluster' once I define my
> distance function for neighbors
> cfg.alpha = 0.05;
> cfg.tail = 0;
> cfg.design=design;
> cfg.statistic='indepsamplesF';
> cfg.correcttail = 'prob';
>
> % Run with LOCATION as independent variable
> cfg.ivar=[1];
> [stat_loc] = ft_freqstatistics(cfg, freq_loc0{:}, freq_loc1{:},
> freq_loc2{:}, freq_loc3{:}, freq_loc4{:}, freq_loc5{:});
% Run with INTENSITY as independent variable
> cfg.ivar=[2];
[stat_int] = ft_freqstatistics(cfg, freq_loc0{:}, freq_loc1{:},
> freq_loc2{:}, freq_loc3{:}, freq_loc4{:}, freq_loc5{:});
>
I want to ensure I am calling this appropriately. If I run it once with
cfg.ivar =1 and again with cfg.ivar = 2, is that calculating the main
effect of the cfg.design row's variable? First row is location, so running
cfg.ivar=1 is giving me a [num_chan X TFR ] stat.stat/prob/mask for
location, correct?
I feel that I am missing something that would allow for both comparisons in
one call of the ft_freqstatistics function, either in cfg properties or in
the cfg.design structuring / ft_freqanalysis output structuring.
Any clarification would be greatly appreciated.
--
Justin C. Tanner
Sensory Motor Research Group
Arizona State University
(360) 607-7544
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20161031/5e664261/attachment-0001.html>
More information about the fieldtrip
mailing list