sourcestatistics question

Robert Oostenveld r.oostenveld at FCDONDERS.RU.NL
Tue Jul 25 12:29:23 CEST 2006

```Hi Floris,

On 25 Jul 2006, at 10:24, Floris de Lange wrote:
> I have a question concerning sourcestatistics.
> I have calculated the source localization using DICS for 11
> individual subjects. Now I would like to test for the significance
> of the sources using sourcestatistics. The examples I find in the
> tutorial are about checking for significance within one subject by
> shuffling the individual trials. However, what I would like to do
> is to do the statistics on the 2nd level (subject), and to test for
> the consistency of the source reconstructions across subjects.
> Is this possible with sourcestatistics?

Yes, that is possible.

> If so, how should I feed the data to sourcestatistics? If I say
> something like stats = sourcestatistics(cfg,sources{1:11}) where
> each source{} is a normalized source (calculated by sourceanalysis,
> normalized with sourceinterpolate), it complains (rightfully) that
> there's a reference to the non-existing field 'statistic'.

Assuming you want to use a randomization test to get a Monte-Carlo
estimate of the probability of your null-hypothesis
(cfg.method='montecarlo'), cfg.statistic should be a string
describing the statistic whose randomization distribution you want to
compute. See the help of statistic_montecarlo.

Furthermore, the hypothesis that you want to test is about two
conditions. That means that the two conditions both should be fed
into sourcestatistics, e.g. something like

for i=1:11
read data from condition 1 for each subject
cond1{i} = sourceanalysis(...)
cond1{i} = sourceinterpolate(...)
cond1{i} = volumenormalize(...)
read data from condition 2 for each subject
cond2{i} = sourceanalysis(...)
cond2{i} = sourceinterpolate(...)
cond2{i} = volumenormalize(...)
end

cfg = []
cfg.design = [1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2    %
condition number
1 2 3 4 5 .....       1 2 3 4 5 ....       ]   %
subject number
cfg.method = 'montecarlo'
cfg.statistic = 'depsamplesT'
cfg.ivar = 1; % row with the independent variable (condition) in the
design
cfg.uvar = 2; % row with the unit of observation (subject) in the
design matrix
stat = sourcestatistics(cfg, cond1{:}, cond2{:});

It is also possible to do other tests, which are more in line with a
2nd level analysis (e.g. compute t-maps per subject and test over
subjects). It is better to discuss those face-to-face.

best regards,
Robert

```