Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
is sm.tsa.filters.arfilter an AR filter? #1478
In the terminology R uses in their
In terms of general terminology.
I had big problems keeping apart which is which, especially also with the signal processing terminology in scipy.signal (num, denom), and I didn't read R at the time.
I tried to translate things into ARMA terminology, ar_filter, ma_filter for things that signal.lfilter can do, ARMA terminology is more mnemonic for me. (assuming I got it correct)
edit: I'm not sure about the following after 30 minutes:
assume y is observed
y_t for ar(L) y_t = e_t
ma(L) would be a FIR filter (finite impulse response) in scipy.signal
I thought I had an arma_filter wrapper around lfilter, but cannot find anything like that.
ArmaFft in the sandbox has a frequency domain arma filter method.
one of the things I got confused about in signal processing terminology is transfer function filter, where x is the input and y is the output
linear_filter sounds fine,
related: for using lfilter we should have the correct choice of starting values, so we get identical results to recursion with fixed initial conditions.
The one-sided convolution filter maps to MA using lfilter. These should give the same, but it doesn't look like lfilter properly handles NA values in this case. Looks like a bug to me.
I made a quick mapping between convolve, lfilter and R's filter methods, optionally using initial conditions. For the one-sided convolution, I might just do a one-linear using