[FieldTrip] Sourcestatistics - Problem
Martin Winkels
m_wink10 at uni-muenster.de
Fri Jan 27 16:42:09 CET 2012
Hello,
we are working with the ft_sourcestatistics function and we are facing some
problems.
We got some very well known data, our subjects just have been stimulated
left and right hand. We are calculating right vs left hand data. The
calculated GrandAVG-data looks very good, you can see this in the attached
files. (GAVG_LEFT and GAVG_RIGHT). We got activity in the left and right
brain hemisphere, localized at single spot.
Now I wanted to calculate a statistic for this subject and I got some weird
results. If you look up the file statplot.jpg you can see that the positive
cluster looks quite okay but the negative cluster only looks good in the
upper right corner but then it is distributed all over the brain till the
lower left corner.
Based on the GAVG-results this cant be. I also attached the data itself and
a script to show the GAVG data as well as the script to calculate the data.
I would be very very pleased if somebody could help me with that issue,
I've been working on this for a while now.
I have uploaded the data to the recommended filehoster:
http://www.sendspace.com/filegroup/sJhI%2F5uBRdJI6JGXUjWtPA
There are two files that belong together, you can extract them and there
will be a .mat structure, the m-files and three pictures.
Thanks, Martin
I post the code as an attachment to this email:
function calc_stat( ~ )
%%UNTITLED2 Summary of this function goes here
% Detailed explanation goes here
%path to grandAVG mat-file
load
('/media/sonja1/MatlabAnalysis/Martin/SEF/sourcestatistics/GrandAVG/grandAVG.mat');
sourcePost = GA_RIGHT;
sourcePre = GA_LEFT;
%%
% configfile for calculating the statistics
cfg = [];
cfg.channel = {'MEG'};
cfg.latency = [0 1];
cfg.parameter = 'pow';
cfg.dim = sourcePre.dim;
cfg_neighb.method = 'template';
cfg.template = 'CTF275_neighb.mat';
cfg.neighbours = ft_prepare_neighbours(cfg_neighb, GA_RIGHT.nei);
cfg.method = 'montecarlo';
cfg.statistic = 'depsamplesT';
cfg.correctm = 'cluster';
cfg.tail = 0; % -1, 1 or 0 (default = 0); one-sided or
two-sided test
cfg.clusteralpha = 0.05; % alpha level of the sample-specific test
statistic that will be used for thresholding
cfg.clusterstatistic = 'maxsum'; % test statistic that will be evaluated
under the permutation distribution.
cfg.minnbchan = 2; % minimum number of neighborhood channels
that is required for a selected
cfg.clustertail = 0;
cfg.alpha = 0.025; % alpha level of the permutation test
cfg.numrandomization = 100; % number of draws from the permutation
distribution
nsubj=length(sourcePre.trial);
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, sourcePost, sourcePre);
%%
%Plot the statistics
cfg = [];
cfg.method = 'ortho';
cfg.interactive = 'yes';
cfg.funparameter = 'stat';
%stat.mask = ones(stat.dim);
cfg.maskparameter = 'mask';
%cfg.maskparameter = 'mask';
cfg.funcolorlim = [-10 10];
cfg.opacitymap = 'vdown';
cfg.opacitylim = 'maxabs';
cfg.anatomy = GA_RIGHT.anatomy;
stat.anatomy = GA_RIGHT.anatomy;
figure
ft_sourceplot(cfg, stat)
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120127/46a2e738/attachment-0001.html>
More information about the fieldtrip
mailing list