naginterfaces.library.tsa.multi_​diff

naginterfaces.library.tsa.multi_diff(z, tr, dord, delta)[source]

multi_diff differences and/or transforms a multivariate time series. It is intended to be used prior to multi_varma_estimate() to fit a vector autoregressive moving average (VARMA) model to the differenced/transformed series.

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

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

Parameters
zfloat, array-like, shape

must contain, , the th component of , for , for .

trstr, length 1, array-like, shape

indicates whether the th time series is to be transformed, for .

No transformation is used.

A log transformation is used.

A square root transformation is used.

dordint, array-like, shape

The order of differencing for each series, .

deltafloat, array-like, shape

If , then must be set equal to , for , for .

If , is not referenced.

Returns
wfloat, ndarray, shape

contains the value of , for , for .

ndint

The number of differenced values, , in the series, where .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, , and .

Constraint: .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, and is invalid.

Constraint: , or .

(errno )

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

Notes

For certain time series it may first be necessary to difference the original data to obtain a stationary series before calculating autocorrelations, etc. This function also allows you to apply either a square root or a log transformation to the original time series to stabilize the variance if required.

If the order of differencing required for the th series is , then the differencing operator is defined by , where is the backward shift operator; that is, . Let denote the maximum of the orders of differencing, , over the series. The function computes values of the differenced/transformed series , for , as follows:

where are the transformed values of the original -dimensional time series .

The differencing parameters , for and , must be supplied by you. If the th series does not require differencing, then .

References

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

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