[FieldTrip] ft_sourcestatistics and sourcegrandaverage time series

jan-mathijs schoffelen jan.schoffelen at donders.ru.nl
Tue Jan 14 07:52:09 CET 2014

Hi Kaelasha,

You actually don't need to use ft_sourcegrandaverage if your goal is to do statistics. Ft_sourcestatistics in principle knows how to deal with multiple inputs.
rather than doing

cfg = [];
cfg.keepindividual = 'yes';
grandavg = ft_sourcegrandaverage(cfg, subjectdata{:});

you can do something like this

cfg = your cfg to ft_sourcestatistics
stat = ft_sourcestatistics(cfg, grandavg{:});

Now, the question boils down to 'how to fool ft_sourcestatistics to swallow my data?'.

The following should more or less work (but requires some manual labour):

The time courses at the voxel level are present in source.avg.mom. These are most likely 3xN, 3 dipole orientations times N time points. In order to reduce this, one can project the orientation along the first pca-axis. This can be achieved by a call to ft_sourcedescriptives with cfg.projectmom='yes', or by calling ft_sourceanalysis in the first place with cfg.fixedori = 'yes'. 
Then, you could do something like:

pow = zeros(size(source.pos,1),length(source.time);
pow(source.inside,:) = cat(1,source.avg.mom{source.inside});
source.avg.pow = pow;

Just to be sure, add a time-axis to the source structure, i.e. source.time = tlck.time (tlck being the data structure used to create the lcmv-output).

I think this should bring you close to doing statistics.


On Jan 14, 2014, at 7:19 AM, Kaelasha Tyler wrote:

> Hi all,
> Reading through the discussion list, I see others have also had some issues with creating grand averaged source space time series (ERFs) and subsequent statistical analysis,  but I can't see any solutions....
> Questions:
> How can I create time series (ERFs) for grand averaged source space data?
> And, how can I do cluster analysis on these (yet to be created) grand averaged source  space ERFs?
> I have used ft_SOURCEANALYSIS with method 'lcmv' for individual participants to generate source space time series, in data.avg.mom.
> Subsequently I used ft_sourcegrandaverage to combine source space data across subjects. 
> However my grand averaged source data.avg only contains 'pow' and no 'mom'. Eg, no time series for the grand averaged source space data. 
> As such, I can not do cluster analysis on grand averaged ERFs in source space.
> It appears that ft_sourcestatistics only works with parameters that have not more than one value per grid point (e.g. pow, nai etc) and is unable to work with ERF time series? Is this true?
> Can any one help with this?
> Much obliged.
> Kaelasha
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

Jan-Mathijs Schoffelen, MD PhD 

Donders Institute for Brain, Cognition and Behaviour, 
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands

Max Planck Institute for Psycholinguistics,
Nijmegen, The Netherlands

J.Schoffelen at donders.ru.nl
Telephone: +31-24-3614793


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140114/43a87a02/attachment-0002.html>

More information about the fieldtrip mailing list