<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="font-family:Arial;font-size:14px"><p>
        Hi Tim,<br><br>
        thank you for your answer. I'm trying to evaluate the delay that I have with the Spectral GC in front of just temporal GC.<br><br>
        Today I friend of mine told me that he has the same problem with the Chronux toolbox... now I understand that it was the same problem!<br><br>
        Thanks a lot for changing the function! Next time I'll do by myself in order to contribute to improve the code.<br><br>
        Vito<br><br>
        P.S. I am going to answer also to the other interesting mail you wrote me.<br><br>
        Quoting Tim Mullen &lt;<a href="mailto:mullen.tim@gmail.com">mullen.tim@gmail.com</a>&gt;:</p>
<blockquote style="border-left:2px solid blue;margin-left:2px;padding-left:12px;" type="cite">
        <div dir="ltr">
                <div class="gmail_extra">
                        <div class="gmail_quote">
                                <div>
                                        Hi Vito,&nbsp;</div>
                                <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                                        <div style="font-family:Arial;font-size:14px">
                                                <p>
                                                        1) About the Spectral Granger Analysis it is true that "I can obtain a temporal measure of Granger causality by integrating the GGC (Granger-Geweke Causality) measure provided by SIFT across all frequencies." but this requires much more time if I have to create a lot of models for each trace. For example if I need to create 20000 models for one traces and I am just interested to the integral I spend a lot of time calculating the complete spectrum.<br>
                                                        &nbsp;</p>
                                        </div>
                                </blockquote>
                                <div>
                                        Both temporal and spectral GC require the same number of VAR models -- one model per time window. Spectral GC includes an additional step where the transfer function is obtained via a Fourier transform of the model coefficients. But this step takes very little time on modern multicore computers (milliseconds). The remaining time would be involved in computing the residual covariance matrix and other quantities, which you need for temporal GC anyways. But, yes, if you have tens of thousands of time windows, there may be a slight overhead to the spectral approach (depends on the temporal GC implementation -- some of them actually perform F-tests for separately-fit full and restricted models, and are much slower than the spectral approach in SIFT)</div>
                                <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                                        <div style="font-family:Arial;font-size:14px">
                                                <p>
                                                        <br>
                                                        3) I have a problem with the cleanline routine because you use a function called "findpeaks" that I guess you wrote. The problem is that there is already a matlab findpeaks function that also I use a lot. So I have continuosly change path. Is possible to rename the findpeaks function in the next cleanline release?</p>
                                        </div>
                                </blockquote>
                                <div>
                                        Actually, the overloaded <b>findpeaks</b> is in the Chronux toolbox, part of which is included as an external dependency to cleanline. But, thanks for pointing that out -- I went ahead and changed the name of the function. Download the latest version of Cleanline:</div>
                                <div>
                                        <a href="https://bitbucket.org/tmullen/cleanline/get/tip.zip">https://bitbucket.org/tmullen/cleanline/get/tip.zip</a></div>
                                <div>
                                        Or in the open-source tradition, free to just edit the code yourself and change that one function name and the 2 calls to it...</div>
                                <div>
                                        &nbsp;</div>
                                <div>
                                        &nbsp;</div>
                                <div>
                                        Tim</div>
                                <div>
                                        &nbsp;</div>
                                <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                                        <div style="font-family:Arial;font-size:14px">
                                                <p>
                                                        <br><br>
                                                        Quoting Tim Mullen &lt;<a href="mailto:mullen.tim@gmail.com" target="_blank">mullen.tim@gmail.com</a>&gt;:</p>
                                                <div>
                                                        <div class="h5">
                                                                <blockquote style="border-left-width:2px;border-left-style:solid;border-left-color:blue;margin-left:2px;padding-left:12px" type="cite">
                                                                        <div dir="ltr">
                                                                                <div class="gmail_extra">
                                                                                        <div class="gmail_quote">
                                                                                                Dear Vito, answers below:</div>
                                                                                        <div class="gmail_quote">
                                                                                                &nbsp;</div>
                                                                                        <div class="gmail_quote">
                                                                                                <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                                                                                                        <div style="word-wrap:break-word">
                                                                                                                <div>
                                                                                                                        About SIFT, comparing it with Anil Seth's Granger toolbox it seems that in SIFT are missing a few things (probably I don't know very good SIFT):</div>
                                                                                                                <div>
                                                                                                                        &nbsp;</div>
                                                                                                                <div>
                                                                                                                        1) In SIFT there is only the Spectral Granger Analysis, there is not the temporal Granger Analysis. Is this correct?</div>
                                                                                                        </div>
                                                                                                </blockquote>
                                                                                                <div>
                                                                                                        &nbsp;</div>
                                                                                                <div>
                                                                                                        &nbsp;</div>
                                                                                                <div>
                                                                                                        You can obtain a temporal measure of Granger causality by integrating the GGC (Granger-Geweke Causality) measure provided by SIFT across all frequencies.</div>
                                                                                                <div>
                                                                                                        &nbsp;</div>
                                                                                                <div>
                                                                                                        &nbsp;</div>
                                                                                                <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                                                                                                        <div style="word-wrap:break-word">
                                                                                                                <div>
                                                                                                                        2) In SIFT there is not a stationarity test. Is this correct?</div>
                                                                                                        </div>
                                                                                                </blockquote>
                                                                                                <div>
                                                                                                        &nbsp;</div>
                                                                                                <div>
                                                                                                        &nbsp;</div>
                                                                                                <div>
                                                                                                        No there is not a direct test for stationarity (e.g. Augmented Dickey-Fuller). Instead, stability and whiteness tests are provided. A stable VAR model is always stationary so if the model passes stability and whiteness tests (e.g. the data can be appropriately modeled as a stable VAR process), stationarity of the data is implied. However, in cases where the model residuals are not white or the model is not stable, it can be useful to run a stationarity test on the data to determine if this is the problem. For this, one might consider using the ADF procedure in the GCCA toolbox. Bear in mind there are a few issues with this: The ADF test is a univariate -- not multivariate -- stationarity test. We assume the system is a multivariate autoregressive process (as does GCCA, for that matter) and are interested in testing for non-stationarity in the multivariate dataset (e.g. covariance stationarity) rather than testing each univariate time-series independently. ADF also has low power, and in many cases fails to reject the unit root hypothesis (e.g. Perron, 1989, Econometrica). There are alternate proposed multivariate stationarity test procedures (e.g. Jentsch and Rao, 2013; Yang and Shahabi, 2005), but these are not implemented in SIFT. In many cases, the stability and whiteness tests should suffice.</div>
                                                                                                <div>
                                                                                                        &nbsp;</div>
                                                                                                <div>
                                                                                                        &nbsp;</div>
                                                                                                <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                                                                                                        <div style="word-wrap:break-word">
                                                                                                                <div>
                                                                                                                        3) In SIFT there is a common test for stability and consistence. Is this correct?</div>
                                                                                                                <div>
                                                                                                                        &nbsp;</div>
                                                                                                        </div>
                                                                                                </blockquote>
                                                                                                <div>
                                                                                                        &nbsp;</div>
                                                                                                <div>
                                                                                                        No, there are separate tests for stability and consistency.</div>
                                                                                                <div>
                                                                                                        &nbsp;</div>
                                                                                                <div>
                                                                                                        Best,&nbsp;</div>
                                                                                                <div>
                                                                                                        Tim</div>
                                                                                                <div>
                                                                                                        &nbsp;</div>
                                                                                                <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                                                                                                        <div style="word-wrap:break-word">
                                                                                                                <div>
                                                                                                                        &nbsp;</div>
                                                                                                                <br><div>
                                                                                                                        <div>
                                                                                                                                Il giorno 18/gen/2014, alle ore 19:50, Andreas Widmann ha scritto:</div>
                                                                                                                        <div>
                                                                                                                                <div>
                                                                                                                                        <br><blockquote type="cite">
                                                                                                                                                <div dir="auto">
                                                                                                                                                        <div>
                                                                                                                                                                Dear all,</div>
                                                                                                                                                        <div>
                                                                                                                                                                &nbsp;</div>
                                                                                                                                                        <div>
                                                                                                                                                                not directly related to your question and SIFT, but eegfilt is deprecated and I would recommend not using it any longer.</div>
                                                                                                                                                        <div>
                                                                                                                                                                &nbsp;</div>
                                                                                                                                                        <div>
                                                                                                                                                                Best,</div>
                                                                                                                                                        <div>
                                                                                                                                                                Andreas</div>
                                                                                                                                                        <div>
                                                                                                                                                                <br>
                                                                                                                                                                Am 18.01.2014 um 15:47 schrieb "jfochoaster ." &lt;<a href="mailto:jfochoaster@gmail.com" target="_blank">jfochoaster@gmail.com</a>&gt;:<br>
                                                                                                                                                                &nbsp;</div>
                                                                                                                                                        <blockquote type="cite">
                                                                                                                                                                <div>
                                                                                                                                                                        <div dir="ltr">
                                                                                                                                                                                <div>
                                                                                                                                                                                        <div>
                                                                                                                                                                                                <div>
                                                                                                                                                                                                        <div>
                                                                                                                                                                                                                Hello all,<br>
                                                                                                                                                                                                                &nbsp;</div>
                                                                                                                                                                                                        I'm following the SIFT tutorial, the section 6.5.1.3 is about filtering, talk about eegfilt, about the zero-phase (acausal) filter<br>
                                                                                                                                                                                                        &nbsp;</div>
                                                                                                                                                                                                Is better forget this section of filtering and use the recommendations in the past emails?<br>
                                                                                                                                                                                                &nbsp;</div>
                                                                                                                                                                                        <div>
                                                                                                                                                                                                Are these recommendation critical for the analysis?, I mean, there is a lot of work about MVAR models in ECoG data</div>
                                                                                                                                                                                        <div>
                                                                                                                                                                                                &nbsp;</div>
                                                                                                                                                                                        Best wishes<br>
                                                                                                                                                                                        &nbsp;</div>
                                                                                                                                                                                John</div>
                                                                                                                                                                        <div class="gmail_extra">
                                                                                                                                                                                <br><br><div class="gmail_quote">
                                                                                                                                                                                        On Fri, Jan 17, 2014 at 11:05 PM, <a href="mailto:mullen.tim@gmail.com" target="_blank">mullen.tim@gmail.com</a> <span dir="ltr">&lt;<a href="mailto:mullen.tim@gmail.com" target="_blank">mullen.tim@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                                                                                                                                                                                                Oh thats interesting. I had not seen Anil's multitaper filter (might be fairly recent). But possibly it is exactly the same approach that is in Cleanline. If this is the method advocated by Mitra and Pesaran as in the Chronux toolbox then indeed its the same. And highly recommended.<br><div>
                                                                                                                                                                                                        -----Original Message-----<br>
                                                                                                                                                                                                        Date: Friday, January 17, 2014 1:21:30 pm<br>
                                                                                                                                                                                                        To: <a href="mailto:mullen.tim@gmail.com" target="_blank">mullen.tim@gmail.com</a><br>
                                                                                                                                                                                                        Cc: <a href="mailto:trotta_gabriele@yahoo.com" target="_blank">trotta_gabriele@yahoo.com</a>, <a href="mailto:drcoben@gmail.com" target="_blank">drcoben@gmail.com</a>, <a href="mailto:mmiyakoshi@ucsd.edu" target="_blank">mmiyakoshi@ucsd.edu</a>, <a href="mailto:widmann@uni-leipzig.de" target="_blank">widmann@uni-leipzig.de</a>, <a href="mailto:eeglablist@sccn.ucsd.edu" target="_blank">eeglablist@sccn.ucsd.edu</a><br>
                                                                                                                                                                                                        From: "Vito De Feo" &lt;<a href="mailto:vito.defeo@zmnh.uni-hamburg.de" target="_blank">vito.defeo@zmnh.uni-hamburg.de</a>&gt;<br>
                                                                                                                                                                                                        Subject: Re: [Eeglablist] Filter causality pop_eegfiltnew<br>
                                                                                                                                                                                                        &nbsp;</div>
                                                                                                                                                                                                Before using the Cleanline (that I used today for the first time) I did't use the notch filter, I used a multi taper filtering made by Anil Seth. I know that filtering is very bad for later VAR modeling, especially notch and high pass. Low pass is better (usually I use multi taper filtering to remove the noise lines and a low pass causal filter with cut off filtering of 100 Hz).<br>
                                                                                                                                                                                                Do you think is ok Tim?<br>
                                                                                                                                                                                                Best<br>
                                                                                                                                                                                                Vito<br><br><br>
                                                                                                                                                                                                Il giorno 17/gen/2014, alle ore 20:53, <a href="mailto:mullen.tim@gmail.com" target="_blank">mullen.tim@gmail.com</a> ha scritto:<br><div>
                                                                                                                                                                                                        <br>
                                                                                                                                                                                                        &gt; Do not notch filter your data! This can be very bad for later VAR modeling -- and IMO bad in general. You can use an adaptive spectral regression method such as that in the Cleanline plugin for eeglab to remove line noise.<br>
                                                                                                                                                                                                        &gt;<br>
                                                                                                                                                                                                        &gt; See Barnett and Seth 2011 and Mitra and Pesaran 1999 for theoretical discussions.<br>
                                                                                                                                                                                                        &gt;<br>
                                                                                                                                                                                                        &gt; Rob, there is no video of the SIFT workshop but the lecture pdfs are online at the eeglab workshop page.<br>
                                                                                                                                                                                                        &gt;<br>
                                                                                                                                                                                                        &gt; Tim<br>
                                                                                                                                                                                                        &gt; -----Original Message-----<br>
                                                                                                                                                                                                        &gt; Date: Friday, January 17, 2014 10:18:32 am<br>
                                                                                                                                                                                                        &gt; To: "<br>
                                                                                                                                                                                                        &nbsp;</div>
                                                                                                                                                                                                <div>
                                                                                                                                                                                                        <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></div>
                                                                                                                                                                                                </div>
                                                                                                                                                                                        </blockquote>
                                                                                                                                                                                </div>
                                                                                                                                                                                <br><br clear="all"><br>
                                                                                                                                                                                --<br>
                                                                                                                                                                                John Ochoa<br>
                                                                                                                                                                                Docente de Bioingenier&iacute;a<br>
                                                                                                                                                                                Universidad de Antioquia</div>
                                                                                                                                                                </div>
                                                                                                                                                        </blockquote>
                                                                                                                                                </div>
                                                                                                                                        </blockquote>
                                                                                                                                </div>
                                                                                                                        </div>
                                                                                                                </div>
                                                                                                        </div>
                                                                                                </blockquote>
                                                                                        </div>
                                                                                        <br><br clear="all"><div>
                                                                                                &nbsp;</div>
                                                                                        --<br>
                                                                                        ---------&nbsp; &alpha;&nu;&tau;&#943;&lambda;&eta;&psi;&eta; -----------</div>
                                                                        </div>
                                                                </blockquote>
                                                                <br><br><br>
                                                                &nbsp;</div>
                                                </div>
                                                <div class="im">
                                                        --<br>
                                                        Pflichtangaben gem&auml;&szlig; Gesetz &uuml;ber elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG):<br><br>
                                                        Universit&auml;tsklinikum Hamburg-Eppendorf<br>
                                                        K&ouml;rperschaft des &ouml;ffentlichen Rechts<br>
                                                        Gerichtsstand: Hamburg<br><br>
                                                        Vorstandsmitglieder:<br>
                                                        Prof. Dr. Christian Gerloff (Vertreter des Vorsitzenden)<br>
                                                        Prof. Dr. Dr. Uwe Koch-Gromus<br>
                                                        Joachim Pr&ouml;l&szlig;<br>
                                                        Rainer Schoppik</div>
                                        </div>
                                </blockquote>
                        </div>
                        <br><br clear="all"><div>
                                &nbsp;</div>
                        --<br>
                        ---------&nbsp; &alpha;&nu;&tau;&#943;&lambda;&eta;&psi;&eta; -----------</div>
        </div>
</blockquote>
<br><br><br><br>-- <br>Pflichtangaben gem&auml;&szlig; Gesetz &uuml;ber elektronische Handelsregister und
 Genossenschaftsregister sowie das Unternehmensregister (EHUG):<br><br>
Universit&auml;tsklinikum Hamburg-Eppendorf<br>
K&ouml;rperschaft des &ouml;ffentlichen Rechts<br>
Gerichtsstand: Hamburg<br><br>Vorstandsmitglieder:<br>
Prof. Dr. Christian Gerloff (Vertreter des Vorsitzenden)<br>
Prof. Dr. Dr. Uwe Koch-Gromus<br>
Joachim Pr&ouml;l&szlig;<br>
Rainer Schoppik<br>

</body></html>