[Eeglablist] Filter causality pop_eegfiltnew

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Thu Jan 30 09:41:15 PST 2014


Dear Ana,

> 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).

Thanks for nice clarification. My wording could be inaccurate since I don't
know much about signal processing. Your input is helpful!

Dear Andreas and Vito,

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.

Now it makes sense that using causal filter is better for Granger causality
analysis. Thank you very much

Makoto

2014-01-30 Andreas Widmann <widmann at uni-leipzig.de>

> Dear Makoto,
>
> > Let me revisit this topic.
> > Andreas, please correct me if I'm wrong.
> >
> > 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?
> 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.
>
> 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.).").
>
> Maybe Tim could to comment on the impact of filter *causality* on Granger
> causality?
>
> Best,
> Andreas
>
> Barnett, L., & Seth, A. K. (2011). Behaviour of Granger causality under
> filtering: Theoretical invariance and practical application. J Neurosci
> Meth, 201, 404-419.
>
> > Makoto
> >
> >
> > 2014-01-16 Vito de Feo <vito.defeo at zmnh.uni-hamburg.de>
> > Dear Makoto,
> >
> > 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".
> >
> > 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.
> >
> > Best
> >
> >
> >
> > Vito
> >
> > Quoting Makoto Miyakoshi <mmiyakoshi at ucsd.edu>:
> >
> >> Dear Vito,
> >>
> >> > the acausal filtering destroy the causality flow. For Granger it is
> important to use only causal filter.
> >>
> >> Oh really. That sounds counterintuitive to me. Please send me the URL
> to the paper about it.
> >>
> >> 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!
> >>
> >> 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).
> >>
> >> Makoto
> >>
> >> 2014/1/15 Vito de Feo <vito.defeo at zmnh.uni-hamburg.de>
> >> Dear Makoto,
> >>
> >> 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.
> >>
> >> Yes, I know SIFT and I am also using it for my analisys.
> >>
> >>
> >>
> >> Vito
> >>
> >> Quoting Makoto Miyakoshi <mmiyakoshi at ucsd.edu>:
> >>
> >>> Dear Andreas and Vito,
> >>>
> >>> Sorry Andreas I screwed it when I typed your name.
> >>>
> >>> 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
> http://sccn.ucsd.edu/wiki/SIFT.
> >>>
> >>> Makoto
> >>>
> >>>
> >>> 2014/1/14 Vito de Feo <vito.defeo at zmnh.uni-hamburg.de>
> >>> Dear Andreas,
> >>>
> >>> 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.
> >>>
> >>> 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!
> >>>
> >>> Best,
> >>>
> >>> Vito
> >>>
> >>>
> >>> Quoting Andreas Widmann <widmann at uni-leipzig.de>:
> >>>
> >>> Dear Vito,
> >>>
> >>> in the last eeglab version there is not the minphase parameter in the
> pop_eegfiltnew function.
> >>> 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?
> >>>
> >>> 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?
> >>> 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.
> >>>
> >>> Best,
> >>> Andreas
> >>>
> >>> Sorry if this is a vey well known issue but I didn't find any answer
> on the web until now.
> >>> I need filter causality for Granger analisys. If anyone has also other
> suggestion about causal filtering with eeglab, any suggestion is very
> welcome!
> >>>
> >>> Thank in advange!
> >>>
> >>> Vito
> >>>
> >>>
> >>>
> >>> --
> >>> Pflichtangaben gemäß Gesetz über elektronische Handelsregister und
> Genossenschaftsregister sowie das Unternehmensregister (EHUG):
> >>>
> >>> Universitätsklinikum Hamburg-Eppendorf
> >>> Körperschaft des öffentlichen Rechts
> >>> Gerichtsstand: Hamburg
> >>>
> >>> Vorstandsmitglieder:
> >>> Prof. Dr. Christian Gerloff (Vertreter des Vorsitzenden)
> >>> Prof. Dr. Dr. Uwe Koch-Gromus
> >>> Joachim Prölß
> >>> Rainer Schoppik
> >>>
> >>> _______________________________________________
> >>> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> >>> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> >>> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
> >>>
> >>>
> >>>
> >>> --
> >>> Makoto Miyakoshi
> >>> Swartz Center for Computational Neuroscience
> >>> Institute for Neural Computation, University of California San Diego
> >>> _______________________________________________
> >>> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> >>> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> >>> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>> Pflichtangaben gemäß Gesetz über elektronische Handelsregister und
> Genossenschaftsregister sowie das Unternehmensregister (EHUG):
> >>>
> >>> Universitätsklinikum Hamburg-Eppendorf
> >>> Körperschaft des öffentlichen Rechts
> >>> Gerichtsstand: Hamburg
> >>>
> >>> Vorstandsmitglieder:
> >>> Prof. Dr. Christian Gerloff (Vertreter des Vorsitzenden)
> >>> Prof. Dr. Dr. Uwe Koch-Gromus
> >>> Joachim Prölß
> >>> Rainer Schoppik
> >>>
> >>>
> >>>
> >>> --
> >>> Makoto Miyakoshi
> >>> Swartz Center for Computational Neuroscience
> >>> Institute for Neural Computation, University of California San Diego
> >>
> >>
> >>
> >>
> >> --
> >> Pflichtangaben gemäß Gesetz über elektronische Handelsregister und
> Genossenschaftsregister sowie das Unternehmensregister (EHUG):
> >>
> >> Universitätsklinikum Hamburg-Eppendorf
> >> Körperschaft des öffentlichen Rechts
> >> Gerichtsstand: Hamburg
> >>
> >> Vorstandsmitglieder:
> >> Prof. Dr. Christian Gerloff (Vertreter des Vorsitzenden)
> >> Prof. Dr. Dr. Uwe Koch-Gromus
> >> Joachim Prölß
> >> Rainer Schoppik
> >>
> >>
> >>
> >> --
> >> Makoto Miyakoshi
> >> Swartz Center for Computational Neuroscience
> >> Institute for Neural Computation, University of California San Diego
> >
> >
> >
> >
> > --
> > Pflichtangaben gemäß Gesetz über elektronische Handelsregister und
> Genossenschaftsregister sowie das Unternehmensregister (EHUG):
> >
> > Universitätsklinikum Hamburg-Eppendorf
> > Körperschaft des öffentlichen Rechts
> > Gerichtsstand: Hamburg
> >
> > Vorstandsmitglieder:
> > Prof. Dr. Christian Gerloff (Vertreter des Vorsitzenden)
> > Prof. Dr. Dr. Uwe Koch-Gromus
> > Joachim Prölß
> > Rainer Schoppik
> >
> >
> >
> > --
> > Makoto Miyakoshi
> > Swartz Center for Computational Neuroscience
> > Institute for Neural Computation, University of California San Diego
>
>


-- 
Makoto Miyakoshi
Swartz Center for Computational Neuroscience
Institute for Neural Computation, University of California San Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20140130/e29001d5/attachment.html 


More information about the eeglablist mailing list