[Eeglablist] FIR filter and IIR and leaks
Arnaud Delorme
arno at ucsd.edu
Sun Apr 3 03:47:14 PDT 2011
Dear Baris,
yes, it is possible that filtering would make your ERP significant even before the onset of the stimulus. It all depends on your filter and the data you are applying it to. The default filters in EEGLAB are non causal. A non-causal filter (FIR, IIR or other) is applied in the forward direction and then in the reserve direction using the filtfilt Matlab function. When the filter is applied in the reverse direction, it could smear the ERP data into the baseline, especially if you high pass filter at low frequencies as you did since then the filter order (number of samples) would be large. It is also possible to use causal filters from the command line (see help iirfilt). Using a causal filter means that you only apply the filter in the forward direction and so smearing of the ERP into the baseline cannot occur. The advantage of using bidirectional non causal filters is that they do not discord the phase of the signal at different frequencies while causal filter do.
Regarding your second question: yet it is better to filter continuous data than to filter data epochs. This is because filtering introduces artifacts at the beginning of each filtered data segment (at the beginning and the end of the continuous data or at the beginning and the end of each epoch).
Best regards,
Arno
> I filtered the raw data with the pop_eegfilt with 0.1Hz highpass and 80Hz lowpass and then epoched it, leading to two sets of conditions for comparison. I observed that, after baselining the epochs to some pre-stimulus interval, there is a very early statistically significant difference between the conditions around 100-160ms where ERP amplitude was used as a dependent measure, But, on the ERP plots the difference looks as if it started slightly before the onset of the stimulus onset for some electrodes. Can I attribute this to the filfilt? If so would filtering this data one more time with IIR help (maybe filtering with much lower values)?
>
> Other question related to this is: I feel like using default fir filtering is better for the continuous data at the beginning of the pre-processing where you may like to conduct TF or ITC analysis too in later stages. I cannot figure out how and when I should use IIR. Shall I apply it on a continuous data at teh beginning if I am not concerned about the phase coherence or TF? Is this a better way?
>
> Thanks,
> Baris
>
> --
> SB Demiral, PhD.
> Department of Psychology
> 7 George Square
> The University of Edinburgh
> Edinburgh, EH8 9JZ
> UK
More information about the eeglablist
mailing list