# negation of AR params in statsmodels

In this documentation there is a mention that "due to the conventions used in signal processing used in signal.lfilter vs. conventions in statistics for ARMA processes, the AR paramters should have the opposite sign of what you might expect". And the following example is given:

>>> arparams = np.array([.75, -.25])
>>> maparams = np.array([.65, .35])
>>> ar = np.r_[1, -ar] # add zero-lag and negate
>>> ma = np.r_[1, ma] # add zero-lag


My questions are:

1. Which convention in signal processing/ Statistics mandate negation of AR params. I dont't think there is any such convention in statistics.

2. If the params are to be negated, why is the zero lag param (=1) not negated?

• There is a convention to the meaning of the "AR coefficients" in statistics; it is different to the signal processing convention. The function is leaking implementation details and forcing you to make the conversion, every time you call it, rather than do it by itself. It is poorly designed software, and the proof of this is that it is not the first time this exact question is asked here. – Chris Haug Feb 4 '18 at 1:52
• And as the "designer" I still like it that way, because sometimes it's good to work with regression coefficients and sometimes it's better to work with lag polynomials. (There are helper functions for the conversion.) – Josef Feb 4 '18 at 2:16
• – Josef Feb 4 '18 at 14:07