[FieldTrip] indepsamplesF with sourcestatistics

Frederic Roux fredericroux at hotmail.de
Sun Mar 18 15:51:21 CET 2012

Dear all,

I noticed that the result of sourcestatistics can be quite different when using cfg.statistic = 'indepsamplesF'
or also cfg.statistic ='indepsamplesregrT', depending on whether you specify a unit of observations (UO's)
variable in the design matrix or not.

For example when running the code without the UOs-variable as following

cfg.design(1,:) = [ones(1,length(indx1)) 2*ones(1,length(indx1)) 3*ones(1,length(indx1)) 4*ones(1,length(indx1))];
cfg.ivar = 1;

I get a different result than if I run:

cfg.design(1,:) = [ones(1,length(indx1)) 2*ones(1,length(indx2)) 3*ones(1,length(indx3)) 4*ones(1,length(indx4))];
cfg.design(2,:) = [indx1' indx2' indx3' indx4'];
cfg.ivar = 1;

cfg.uvar = 2;

Note that in the second case the indexes in the UOs variable are not sorted.

I guess that you are not supposed to run the code as in the second case,
but I would still like to know why I get different results. Shouldn't it be the same anyways?

It would be great to get an explanation for the discrepancy between both codes.


Frédéric Roux, PhD student
Department of Neurophysiology
Max Planck Institute for Brain Research
D-60529 Frankfurt am Main
Frederic.Roux at brain.mpg.de

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120318/c391e704/attachment-0001.html>

More information about the fieldtrip mailing list