naginterfaces.library.tsa.multi_​filter_​transf

naginterfaces.library.tsa.multi_filter_transf(y, mr, par, cy=None)[source]

multi_filter_transf filters a time series by a transfer function model.

For full information please refer to the NAG Library document for g13bb

https://support.nag.com/numeric/nl/nagdoc_30/flhtml/g13/g13bbf.html

Parameters
yfloat, array-like, shape

The backforecasts starting with backforecast at time to backforecast at time followed by the time series starting at time , where . If there are no backforecasts either because the ARIMA model for the time series is not known or because it is known but has no moving average terms, then the time series starts at the beginning of .

mrint, array-like, shape

The orders vector for the filtering transfer function model followed by the orders vector for the ARIMA model for the time series if the latter is known. The transfer function model orders appear in the standard form as given in the G13 Introduction. Note that if the ARIMA model for the time series is supplied then the function will assume that the first values of the array are backforecasts.

parfloat, array-like, shape

The parameters of the filtering transfer function model followed by the parameters of the ARIMA model for the time series. In the transfer function model the parameters are in the standard order of MA-like followed by AR-like operator parameters. In the ARIMA model the parameters are in the standard order of non-seasonal AR and MA followed by seasonal AR and MA.

cyNone or float, optional

If the ARIMA model is known (i.e., ), must specify the constant term of the ARIMA model for the time series. If this model is not known (i.e., ) then is not used.

Returns
bfloat, ndarray, shape

The filtered output series. If the ARIMA model for the time series was known, and hence backforecasts were supplied in , then contains ‘filtered’ backforecasts followed by the filtered series. Otherwise, the filtered series begins at the start of just as the original series began at the start of . In either case, if the value of the series at time is held in , then the filtered value at time is held in .

Raises
NagValueError
(errno )

On entry, and the minimum size .

Constraint: if is not None then , otherwise .

(errno )

On entry, .

Constraint: must be inconsistent with .

(errno )

On entry, , and .

Constraint: .

(errno )

On entry, , and .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, , .

Constraint: .

(errno )

On entry, .

Constraint: or .

(errno )

A supplied model has invalid parameters.

(errno )

The supplied time series is too short.

(errno )

The matrix used to solve for starting values for MA is singular.

Notes

From a given series a new series is calculated using a supplied (filtering) transfer function model according to the equation

As in the use of multi_filter_arima(), large transient errors may arise in the early values of due to ignorance of for , and two possibilities are allowed.

  1. The equation (1) is applied from so all terms in on the right-hand side of (1) are known, the unknown set of values for being taken as zero.

  2. The unknown values of for are estimated by backforecasting exactly as for multi_filter_arima().

References

Box, G E P and Jenkins, G M, 1976, Time Series Analysis: Forecasting and Control, (Revised Edition), Holden–Day