<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<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;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        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>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</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'>Dear Feng,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>You can save yourself some time by running
sourceanalysis twice.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>The first time you should specify
cfg.keepfilter = ‘yes’ (and keep cfg.randomization = ‘no’).<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>This will yield a source-structure
containing a field called ‘filter’. These filters are computed
using the cross-spectral density averaged across all replications.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Subsequently you should plug these filters
into the dipole grid by specifying cfg.grid.filter = source.filter (could also
be source.avg.filter, I’m not sure, but it’s easily checked by
running the previous step). Then you should additionally specify cfg.rawtrial =
‘yes’.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>If I’m not mistaken, when you then
run sourceanalysis, this yields a source-structure containing a field called ‘trial’,
which contains for each replication the source-reconstructed data, so it has
dimensionality 1x the number of trials. Each trial itself will be a structure
containing the fields csd (which in your case will contain the cross spectral
density between the dipole at that particular location, and the reference), and
the field pow, which contains the power at that location (not the reference).<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>In subsequent analysis steps you can test
whether coherence is different across conditions. This can be done
parametrically, or non-parametrically.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Either way, I’d advise you to
collaps your data across the two conditions prior to computing your filters (so
prior to calling sourceanalysis for the first time). This yields so-called ‘common
filters’, which as I said before typically yield more robust results. The
most convenient point to achieve this, is already concatenating the data of
your two conditions prior to frequency analysis (so it should be done after
preprocessing), by calling appenddata: dataall = appenddata([], data1, data2).<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>You could then proceed to compute the
filters, using the concatenated data. Afterwards, you could call sourceanalysis
twice using the frequency-data for each of the conditions separately, yielding
source structures for each of the conditions. These can then be used as an
input to sourcedescriptives (should also be called twice). This will yield two
source structures containing an estimate of the coherence, and an estimate of
the sem of the coherence. This can then be tested parametrically with a t-test
using sourcestatistics. (It would be more correct if you correct for the bias
in the coherence estimate by applying some normalizing transform to the
coherence, see Bokil et al. J. Neurosci Methods 159(2): 337-345.)<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>You could also test non-parametrically. For
this, I’d advise you to first have a thorough look at the
statistics-tutorial on the fieldtrip-website. Moreover, you could consult Maris
et al. J. Neurosci Methods 163(1): 161-175 for a way of testing coherence
differences non-parametrically. However, doing this on the source-level is not
yet supported by fieldtrip in a standard way.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Hope this already points you in the good
direction.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Yours,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Jan-Mathijs<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> <st1:PersonName
w:st="on">FieldTrip discussion list</st1:PersonName>
[mailto:FIELDTRIP@NIC.SURFNET.NL] <b><span style='font-weight:bold'>On Behalf
Of </span></b>Rong, Feng (NIH/NIDCD) [V]<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, April 30, 2007 6:47
PM<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><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<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><o:p></o:p></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><o:p></o:p></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><o:p></o:p></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font><o:p></o:p></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><o:p></o:p></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><o:p></o:p></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>
<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>