statsmodels.tsa.arima_process.ar2arma#

statsmodels.tsa.arima_process.ar2arma(ar_des, p, q, n=20, mse='ar', start=None)[source]#

Find arma approximation to ar process

This finds the ARMA(p,q) coefficients that minimize the integrated squared difference between the impulse_response functions (MA representation) of the AR and the ARMA process. This does not check whether the MA lag polynomial of the ARMA process is invertible, neither does it check the roots of the AR lag polynomial.

Parameters:
ar_desarray_like

The target impulse response/AR-representation to approximate, including lag zero, e.g. the (zero-padded or truncated) coefficients of the original AR lag polynomial. Must have n elements.

pint

The length of desired AR lag polynomials.

qint

The length of desired MA lag polynomials.

nint, optional

The number of terms of the impulse_response function to include in the objective function for the approximation.

msestr, optional

Not used.

startarray_like, optional

Initial values to use when finding the approximation.

Returns:
ar_appndarray

The coefficients of the AR lag polynomials of the approximation.

ma_appndarray

The coefficients of the MA lag polynomials of the approximation.

restuple

The result of optimize.leastsq.

Notes

Extension is possible if we want to match autocovariance instead of impulse response function.