<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Dear Mick,<br>
<br>
The designmatrix looks fine to me.<br>
I have not idea what might go wrong, but if I were you I would do the following checks:<br>
<br>
1) Calculate the difference of the TFRs by subtracting the two (manually or with ft_math) after you did the baselinecorrection for each - i.e. exactly what you were giving to freqanalysis. Then plot the results using topoplotTFR without any baseline in the
configuration of topoplotTFR. This should tell you whether the right stuff is going into freqstatistics.<br>
<br>
2) First do the freqanalysis without averaging over frequencies or using any clustering. Then plot the t-values (of every time-frequency point) using ft_topoplotTFR.
<br>
<br>
This should give you a good first idea whether the statistics are behaving as you would expect.
<br>
<br>
Hope this helps,<br>
Stephen<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF209579"><font face="Tahoma" color="#000000" size="2"><b>From:</b> fieldtrip-bounces@science.ru.nl [fieldtrip-bounces@science.ru.nl] on behalf of mick.lehmann@uzh.ch [mick.lehmann@uzh.ch]<br>
<b>Sent:</b> 29 July 2015 12:48<br>
<b>To:</b> fieldtrip@science.ru.nl<br>
<b>Subject:</b> Re: [FieldTrip] Baseline Correction using 'relchange' or 'db'<br>
</font><br>
</div>
<div></div>
<div><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2">
<div style="font-family:'Sans Serif',Verdana,Arial,Helvetica,sans-serif; font-size:small">
<span style="font-size:12.8000001907349px; font-family:Verdana,Arial,Helvetica,sans-serif">Dear Stephan,</span></div>
<div style="font-size:small"><br>
</div>
<div style="font-size:small">the whole script with the designmatrix looks as follows. It is a within-subject design with two conditions. </div>
<div style="font-family:'Sans Serif',Verdana,Arial,Helvetica,sans-serif; font-size:small">
<div><font face="Verdana, Arial, Helvetica, sans-serif"><br>
</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">load </font><span style="font-family:Verdana,Arial,Helvetica,sans-serif; font-size:12.8000001907349px">ga_TFCond1</span></div>
<div><span style="font-family:Verdana,Arial,Helvetica,sans-serif; font-size:12.8000001907349px">load </span><span style="font-family:Verdana,Arial,Helvetica,sans-serif; font-size:12.8000001907349px">ga_TFCond2</span></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">load neighbours</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif"><br>
</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">cfg = [];</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">cfg.channel = 'all';</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">cfg.latency = [0 2];</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">cfg.avgovertime = 'yes';</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">cfg.frequency = [5 7];</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">cfg.avgoverfreq = 'yes';</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">cfg.method = 'montecarlo'; </font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">cfg.statistic = 'ft_statfun_depsamplesT';</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">cfg.correctm = 'cluster';</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">cfg.clusteralpha = 0.05;</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">cfg.clusterstatistic = 'maxsum';</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">cfg.minnbchan = 2;</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">cfg.tail = 0;</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">cfg.clustertail = 0;</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">cfg.alpha = 0.05;</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">cfg.numrandomization = 500;</font></div>
<div><span style="font-family:Verdana,Arial,Helvetica,sans-serif; font-size:12.8000001907349px">cfg.neighbours = neighbours;</span></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif"><br>
</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif"><br>
</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">subj = 20;</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">design = zeros(2,2*subj);</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">for i = 1:subj</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif"> design(1,i) = i;</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">end</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">for i = 1:subj</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif"> design(1,subj+i) = i;</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">end</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">design(2,1:subj) = 1;</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">design(2,subj+1:2*subj) = 2;</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif"><br>
</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">cfg.design = design;</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">cfg.uvar = 1;</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">cfg.ivar = 2;</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif"><br>
</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif"><br>
</font></div>
<div><font face="Verdana, Arial, Helvetica, sans-serif">stat = ft_freqstatistics(cfg, ga_TFCond1, gaTF_Cond2);</font></div>
</div>
<div style="font-family:'Sans Serif',Verdana,Arial,Helvetica,sans-serif; font-size:small">
<font face="Verdana, Arial, Helvetica, sans-serif"><br>
</font></div>
<div style="font-family:'Sans Serif',Verdana,Arial,Helvetica,sans-serif; font-size:small">
<font face="Verdana, Arial, Helvetica, sans-serif"><br>
</font></div>
<div style="font-family:'Sans Serif',Verdana,Arial,Helvetica,sans-serif; font-size:small">
<font face="Verdana, Arial, Helvetica, sans-serif">Thanks a lot for your efforts!</font></div>
<div style="font-family:'Sans Serif',Verdana,Arial,Helvetica,sans-serif; font-size:small">
<font face="Verdana, Arial, Helvetica, sans-serif"><br>
</font></div>
<div style="font-family:'Sans Serif',Verdana,Arial,Helvetica,sans-serif; font-size:small">
<font face="Verdana, Arial, Helvetica, sans-serif">Kind regards,</font></div>
<div style="font-family:'Sans Serif',Verdana,Arial,Helvetica,sans-serif; font-size:small">
<font face="Verdana, Arial, Helvetica, sans-serif">Mick</font></div>
<div></div>
</font></div>
</div>
</div>
</body>
</html>