Hello,<br><br>we are working with the ft_sourcestatistics function and we are facing some problems. <br><br><br>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. <br>
<br>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. <br>
<br>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.<br><br>I would be very very pleased if somebody could help me with that issue, I've been working on this for a while now.<br>
<br><br><br>I have uploaded the data to the recommended filehoster:<br>
<br>
<a href="http://www.sendspace.com/filegroup/sJhI%2F5uBRdJI6JGXUjWtPA">http://www.sendspace.com/filegroup/sJhI%2F5uBRdJI6JGXUjWtPA</a><br>
<br>
There are two files that belong together, you can extract them and there
will be a .mat structure, the m-files and three pictures.<br>
<br><br><br>Thanks, Martin<br><br>I post the code as an attachment to this email: <br><br>function calc_stat( ~ )<br>%%UNTITLED2 Summary of this function goes here<br>% Detailed explanation goes here<br><br>%path to grandAVG mat-file<br>
load ('/media/sonja1/MatlabAnalysis/Martin/SEF/sourcestatistics/GrandAVG/grandAVG.mat'); <br>sourcePost = GA_RIGHT;<br>sourcePre = GA_LEFT;<br><br>%%<br>% configfile for calculating the statistics<br>cfg = [];<br>
cfg.channel = {'MEG'};<br>cfg.latency = [0 1];<br><br>cfg.parameter = 'pow';<br>cfg.dim = sourcePre.dim;<br><br>cfg_neighb.method = 'template';<br>cfg.template = 'CTF275_neighb.mat';<br>
cfg.neighbours = ft_prepare_neighbours(cfg_neighb, GA_RIGHT.nei);<br><br>cfg.method = 'montecarlo';<br>cfg.statistic = 'depsamplesT';<br>cfg.correctm = 'cluster';<br><br>cfg.tail = 0; % -1, 1 or 0 (default = 0); one-sided or two-sided test<br>
cfg.clusteralpha = 0.05; % alpha level of the sample-specific test statistic that will be used for thresholding<br>cfg.clusterstatistic = 'maxsum'; % test statistic that will be evaluated under the permutation distribution.<br>
cfg.minnbchan = 2; % minimum number of neighborhood channels that is required for a selected<br>cfg.clustertail = 0;<br>cfg.alpha = 0.025; % alpha level of the permutation test<br>cfg.numrandomization = 100; % number of draws from the permutation distribution<br>
<br><br>nsubj=length(sourcePre.trial);<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, sourcePost, sourcePre);<br><br>%%<br>%Plot the statistics<br>cfg = [];<br>cfg.method = 'ortho';<br>
cfg.interactive = 'yes';<br>cfg.funparameter = 'stat';<br>%stat.mask = ones(stat.dim);<br>cfg.maskparameter = 'mask';<br>%cfg.maskparameter = 'mask';<br>cfg.funcolorlim = [-10 10];<br><br>
cfg.opacitymap = 'vdown';<br>cfg.opacitylim = 'maxabs';<br><br><br>cfg.anatomy = GA_RIGHT.anatomy;<br>stat.anatomy = GA_RIGHT.anatomy;<br><br>figure<br>ft_sourceplot(cfg, stat)<br><br>end<br><br><br>