<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Hweeling,<div><br></div><div>sorry to have been so unclear.</div><div>Unfortunately, you'll have to leave the prepared field trip code a bit to compute the phase deviance.</div><div>What you'll want to do is:</div><div><br></div><div><div>1. Compute the Phase for all channels and trials: </div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Do a mtmfft with ft_freqanalysis and take the angle</div><div>2. For each trial, compute the phase difference between all channels:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Use the circa_dist-function from the CircStat-Toolbox (Ask Google for the link)</div><div>3. For each combination, compute the mean over trials:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Use the circa_mean function from the above mentioned toolbox</div><div>4. For each combination, compute the deviance from the mean</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Again, circa_dist is your friend here.</div><div><br></div><div>Again, PLV or Coherence don't work on the single trial level, thus ft_connectivityanalysis will not work for you.</div><div><br></div><div>Good Luck,</div><div><br></div><div>Julian</div><div><br></div><div><div>Am 22.09.2014 um 10:32 schrieb Hwee Ling Lee:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Dear Roey, Julian and Tobias,<div><br></div><div>Thanks for the feedback.</div><div><br></div><div>Given your suggestions, I now intend to try to calculate the deviation of single trials from the mean phase difference (PLV). Pardon my ignorance, however, I still experience some problems with calculating plv for single trials.</div><div><br></div><div>Using this code to extract PLV:</div><div><br></div><div><div> cfg = [];</div><div> cfg.trials = 'all';</div><div> cfg.keeptrials = 'yes';</div><div> cfg.channel = {'all'};</div><div> cfg.removemean = 'yes'; </div><div> cfg.method = 'plv';</div><div> cfg.channelcmb = {cfg.channel, cfg.channel}; </div><div> HLF_pre_c200plv = ft_connectivityanalysis(cfg, HLF_pre_c200);</div></div><div><br></div><div>Although I've specified to keep individual trials, ft_connectivityanalysis still show averaged PLV across trials for the output. Could anyone of you, or someone else, kindly highlight my mistake in my calculation?</div><div><br></div><div>Thank you very much!</div><div><br></div><div>Best wishes,</div><div>Hweeling</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 18 September 2014 16:39, Tobias Staudigl <span dir="ltr"><<a href="mailto:tobias.staudigl@uni-konstanz.de" target="_blank">tobias.staudigl@uni-konstanz.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Dear Hweeling, <br>
<br>
I agree with Roey that coherence/PLV cannot be calculated for
individual trials. <br>
However, you could try to use the deviation (in each single trial)
from the mean phase as an approximation.<br>
<br>
Good luck!<br>
Tobias<br>
<br>
<br>
<br>
Am 18.09.2014 15:32, schrieb Roey Schurr:<br>
</div><div><div class="h5">
<blockquote type="cite">
<div dir="ltr">Dear Hweeling,
<div><br>
</div>
<div>Unfortunately I am not yet familiar with the PPC measure,
but I guess that being a pairwise phase <b>consistancy</b> measure,
it is defined over a set of trials, and can not be calculated
for any individual trial (like coherence, or PLV)?</div>
<div><br>
</div>
<div>Just quickly reading through "The pairwise phase
consistency: A bias-free measure of rhythmic neuronal
synchronization" (Vinck et al., 2010), this seems to be the
case.</div>
<div><br>
</div>
<div>Hope this helps,</div>
<div>roey</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Sep 18, 2014 at 3:30 PM, Hwee
Ling Lee <span dir="ltr"><<a href="mailto:hweeling.lee@gmail.com" target="_blank">hweeling.lee@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div>Dear all,</div>
<div><br>
</div>
<div>I've got a question regarding extracting pairwise
phase consistency of individual trials for each
subject.</div>
<div><br>
</div>
<div>Using the connectivity analyses tutorial as a
reference, I extracted the PPC using the fourier
information from the mtmfft (dpss taper).</div>
<div><br>
</div>
<div>Here's an example of my code:</div>
<div><br>
</div>
<div>
<div> cfg = [];</div>
<div> cfg.output = 'fourier';</div>
<div> cfg.channel = {'all'};</div>
<div> cfg.method = 'mtmfft';</div>
<div> cfg.keeptrials = 'yes';</div>
<div> cfg.tapsmofrq = 5;</div>
<div> </div>
<div> % find the index for the c200 condition</div>
<div> pre_c200_idx = find(data8.trialinfo == 200);</div>
<div> </div>
<div> cfg.trials = pre_c200_idx;</div>
<div> cfg.foilim = [0 100]; % either the
full range of frequencies (data2.hdr.Fs/2) or up to
100 Hz</div>
<div> cfg.taper = 'dpss';</div>
<div> HLF_pre_c200 = ft_freqanalysis(cfg,
data8);</div>
</div>
<div><br>
</div>
<div>The PPC is extracted using this code:</div>
<div><br>
</div>
<div>
<div> cfg = [];</div>
<div> cfg.trials = 'all';</div>
<div> cfg.keeptrials = 'yes';</div>
<div> cfg.channel = {'all'};</div>
<div> cfg.removemean = 'yes';</div>
<div> </div>
<div> cfg.method = 'wppc';</div>
<div> cfg.channelcmb = {cfg.channel,
cfg.channel};</div>
<div> </div>
<div> HLF_pre_c200wppc =
ft_connectivityanalysis(cfg, HLF_pre_c200);</div>
</div>
<div><br>
</div>
<div>Although I've specified to keep individual trials,
my output is still a 'chan_freq' dimord variable. It
does not contain any individual trial PPC information.
Is there a way to extract the connectivity for
individual trials?</div>
<div><br>
</div>
<div>Thanks.</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Hweeling</div>
<div><br>
</div>
</div>
</div>
<br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
fieldtrip mailing list
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></pre>
</blockquote>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888"><pre cols="72">--
Dr. Tobias Staudigl
Fachbereich Psychologie - ZPR
Postfach ZPR
78457 Konstanz
ZPR, Haus 12
Tel.: <a href="tel:%2B49%20%280%297531%20%2F%2088%20-%205703" value="+497531885703" target="_blank">+49 (0)7531 / 88 - 5703</a>
</pre>
</font></span></div>
<br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">=================================================<br>Dr. rer. nat. Lee, Hwee Ling<br>Postdoc<br>German Center for Neurodegenerative Diseases (DZNE) Bonn<br><br>Email 1: hwee-ling.lee<at><a href="http://dzne.de/" target="_blank">dzne.de</a><br>Email 2: hweeling.lee<at><a href="http://gmail.com/" target="_blank">gmail.com</a><div><br></div><div><a href="https://sites.google.com/site/hweelinglee/home" target="_blank">https://sites.google.com/site/hweelinglee/home</a><br><br>Correspondence Address:<br>Ernst-Robert-Curtius Strasse 12, 53117, Bonn, Germany<br>=================================================<br></div></div>
</div>
_______________________________________________<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>