naginterfaces.library.tsa.multi_​varma_​update

naginterfaces.library.tsa.multi_varma_update(mlast, z, ref, predz, sefz)[source]

multi_varma_update accepts a sequence of new observations in a multivariate time series and updates both the forecasts and the standard deviations of the forecast errors. A call to multi_varma_forecast() must be made prior to calling this function in order to calculate the elements of a reference vector together with a set of forecasts and their standard errors. On a successful exit from multi_varma_update the reference vector is updated so that should future series values become available these forecasts may be updated by recalling multi_varma_update.

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

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

Parameters
mlastint

On the first call to multi_varma_update, since calling multi_varma_forecast(), must be set to to indicate that no new observations have yet been used to update the forecasts; on subsequent calls must contain the value of as output on the previous call to multi_varma_update.

zfloat, array-like, shape

must contain the value of , for , for , and where is the number of observations in the time series in the last call made to multi_varma_forecast().

reffloat, array-like, shape

Must contain the first elements of the reference vector as returned on a successful exit from multi_varma_forecast() (or a previous call to multi_varma_update).

predzfloat, array-like, shape

Nonupdated values are kept intact.

sefzfloat, array-like, shape

Nonupdated values are kept intact.

Returns
mlastint

Is incremented by to indicate that observations have now been used to update the forecasts since the last call to multi_varma_forecast().

must not be changed between calls to multi_varma_update, unless a call to multi_varma_forecast() has been made between the calls in which case should be reset to .

reffloat, ndarray, shape

The elements of are updated. The first elements store the weights . The next elements contain the forecasts of the transformed series and the next elements contain the variances of the forecasts of the transformed variables; see multi_varma_forecast(). The last elements are not updated.

vfloat, ndarray, shape

contains an estimate of the th component of , for , for .

predzfloat, ndarray, shape

contains the updated forecast of , for , for .

The columns of corresponding to the new observations since the last call to either multi_varma_forecast() or multi_varma_update are set equal to the corresponding columns of .

sefzfloat, ndarray, shape

contains an estimate of the standard error of the corresponding element of , for , for .

The columns of corresponding to the new observations since the last call to either multi_varma_forecast() or multi_varma_update are set equal to zero.

Raises
NagValueError
(errno )

On entry, and the minimum size .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, , and .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, some of the elements of the array have been corrupted.

(errno )

On entry, one (or more) of the transformations requested is invalid.

(errno )

The updated forecasts will overflow if computed.

Notes

Let , for , denote a -dimensional time series for which forecasts of have been computed using multi_varma_forecast(). Given further observations , where , multi_varma_update updates the forecasts of and their corresponding standard errors.

multi_varma_update uses a multivariate version of the procedure described in Box and Jenkins (1976). The forecasts are updated using the weights, computed in multi_varma_forecast(). If denotes the transformed value of and denotes the forecast of from time with a lead of (that is the forecast of given observations ), then

and

where is a constant vector of length involving the differencing parameters and the mean vector . By subtraction we obtain

Estimates of the residuals corresponding to the new observations are also computed as , for . These may be of use in checking that the new observations conform to the previously fitted model.

On a successful exit, the reference array is updated so that multi_varma_update may be called again should future series values become available, see Further Comments.

When a transformation has been used the forecasts and their standard errors are suitably modified to give results in terms of the original series ; see Granger and Newbold (1976).

References

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

Granger, C W J and Newbold, P, 1976, Forecasting transformed series, J. Roy. Statist. Soc. Ser. B (38), 189–203

Wei, W W S, 1990, Time Series Analysis: Univariate and Multivariate Methods, Addison–Wesley