[FieldTrip] ft_timelockstatistics

Eelke Spaak eelke.spaak at donders.ru.nl
Tue Jan 21 09:36:04 CET 2014

Dear Raghavan,

The statistics routines (specifically, the cluster statistics) need
each individual observation, and not just the grand average. If your
grand average data structure was generated with cfg.keepindividual =
'yes', then this should be fine. If you did not specify this, then it
will only contain the average (and possibly the variance), and you
would need to either rerun ft_timelockgrandaverage, or input the
individual data structures into ft_timelockstatistics directly. The
latter is nowadays the recommended approach; you use it e.g. like so:

ft_timelockstatistics(cfg, condA{:}, condB{:});

where condA and condB are cell arrays with the timelocked structures
for each subject.

Even if you do have a grandaverage with cfg.keepindividual = 'yes',
the statistics routine still needs one input argument per condition.
So if you want to compare two time intervals in the same structure,
you need to separate them first e.g. like so:

cfg = [];
cfg.latency = [0 1];
condA = ft_selectdata(cfg, bigstructure);

cfg = [];
cfg.latency = [1 2];
condB = ft_selectdata(cfg, bigstructure);


On 20 January 2014 23:07, Raghavan Gopalakrishnan <gopalar.ccf at gmail.com> wrote:
> I have a grand averaged data structure that has two conditions. For example,
> two evoked responses 1 sec apart. I have not saved them as separate data
> structures. Is there a way to run statistics to compare one evoked response
> over another within the same data structure with different latencies? or is
> it necessary to create two grand averaged data structures one for each
> evoked response.
> Thanks,
> Raghavan
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

More information about the fieldtrip mailing list