[FieldTrip] Spatio-temporal cluster-based permutation analysis on EEG sources

Emma Holmes eh776 at york.ac.uk
Fri Oct 31 13:19:18 CET 2014

Dear all,

I am trying to perform spatio-temporal cluster statistics to the sources of
an EEG dataset, which I localised using the SPM8 toolbox.
For each participant (averaged across trials), I have a .nii image
containing the source reconstruction for each of two conditions at multiple
different time points. Each nifti file contains a matrix of 91 x 109 x 91,
which corresponds to the source estimates at each voxel.
My aim is to identify sources of activity that span large clusters of
voxels and/or time points, similar to what I have done previously with the
scalp data.

I understand that the function 'ft_sourcestatistics' should be able to
achieve this with the data output from the function 'ft_sourcegrandaverage'.
However, I am having difficulty structuring the data from the nifti files
in a format that can be successfully input to 'ft_sourcegrandaverage'.

The data that I am trying to input to 'ft_sourcegrandaverage' contains a
cell array of structures--one for each participant.
As far as I understand from the documentation, each structure should
contain a 'pos' field, which specifies the [x y z] co-ordinates for each
position in the matrix (in my case, a matrix of size 91*109*91 x 3).
I have also included a 'time' field, containing a vector of the time points
to which each .nii image corresponds and a 'dim' field containing the
vector [91 109 91].

Could you please let me know whether or not this is correct and in which
field(s) I should subsequently add the source reconstruction estimates at
each time point.
So far, I have tried including an 'avg' field with the data at each time
point (91 x 109 x 91 x ntps).
However, when I do so, I get the following error:

??? Undefined function or method 'fieldnames' for input arguments of type

Error in ==> parameterselection at 47
    tmp = fieldnames(data.avg);

Error in ==> ft_checkdata at 578
  param = setdiff(parameterselection('all', data), exclude);

Error in ==> ft_sourcegrandaverage at 81
  varargin{i} = ft_checkdata(varargin{i}, 'datatype', {'source'},
'feedback', 'no',
  'inside', 'logical', 'sourcerepresentation', 'new');

I am using matlab version (R2008b) and fieldtrip-20140415
(although I have also tried other fieldtrip versions).

Any help would be greatly appreciated.

Best wishes,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20141031/27f2e822/attachment-0001.html>

More information about the fieldtrip mailing list