<div dir="ltr">Here some simple code you could use (independently of EEGlab):<div><br></div><div>Suppose EEG1 is time series 1 and EEG2 is time series 2, also supposed you want to compare phase coherence in the delta band (you can change this for any band you want):</div>
<div><br></div><div>.....</div><div><br><div>samp_f=500; % sampling frequency</div><div><div>wd=[0.5 4]/(samp_f/2); % filter setting for delta band, 0.5-4 Hz</div><div>[b,a]=butter(4,wd); % butter filter </div><div>FEEG1=filtfilt(b,a,EEG1); % filtering time series 1</div>
<div>FEEG2=filtfilt(b,a,EEG2); % filtering time series 2<br></div><div>PhaseEEG1=angle(hilbert(FEEG1))+pi;% phase for EEG1 </div></div></div><div>PhaseEEG2=angle(hilbert(FEEG2))+pi;% phase for EEG2</div><div><br></div><div>
PhasePD=(PhaseEEG1-PhaseEEG2)./PhaseEEG2*100; % percentage difference </div><div>% between EEG1 and EEG2 relative to EEG2 phase. </div><div><br></div><div><br></div><div>PhasePD would be another time series with same sampling frequency of EEG1 and EEG2 and it would give you a simple measure of the phase coherence between the two series. </div>
<div><br></div><div>Giovanni </div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Sep 28, 2013 at 9:38 PM, Fred Travis <span dir="ltr"><<a href="mailto:ftravis@mum.edu" target="_blank">ftravis@mum.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#6600CC" bgcolor="#FFFFFF">
    <font face="Verdana">Thank you Robert.<br>
      <br>
      As you know, there is a growing body of work on synchrony.  How
      can I calculate that in EEGLAB?<span class="HOEnZb"><font color="#888888"><br>
      <br>
      Fred<br>
      <br>
    </font></span></font><div><div class="h5">
    <div>On 9/27/2013 8:21 PM, robert coben
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      Fred and Arnaud,
      <div><br>
      </div>
      <div>Having worked with coherence and more recently sloreta
        coherence and SIFT, I will provide some feedback. Coherence as a
        measure of "connectivity" between pairs is extremely flawed. I
        would agree with Arnaud is recommending SIFT and granger
        causality. The information is much richer and more closely
        resembles structural connectivity metrics.</div>
      <div><br>
      </div>
      <div>Rob</div>
      <div><br>
      </div>
      <div><br>
        <div>
          <div>On Sep 27, 2013, at 5:38 PM, Fred Travis <<a href="mailto:ftravis@mum.edu" target="_blank">ftravis@mum.edu</a>>
            wrote:</div>
          <br>
          <blockquote type="cite">
            <div> Hi Arnaud<br>
              <br>
              By synchrony I mean in phase EEG.  Coherence us a general
              case-stability of phase relation--and synchrony is a
              specific case--stability of phase relation and in phase<br>
              <br>
              Fred<br>
              <div>On 9/27/2013 2:54 PM, Arnaud
                Delorme wrote:<br>
              </div>
              <blockquote type="cite"> Hi Fred,
                <div><br>
                </div>
                <div>what do you mean by synchrony? </div>
                <div>To caclulate some of additional connectivity
                  measures, you might want to try SIFT, an EEGLAB
                  associated toolbox and plugin. It will allow you to
                  compute Granger Causality based measures such as
                  partial directed coherence.  It will also allow you to
                  compute many other measures including the popular
                  directed transfer entropy.</div>
                <div><br>
                </div>
                <div>Hope this helps,</div>
                <div><br>
                </div>
                <div>Arno</div>
                <div><br>
                </div>
                <div><br>
                </div>
                <div>
                  <div>
                    <div>
                      <blockquote type="cite">
                        <div>1. synchrony (rather than coherence)</div>
                      </blockquote>
                      <blockquote type="cite">
                        <div> 2. cross frequency coherence--coherence
                          between frequency bands (Palva and Palva)<br>
                          3. cepstrum analysis--frequency analysis of
                          the power spectra<br>
                          <br>
                          Many thanks<br>
                          <br>
                          Fred<br>
                          <pre cols="72">-- 
Fred Travis, Ph.D.
Director, Center for Brain, Consciousness and Cognition
Dean, Graduate School
Chair, Maharishi Vedic Science Department
Office:  <a href="tel:641%20472%201209" value="+16414721209" target="_blank">641 472 1209</a>
Fax: <a href="tel:641%20470%201316" value="+16414701316" target="_blank">641 470 1316</a>
Skype: fredtravis
Website: <a href="http://drfredtravis.com/" target="_blank">drfredtravis.com</a></pre>
                        </div>
                        _______________________________________________<br>
                        Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
                        To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
                        For digest mode, send an email with the subject
                        "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a></blockquote>
                    </div>
                    <br>
                  </div>
                </div>
              </blockquote>
              <br>
              <pre cols="72">-- 
Fred Travis, Ph.D.
Director, Center for Brain, Consciousness and Cognition
Dean, Graduate School
Chair, Maharishi Vedic Science Department
Office:  <a href="tel:641%20472%201209" value="+16414721209" target="_blank">641 472 1209</a>
Fax: <a href="tel:641%20470%201316" value="+16414701316" target="_blank">641 470 1316</a>
Skype: fredtravis
Website: <a href="http://drfredtravis.com" target="_blank">drfredtravis.com</a></pre>
            </div>
            _______________________________________________<br>
            Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
            To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu" target="_blank">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
            For digest mode, send an email with the subject "set digest
            mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu" target="_blank">eeglablist-request@sccn.ucsd.edu</a></blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
    <pre cols="72">-- 
Fred Travis, Ph.D.
Director, Center for Brain, Consciousness and Cognition
Dean, Graduate School
Chair, Maharishi Vedic Science Department
Office:  <a href="tel:641%20472%201209" value="+16414721209" target="_blank">641 472 1209</a>
Fax: <a href="tel:641%20470%201316" value="+16414701316" target="_blank">641 470 1316</a>
Skype: fredtravis
Website: <a href="http://drfredtravis.com" target="_blank">drfredtravis.com</a></pre>
  </div></div></div>

<br>_______________________________________________<br>
Eeglablist page: <a href="http://sccn.ucsd.edu/eeglab/eeglabmail.html" target="_blank">http://sccn.ucsd.edu/eeglab/eeglabmail.html</a><br>
To unsubscribe, send an empty email to <a href="mailto:eeglablist-unsubscribe@sccn.ucsd.edu">eeglablist-unsubscribe@sccn.ucsd.edu</a><br>
For digest mode, send an email with the subject "set digest mime" to <a href="mailto:eeglablist-request@sccn.ucsd.edu">eeglablist-request@sccn.ucsd.edu</a><br></blockquote></div><br></div>