naginterfaces.library.tsa.uni_​arima_​update

naginterfaces.library.tsa.uni_arima_update(st, mr, par, c, anx)[source]

uni_arima_update accepts a series of new observations of a time series, the model of which is already fully specified, and updates the ‘state set’ information for use in constructing further forecasts. The previous specifications of the time series model should have been obtained by using uni_arima_estim() or uni_arima_estim_easy() to estimate the relevant parameters. The supplied state set will originally have been produced by uni_arima_estim() or uni_arima_estim_easy(), but may since have been updated by earlier calls to uni_arima_update.

A set of residuals corresponding to the new observations is returned. These may be of use in checking that the new observations conform to the previously fitted model.

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

https://www.nag.com/numeric/nl/nagdoc_27.1/flhtml/g13/g13agf.html

Parameters
stfloat, array-like, shape

The state set derived from uni_arima_estim() or uni_arima_estim_easy(), or as modified using earlier calls of uni_arima_update.

mrint, array-like, shape

The orders vector of the ARIMA model, in the usual notation.

parfloat, array-like, shape

The estimates of the values of the parameters, the values of the parameters, the values of the parameters and the values of the parameters in the model – in that order, using the usual notation.

cfloat

The constant to be subtracted from the differenced data.

anxfloat, array-like, shape

The new undifferenced observations which are to be used to update .

Returns
stfloat, ndarray, shape

The updated values of the state set.

anexrfloat, ndarray, shape

The residuals corresponding to the new observations in .

Raises
NagValueError
(errno )

The orders vector is invalid.

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, and the minimum size .

Constraint: .

Notes

No equivalent traditional C interface for this routine exists in the NAG Library.

The time series model is specified as outlined in Notes for uni_arima_estim and Notes for uni_arima_estim_easy. This also describes how the state set, which contains the minimum amount of time series information needed to construct forecasts, is made up of

  1. the differenced series (uncorrected for the constant ), for ,

  2. the values required to reconstitute the original series from the differenced series ,

  3. the intermediate series , for , and

  4. the residual series , for .

If the number of original undifferenced observations was , then and .

To update the state set, given a number of new undifferenced observations , , the four series above are first reconstituted.

Differencing and residual calculation operations are then applied to the new observations and new values of and are derived.

The first values in these three series are then discarded and a new state set is obtained.

The residuals in the series corresponding to the new observations are preserved in an output array. The parameters of the time series model are not changed in this function.