<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Jeff,<div><br><div><blockquote type="cite">First, a clarification question: If I leave 'baseline' unspecified,
does newtimef use
the mean across the entire time window for each frequency as the
baseline?</blockquote><div><br></div><div>No, newtimef uses by default the pre-stimulus period.</div><br><blockquote type="cite">If I have this right, it seems like the appropriate thing
to do would be to set 'baseline' to 'NaN' for both the delay and the
ITI, and then do the subtraction using these "raw" power values.
However, when I do this, I notice that all the power values (the values
in 'ersp') I get for either the delay period or ITI (before doing the
baseline subtraction) are negative, although the overall pattern looks
very similar to what I get when I use comparable settings using the
ft_freqanalysis routines in fieldtrip, just shifted down by some amount. Is it normal for the output to be negative, or is this just something weird happening with my data or analysis pipeline?<br></blockquote><div><br></div><div>No, the output should not be negative. The difference with Fieldtrip might be the scaling. When using a baseline, the default scaling in EEGLAB is dB although you can also use percentage of baseline or z-score.</div><div><br></div><div>Your Fieldtrip code uses multitaper it seems which is another difference (it is FFT in your newtimef call below). You may use multitaper in EEGLAB using the old timef function.</div><div><br></div><div>Best regards,</div><div><br></div><div>A. Delorme</div><div><br></div><blockquote type="cite">[ersp,itc,powbase,times,freqs,<div id=":1y6">tfdata] = pop_newtimef(EEG, 1, chan, [-500 3500], 0, ...<br>
'type','phasecoher','padratio',4,
'timesout',100,'plotphase','off','plotersp','off','plotitc','off','freqs',[5
30],'baseline',NaN);<br><br>
%%<br>
<br>
And what I think is the approximately equivalent procedure in Fieldtrip
(some specifics are likely different, such as the number of cycles used
to estimate power for each frequency--I'm not sure exactly how to
specify this when using Hanning windows in eeglab--and the time steps):<br>
<br>%%<br>
cfg = [];<br>
cfg.output = 'pow';<br>
cfg.channel = 'all';<br>
cfg.method = 'mtmconvol';<br>
cfg.taper = 'hanning';<br>
cfg.foi = 5:30;<br>
cfg.t_ftimwin = 3./cfg.foi; %3 cycles per freq<br>
cfg.toi = -.5:0.05:3.5; % 50 ms window<br>
cfg.keeptrials = 'no';<br><br> TFRHann = ft_freqanalysis(cfg,data);<br><br>%%<br><br>I think this about covers it. Any help would be greatly appreciated.<br><br>Thanks,<br><font color="#888888">Jeff</font></div></blockquote></div></div></body></html>