<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Martin,<div><br></div><div>Sometimes it might be useful to decrease the cluster alpha p value (e.g. 0.01). This prevents too much clustering and favors your strong effects. Maybe this helps.</div><div><br></div><div>Best,</div><div><br></div><div>Stephan</div><div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><div>________________________________________________________</div><div>Stephan Moratti, PhD<br><br></div><div>see also: <a href="http://web.me.com/smoratti/">http://web.me.com/smoratti/</a><br><br></div><div>Universidad Complutense de Madrid</div><div>Facultad de Psicología</div><div>Departamento de Psicología Básica I</div><div>Campus de Somosaguas</div><div>28223 Pozuelo de Alarcón (Madrid)</div><div>Spain</div><div><br></div><div>and</div><div><br></div><div>Center for Biomedical Technology</div><div>Laboratory for Cognitive and Computational Neuroscience</div><div>Parque Científico y Tecnológico de la Universidad Politecnica de Madrid<br>Campus Montegancedo</div><div>28223 Pozuelo de Alarcón (Madrid)</div><div>Spain<br><br><br>email: <a href="mailto:smoratti@psi.ucm.es">smoratti@psi.ucm.es</a><br>Tel.: +34 679219982</div></div></span>
</div>
<br><div><div>El 27/01/2012, a las 16:42, Martin Winkels escribió:</div><br class="Apple-interchange-newline"><blockquote type="cite">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>
_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote></div><br></div></body></html>