<div dir="ltr"><div><span style="font-family:Tahoma;font-size:13.333333015441895px">Dear Ana,</span></div><div><br></div><span style="font-family:Tahoma;font-size:13.333333015441895px">> Note that the delay of a linear phase FIR filter is always N/2 where N is the order (not the number of coefficients which is then N+1). Consequently and to get a delay as an integer number of samples you should have a filter with a number of coefficients  odd (say 2M+1) and then the shift is M (because order is 2M).</span><br>

<div><span style="font-family:Tahoma;font-size:13.333333015441895px"><br></span></div><div><span style="font-family:Tahoma;font-size:13.333333015441895px">Thanks for nice clarification. My wording could be inaccurate since I don't know much about signal processing. Your input is helpful!</span></div>

<div><span style="font-family:Tahoma;font-size:13.333333015441895px"><br></span></div><div><span style="font-family:Tahoma;font-size:13.333333015441895px">Dear Andreas and Vito,</span></div><div><span style="font-family:Tahoma;font-size:13.333333015441895px"><br>

</span></div><div>Ok I got it. What matters is NOT in the difference between filtfilt and linear-phase with group delay correction. As long as they create a symmetrical impulse responses, problem is the same- a ripple at time t is created by the impulse at the future time t+k.</div>

<div><br></div><div>Now it makes sense that using causal filter is better for Granger causality analysis. Thank you very much</div><div><br></div><div>Makoto</div><div><br></div><div class="gmail_extra"><div class="gmail_quote">

2014-01-30 Andreas Widmann <span dir="ltr"><<a href="mailto:widmann@uni-leipzig.de" target="_blank">widmann@uni-leipzig.de</a>></span><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">

Dear Makoto,<br>
<div class="im"><br>
> Let me revisit this topic.<br>
> Andreas, please correct me if I'm wrong.<br>
><br>
</div>> The default EEGLAB filter (pop_eegfiltnew) outputs zero-phase lag results, but is actually a causal and linear-phasefilter. It shifts everything back after the filtering by half the length of the filter. It means it does not use filtfilt even though it is zero-phase lag. Vito, if my explanation above is correct, EEGLAB filter should be fine for Granger analysis... Am I correct?<br>


No, shifting the output backwards by the group delay actually makes the filter non-causal (the output now depends on „future" inputs). There can be no causal AND zero-phase filter. However, correcting the lag actually does not change the filter's output.<br>


<br>
So, I’m not sure how filter (non-) causality affects Granger causality. E.g., Barnett and Seth (2011) used non-causal filters for their notch filter simulation („Data was then filtered (in both forward and reverse directions) [...]“). To my (very limited!) understanding they conclude, that not filtering per se is the problem but the resulting increase in model order ("Given this generality, how then to account for simulation results showing corruption of G-causal estimates following filtering (Florin et al., 2010; Seth, 2010)? We have shown that a primary cause is the large increase in empirical model induced by filtering; high model orders become necessary in order to properly fit the modified aspects of the power spectrum (low power in stop band, steep roll-off, etc.).“).<br>


<br>
Maybe Tim could to comment on the impact of filter *causality* on Granger causality?<br>
<br>
Best,<br>
Andreas<br>
<br>
Barnett, L., & Seth, A. K. (2011). Behaviour of Granger causality under filtering: Theoretical invariance and practical application. J Neurosci Meth, 201, 404-419.<br>
<div class=""><div class="h5"><br>
> Makoto<br>
><br>
><br>
> 2014-01-16 Vito de Feo <<a href="mailto:vito.defeo@zmnh.uni-hamburg.de">vito.defeo@zmnh.uni-hamburg.de</a>><br>
> Dear Makoto,<br>
><br>
> I attach you a couple of papers that illustrate the problems. To explain quickly the problem it is obvious that if you filter in both the directions (as an acausal filter does) you introduce a correlation beetwen the "future" and the "past".<br>


><br>
> I need to filter the data to remove the 50 HZ (or 60 Hz if you are in USA or Japan) frequency. For the rest I don't filter.<br>
><br>
> Best<br>
><br>
><br>
><br>
> Vito<br>
><br>
> Quoting Makoto Miyakoshi <<a href="mailto:mmiyakoshi@ucsd.edu">mmiyakoshi@ucsd.edu</a>>:<br>
><br>
>> Dear Vito,<br>
>><br>
>> > the acausal filtering destroy the causality flow. For Granger it is important to use only causal filter.<br>
>><br>
>> Oh really. That sounds counterintuitive to me. Please send me the URL to the paper about it.<br>
>><br>
>> However let me tell you this that Tim Mullen (the author of SIFT) told us in the past EEGLAB workshop that we should not use ANY filter for SIFT. If you want to remove low-frequency drifts etc... he recommended the detrend option supported in SIFT. For low-pass filter, he said don't use it. Also make sure that you use double precision, not signle precision; check EEGLAB option to switch it (default should be single precision). Actually these were new things I learned!<br>


>><br>
>> Condro, for clarification to novice users, let me add this that EEGLAB's FIR filter is by default non-causal (i.e. peak latencies do not shift).<br>
>><br>
>> Makoto<br>
>><br>
>> 2014/1/15 Vito de Feo <<a href="mailto:vito.defeo@zmnh.uni-hamburg.de">vito.defeo@zmnh.uni-hamburg.de</a>><br>
>> Dear Makoto,<br>
>><br>
>> the acausal filtering destroy the causality flow. For Granger it is important to use only causal filter. If you are interested I can send you a paper about that.<br>
>><br>
>> Yes, I know SIFT and I am also using it for my analisys.<br>
>><br>
>><br>
>><br>
>> Vito<br>
>><br>
>> Quoting Makoto Miyakoshi <<a href="mailto:mmiyakoshi@ucsd.edu">mmiyakoshi@ucsd.edu</a>>:<br>
>><br>
>>> Dear Andreas and Vito,<br>
>>><br>
>>> Sorry Andreas I screwed it when I typed your name.<br>
>>><br>
>>> Vito, I would like to learn from you the reason why you want to use the minimum phase filter for Granger causality analysis. By the way, you know SIFT is available for it? In case you don't know it yet, check out <a href="http://sccn.ucsd.edu/wiki/SIFT" target="_blank">http://sccn.ucsd.edu/wiki/SIFT</a>.<br>


>>><br>
>>> Makoto<br>
>>><br>
>>><br>
>>> 2014/1/14 Vito de Feo <<a href="mailto:vito.defeo@zmnh.uni-hamburg.de">vito.defeo@zmnh.uni-hamburg.de</a>><br>
>>> Dear Andreas,<br>
>>><br>
>>> I download the last version (13.1.1) and now the option is present and it is clearly written that the default is the zero-phase linear filtering.<br>
>>><br>
>>> In my previous version (the last of the EEGLAB 12) this option was not present but now, with the version 13, it is present again!<br>
>>><br>
>>> Best,<br>
>>><br>
>>> Vito<br>
>>><br>
>>><br>
>>> Quoting Andreas Widmann <<a href="mailto:widmann@uni-leipzig.de">widmann@uni-leipzig.de</a>>:<br>
>>><br>
>>> Dear Vito,<br>
>>><br>
>>> in the last eeglab version there is not the minphase parameter in the pop_eegfiltnew function.<br>
>>> Which version is your last version? In 13.1.1 from the web page and in rev 10261 from SVN the option is present. It was initially introduced in EEGLAB 13 (but not backported to EEGLAB 12). Could you please check whether possibly something went wrong with your setup/path and report back your version number?<br>


>>><br>
>>> It was useful to force the filter to be causal. If I have understand well now the filter is causal by dafault because it uses the filter funcion. Is this correct?<br>
>>> NO! Causal non-linear filter is NOT the default. Default is and will remain zero-phase linear filtering. Default filter functions did not change since EEGLAB 12.<br>
>>><br>
>>> Best,<br>
>>> Andreas<br>
>>><br>
>>> Sorry if this is a vey well known issue but I didn't find any answer on the web until now.<br>
>>> I need filter causality for Granger analisys. If anyone has also other suggestion about causal filtering with eeglab, any suggestion is very welcome!<br>
>>><br>
>>> Thank in advange!<br>
>>><br>
>>> Vito<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>
>>><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>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Makoto Miyakoshi<br>
>>> Swartz Center for Computational Neuroscience<br>
>>> Institute for Neural Computation, University of California San Diego<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>
>>><br>
>>><br>
>>><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>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Makoto Miyakoshi<br>
>>> Swartz Center for Computational Neuroscience<br>
>>> Institute for Neural Computation, University of California San Diego<br>
>><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>
>><br>
>><br>
>><br>
>> --<br>
>> Makoto Miyakoshi<br>
>> Swartz Center for Computational Neuroscience<br>
>> Institute for Neural Computation, University of California San Diego<br>
><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>
><br>
><br>
><br>
> --<br>
> Makoto Miyakoshi<br>
> Swartz Center for Computational Neuroscience<br>
> Institute for Neural Computation, University of California San Diego<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Makoto Miyakoshi<br>Swartz Center for Computational Neuroscience<br>Institute for Neural Computation, University of California San Diego<br>

</div>
</div></div>