<div dir="ltr"><div class="" lang="x-western"><div class="">
Dear Fieldtrippers!<br>
<br>
I am very new to MEG and have a question concerning source
analysis on the group level.<br>
<br>
Specifically, I have two consecutive problems:<br>
<br>
1) After mne source analysis (roughly as described in <a class="" href="http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate">http://fieldtrip.fcdonders.nl/tutorial/minimumnormestimate</a>)
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: <br>
<i>"Subscripted assignment dimension mismatch.</i><i><br>
</i><i>Error in ft_sourcegrandaverage (line 157)</i><i><br>
</i><i> dat(:,i) = tmp(:);</i>"<br>
Does anybody know know to handle that or why it occurs?<br>
<br>
2) I then went on without averaging and wanted to calculated
statistics, very much as described in <a class="" href="http://fieldtrip.fcdonders.nl/example/source_statistics">http://fieldtrip.fcdonders.nl/example/source_statistics</a>
in the group level section. <br>
As I could not use ft_sourcegrandaverage before, I fed in the
output from ft_sourceanalysis for all subjects behind each other,
<br>
<br>
cfg=[];<br>
%cfg.dim = sc1{1}.dim;<br>
cfg.method = 'montecarlo';<br>
cfg.statistic = 'depsamplesT';<br>
cfg.parameter = 'pow';<br>
cfg.correctm = 'cluster';<br>
cfg.numrandomization = 500; <br>
cfg.clusteralpha = 0.05;<br>
cfg.clusterstatistic = 'maxsum';<br>
cfg.alpha = 0.025;<br>
cfg.tail = 0;<br>
cfg.latency =[0, 0.6];<br>
<br>
nsubj=numel(sc1);<br>
cfg.design(1,:) = [1:nsubj 1:nsubj];<br>
cfg.design(2,:) = [ones(1,nsubj) ones(1,nsubj)*2];<br>
cfg.uvar = 1; % row of design matrix that contains unit
variable (in this case: subjects)<br>
cfg.ivar = 2; % row of design matrix that contains
independent variable (the conditions)<br>
<br>
stat = ft_sourcestatistics(cfg, sc1{1}, sc1{2}, sc1{3}, sc2{1},
sc2{2} ,sc2{3} );<br>
<br>
, where e.g. sc1{1}=time: [1x1465 double]<br>
pos: [3000x3 double]<br>
inside: [3000x1 double]<br>
outside: [1x0 double]<br>
method: 'average'<br>
avg: [1x1 struct]<br>
cfg: [1x1 struct]<br>
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<br>
pow: [3000x1465 double] <br>
However, giving now I get the error:<br>
<i>"Error using false</i><i><br>
</i><i>Out of memory. Type HELP MEMORY for your options.</i><i><br>
</i><i><br>
</i><i>Error in ft_statistics_montecarlo (line 177)</i><i><br>
</i><i> cfg.connectivity = false(size(dat,1));</i><i><br>
</i><i><br>
</i><i>Error in statistics_wrapper (line 308)</i><i><br>
</i><i> [stat, cfg] = statmethod(cfg, dat, design);</i><i><br>
</i><i><br>
</i><i>Error in ft_sourcestatistics (line 107)</i><i><br>
</i><i> [stat, cfg] = statistics_wrapper(cfg, varargin{:});</i><i>"</i><br>
Does anybody know a solution for that? What should I set cfg.dim
to, as I do not have output from ft_sourcegrandaverage?<br>
<br>
I would be really happy for any help!<br>
<br>
Best, Meike <br>
</div>
<br>
</div>
</div>