<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 10 (filtered)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
span.emailstyle17
{font-family:Arial;
color:navy;}
span.EmailStyle18
{font-family:Arial;
color:navy;}
span.EmailStyle19
{font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body bgcolor=white lang=EN-US link=blue vlink=blue>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Jan-Mathijs,</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thanks for the comprehensive feedback. It
is really helpful. I have downloaded the new version and will try.</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>As you have predicted, this procedure is
time-consuming. May I know what can I do to revise the script so that I can save
some time? </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Best,</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Feng</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> Jan Mathijs Schoffelen
[mailto:Jan.Schoffelen@FCDONDERS.RU.NL] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Saturday, April 28, 2007
11:32 AM<br>
<b><span style='font-weight:bold'>To:</span></b> FIELDTRIP@NIC.SURFNET.NL<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [FIELDTRIP] dics
method for coherence analysis</span></font></p>
<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>Dear Feng,</span></font></p>
<p class=MsoNormal style='margin-left:.5in'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>I see that you use the
following configuration for your frequency-analysis: channels with the dics
method, following is my script:</span></font></p>
<p class=MsoNormal style='margin-left:.5in'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg
= [];</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.method='mtmfft';</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.ouput='powandcsd';</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.keeptrials='yes';</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.taper='dpss';</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.tapsmofrq=4;</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.foilim
=[8 12];</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.sgncmb
= channelcombination({'MEG','MEG'},bldata.label);</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>blfreq
= freqanalysis(cfg,bldata);</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>clear
bldata</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>This in itself is OK, but given the fact that you use cfg.sgncmb
instead of cfg.channelcmb, you seem to use an old version of the freqanalysis
function (with old syntax, but newer versions are backward-compatible with
respect to these formulations). I’m not sure, but the tutorial
documentation on the fieldtrip-website, as well as the help content of the
respective m-file should contain the most up-to-date info about the proper
configuration terminology (provided you have the most up-to-date version of
fieldtrip). I would advise anyhow to get the latest version (see below as
well).</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>For the sourceanalysis you use the following configuration:</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg
= [];</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.grid
= source2sparse(ldf); % Only consider gridpoints within head volume </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.method
= 'power'; </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.refdip=refdip;
</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.numrandomization
= 100; </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.randomization
= 'yes'; </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.projectnoise
= 'yes'; </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.lambda
= 0; </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.hdmfile
= headmodel; </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.frequency
= (foi(1)+foi(2))/2; </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.keepleadfield
= 'no';</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.feedback
= 'none'; </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>[sourceRand]
= sourceanalysis(cfg, eoifreq, blfreq);</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>I don’t see why this shouldn’t work but it is
computationally very demanding (as you might have noticed), because you
recompute for each randomization two volumes based on two sets of newly
computed spatial filters (for each of the shuffled conditions). Moreover, in
your comparison between the baseline and your epoch of interest (of your
observed data), you compute two sets of spatial filters as well. Our experience
however is, that source reconstruction is more robust (and computationally less
expensive, and interpretation-wise less complicated) when you use common
filters, i.e. collapsing the cross-spectral densities for the baseline and the
active condition (even though there might be a clear difference between the
conditions, e.g. dipoles switching on or off). </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>Either way, you betray yourself using an old version of fieldtrip
by specifying cfg.method = ‘power’, which should be cfg.method =
‘dics’.</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg=[];</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.comparestat
= 'relchange' ;</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.method
= 'randomization' ;</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.parameter
= 'coh' ;</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>cfg.approach
= 'parametric';</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>sourcestat
= sourcestatistics(cfg,sourceRand);</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=navy face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:navy'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>Again, this configuration is a relic from old times, and you should
use the function sourcedescriptives to get what you want (given your preceding
steps). I guess, that your variable sourceRand contains the fields avgA, avgB,
and trialA, and trialB. If you look into the code (of the latest
sourcedescriptives.m) you should be able to get an idea of what’s going
on there. </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'>I
found in the output variable sourceRand subfield ‘pow’ and
‘coh’, which one shall I use for statistical analysis? I assume it
should be ‘coh’, then what does ‘pow’ stand for? Is it
the psd with the target frequency range for each virtual channel? Then will the
‘pow’ values be different from the computation without specifying
reference virtual channel in the script?</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>Indeed, pow stands for the power at the specified voxels. This
shouldn’t change when you use a reference channel.</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>Yours,</span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'> </span></font></p>
<p class=MsoNormal style='margin-left:.5in;text-autospace:none'><font size=2
color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>Jan-Mathijs</span></font></p>
</div>
</body>
</html>
_______________________________________________
The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.
http://listserv.surfnet.nl/archives/fieldtrip.html
http://www.ru.nl/fcdonders/fieldtrip/
<p>----------------------------------</p>
<p>The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.</p>
<p> http://listserv.surfnet.nl/archives/fieldtrip.html</p>
<p> http://www.ru.nl/fcdonders/fieldtrip/</p>
<p>----------------------------------</p>
<p>The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.</p>
<p> http://listserv.surfnet.nl/archives/fieldtrip.html</p>
<p> http://www.ru.nl/fcdonders/fieldtrip/</p>