<div dir="ltr">Hi Vito, <div><br></div><div>Let me know how your performance comparisons go.<div><br></div><div>By the way, if you wish to perform temporal GC using SIFT, you can obtain skip the "connectivity estimation" step and just return the VAR coefficients from <a href="http://MODEL.AR">MODEL.AR</a>. For each time window (each cell) this is a [num_chans x num_chans * model_order] matrix containing the horizontally concatenated VAR coefficient matrices for each lag: [A1 ... Ap], where p is the model order. The prediction errors (residual covariance matrices) for lags 0 to p are stored in <a href="http://MODEL.PE">MODEL.PE</a> in similar form: [E0 E1 E2 ... Ep]. Following Definition 1 in the SIFT handbook, one can straightforwardly obtain an asymptotic temporal GC estimate by deriving a Wald statistic from these quantities and performing an F-test (see chapter 3.6.1 of Lütkepohl's book New Introduction to Multiple Time Series Analysis). If I have the time, I'll probably add this to SIFT at some point...</div>
<div><div><br></div><div>Tim</div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 27, 2014 at 1:10 PM, Vito de Feo <span dir="ltr"><<a href="mailto:vito.defeo@zmnh.uni-hamburg.de" target="_blank">vito.defeo@zmnh.uni-hamburg.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div 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.<span class="HOEnZb"><font color="#888888"><br><br>
Vito<br></font></span><br>
P.S. I am going to answer also to the other interesting mail you wrote me.<br><br>
Quoting Tim Mullen <<a href="mailto:mullen.tim@gmail.com" target="_blank">mullen.tim@gmail.com</a>>:</p><div><div class="h5">
<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, </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>
</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" target="_blank">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>
</div>
<div>
</div>
<div>
Tim</div>
<div>
</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 <<a href="mailto:mullen.tim@gmail.com" target="_blank">mullen.tim@gmail.com</a>>:</p>
<div>
<div>
<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">
</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>
</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>
</div>
<div>
</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>
</div>
<div>
</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>
</div>
<div>
</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>
</div>
<div>
</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>
</div>
</div>
</blockquote>
<div>
</div>
<div>
No, there are separate tests for stability and consistency.</div>
<div>
</div>
<div>
Best, </div>
<div>
Tim</div>
<div>
</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>
</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>
</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>
</div>
<div>
Best,</div>
<div>
Andreas</div>
<div>
<br>
Am 18.01.2014 um 15:47 schrieb "jfochoaster ." <<a href="mailto:jfochoaster@gmail.com" target="_blank">jfochoaster@gmail.com</a>>:<br>
</div>
<blockquote type="cite">
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>
Hello all,<br>
</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>
</div>
Is better forget this section of filtering and use the recommendations in the past emails?<br>
</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>
</div>
Best wishes<br>
</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"><<a href="mailto:mullen.tim@gmail.com" target="_blank">mullen.tim@gmail.com</a>></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" <<a href="mailto:vito.defeo@zmnh.uni-hamburg.de" target="_blank">vito.defeo@zmnh.uni-hamburg.de</a>><br>
Subject: Re: [Eeglablist] Filter causality pop_eegfiltnew<br>
</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>
> 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>
><br>
> See Barnett and Seth 2011 and Mitra and Pesaran 1999 for theoretical discussions.<br>
><br>
> Rob, there is no video of the SIFT workshop but the lecture pdfs are online at the eeglab workshop page.<br>
><br>
> Tim<br>
> -----Original Message-----<br>
> Date: Friday, January 17, 2014 10:18:32 am<br>
> To: "<br>
</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ía<br>
Universidad de Antioquia</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br><br clear="all"><div>
</div>
--<br>
--------- αντίληψη -----------</div>
</div>
</blockquote>
<br><br><br>
</div>
</div>
<div>
--<br>
Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG):<br><br>
Universitätsklinikum Hamburg-Eppendorf<br>
Körperschaft des ö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ölß<br>
Rainer Schoppik</div>
</div>
</blockquote>
</div>
<br><br clear="all"><div>
</div>
--<br>
--------- αντίληψη -----------</div>
</div>
</blockquote>
<br><br><br><br>-- <br>Pflichtangaben gemäß Gesetz über elektronische Handelsregister und
Genossenschaftsregister sowie das Unternehmensregister (EHUG):<br><br>
Universitätsklinikum Hamburg-Eppendorf<br>
Körperschaft des ö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ölß<br>
Rainer Schoppik<br>
</div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>--------- αντίληψη -----------
</div>