[FieldTrip] source analysis on the group level

Meike Schweisfurth meschwe at gmail.com
Tue Apr 1 14:12:20 CEST 2014


 Dear Fieldtrippers!

I am very new to MEG and have a question concerning source analysis on the
group level.

Specifically, I have two consecutive problems:

1) After mne source analysis (roughly as described in
http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate) for individual
subjects and for two different conditions, I would like to combine the data
between subjects for each condition (using the same grid for all of them).
However, I keep getting the following error:
*"Subscripted assignment dimension mismatch.*
*Error in ft_sourcegrandaverage (line 157)*
*    dat(:,i) = tmp(:);*"
 Does anybody know know to handle that or why it occurs?

2) I then went on without averaging and wanted to calculated statistics,
very much as described in
http://fieldtrip.fcdonders.nl/example/source_statistics in the group level
section.
As I could not use ft_sourcegrandaverage before, I fed in the output from
ft_sourceanalysis for all subjects behind each other,

cfg=[];
%cfg.dim         = sc1{1}.dim;
cfg.method      = 'montecarlo';
cfg.statistic   = 'depsamplesT';
cfg.parameter   = 'pow';
cfg.correctm    = 'cluster';
cfg.numrandomization = 500;
cfg.clusteralpha = 0.05;
cfg.clusterstatistic = 'maxsum';
cfg.alpha       = 0.025;
cfg.tail        = 0;
cfg.latency =[0, 0.6];

nsubj=numel(sc1);
cfg.design(1,:) = [1:nsubj 1:nsubj];
cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2];
cfg.uvar        = 1; % row of design matrix that contains unit variable (in
this case: subjects)
cfg.ivar        = 2; % row of design matrix that contains independent
variable (the conditions)

stat = ft_sourcestatistics(cfg, sc1{1}, sc1{2}, sc1{3}, sc2{1}, sc2{2}
,sc2{3} );

, where e.g.        sc1{1}=time: [1x1465 double]
                    pos: [3000x3 double]
                    inside: [3000x1 double]
                    outside: [1x0 double]
                    method: 'average'
                    avg: [1x1 struct]
                    cfg: [1x1 struct]
First, I got an error saying that I do not have a field 'pow', which I had
entered as cfg.parameter   = 'pow', although that field was only hidden in
sc1{}.avg.pow. To circumvent that error, I then copied the avg.pow data to
an extra field pow and the error was gone
                    pow: [3000x1465 double]
However, giving now I get the error:
*"Error using false*
*Out of memory. Type HELP MEMORY for your options.*

*Error in ft_statistics_montecarlo (line 177)*
*      cfg.connectivity = false(size(dat,1));*

*Error in statistics_wrapper (line 308)*
*    [stat, cfg] = statmethod(cfg, dat, design);*

*Error in ft_sourcestatistics (line 107)*
*    [stat, cfg] = statistics_wrapper(cfg, varargin{:});**"*
Does anybody know a solution for that? What should I set cfg.dim to, as I
do not have output from ft_sourcegrandaverage?

I would be really happy for any help!

Best, Meike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140401/f6180645/attachment.html>


More information about the fieldtrip mailing list