[FieldTrip] Permutation statistics
Vitoria Piai
v.piai.research at gmail.com
Tue Mar 25 09:25:12 CET 2014
Hi Hweeling,
I'm sorry, I don't understand exactly what you mean by "within-trial"
analysis.
If you mean comparing trials within the same participant, then there are
two things you should change in your code:
cfg.statistic = 'indepsamplesT'; %% this should be indepsamplesT
rather than depsamplesT
cfg.uvar = 1; %%% Remove this line from your configuration
cfg.ivar = 1; %% the indep. var here should be 1, rather than 2
Maybe your design will also need some adjustment, I'm not so sure (I
don't use indepsamplesT that much). In any case, it could help to have a
look at:
http://fieldtrip.fcdonders.nl/tutorial/cluster_permutation_timelock?s[]=indepsamplest
If you want a cleaner code, you can also remove all these lines (they
should be default):
cfg.channel = 'all';
cfg.latency = 'all';
cfg.trials = 'all';
cfg.frequency = 'all';
I hope this works, otherwise email the list again.
Good luck, Vitória
On 3/23/2014 3:19 PM, Hwee Ling Lee wrote:
> Dear Vitoria,
>
> Thanks for the tip.
>
> I'm trying to perform a within-trial analysis.
>
> I've got two sets of data, before and after resting state EEG
> activity. First set has 54 trials and second set has 51 trials. Hence,
> my cfg.design = [ones(1, 105); ones(1,54), ones(1,51)*2].
>
> I've set up the statistical analysis like this:
>
> cfg = [];
> cfg.layout = lay;
> cfg.channel = 'all';
> cfg.latency = 'all';
> cfg.trials = 'all';
> cfg.frequency = 'all';
> cfg.avgovertime = 'no';
> cfg.avgoverfreq = 'no';
> cfg.avgoverchan = 'no';
> cfg.parameter = 'powspctrm';
> cfg.method = 'montecarlo';
> cfg.statistic = 'depsamplesT';
> cfg.numrandomization = 1000;
> cfg.design = design;
> cfg.uvar = 1;
> cfg.ivar = 2;
> [stat] = ft_freqstatistics(cfg, post_c200freq, pre_c200freq);
>
> However, I got an error message:
>
> Error using ft_statfun_depsamplesT (line 84)
> Invalid specification of the design array.
>
> Error in ft_statistics_montecarlo (line 285)
> [statobs, cfg] = statfun(cfg, dat, design);
>
> Error in ft_freqstatistics (line 323)
> [stat, cfg] = statmethod(cfg, dat, cfg.design);
>
> Can someone please tell me what parameters did I specify wrongly? Thanks.
>
> Best wishes,
> Hweeling
>
>
>
>
> On 21 March 2014 20:10, Vitória Piai <v.piai.research at gmail.com
> <mailto:v.piai.research at gmail.com>> wrote:
>
> Dear Hweeling,
>
> There is nothing inherent to the ft_freqstatistics function that
> makes it special for MEG, rather than for EEG data. If you've been
> using other FieldTrip functions, you probably have used
> cfg.channel before. These are the channels present in your EEG data.
> How you should set some of the other parameters depends only on
> your design, not on whether the data are from MEG or EEG.
> Maybe you can specify what is unclear to you when calling the
> function so that you can get appropriate help!
>
> Good luck, Vitoria
>
>
> On 3/21/2014 3:36 PM, Hwee Ling Lee wrote:
>>
>> Dear all,
>>
>> I've got EEG datasets for 64 channels, and I would like to
>> perform permutation statistics on the power frequency analyses to
>> compare the two conditions (before and after resting state periods).
>>
>> However, I'm not sure how to operationalise the statistical
>> analyses since most of the examples on the website are for MEG
>> datasets.
>>
>> I would appreciate very much if someone could help me on this!
>> Thanks!
>>
>> Cheers,
>> Hweeling
>>
>>
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl <mailto:fieldtrip at donders.ru.nl>
>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>
>
>
> --
> =================================================
> Dr. rer. nat. Lee, Hwee Ling
> Postdoc
> German Center for Neurodegenerative Diseases (DZNE) Bonn
>
> Email 1: hwee-ling.lee<at>dzne.de <http://dzne.de>
> Email 2: hweeling.lee<at>gmail.com <http://gmail.com>
>
> https://sites.google.com/site/hweelinglee/home
>
> Correspondence Address:
> Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany
> =================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140325/6c06717d/attachment.html>
More information about the fieldtrip
mailing list