naginterfaces.library.tsa.uni_​arima_​prelim

naginterfaces.library.tsa.uni_arima_prelim(mr, r, xv)[source]

uni_arima_prelim calculates preliminary estimates of the parameters of an autoregressive integrated moving average (ARIMA) model from the autocorrelation function of the appropriately differenced times series.

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

https://www.nag.com/numeric/nl/nagdoc_29.3/flhtml/g13/g13adf.html

Parameters
mrint, array-like, shape

The orders vector of the ARIMA model whose parameters are to be estimated. , , and refer respectively to the number of autoregressive , moving average , seasonal autoregressive and seasonal moving average parameters. , and refer respectively to the order of non-seasonal differencing, the order of seasonal differencing and the seasonal period.

rfloat, array-like, shape

The autocorrelations (starting at lag ), which must have been calculated after the time series has been appropriately differenced.

xvfloat

The series sample variance, calculated after appropriate differencing has been applied to the series.

Returns
parfloat, ndarray, shape

The first elements of contain the preliminary estimates of the ARIMA model parameters, in standard order.

rvfloat

An estimate of the residual variance of the preliminarily estimated model.

isfint, ndarray, shape

Contains success/failure indicators, one for each of the four types of parameter (autoregressive, moving average, seasonal autoregressive, seasonal moving average).

The indicator has the interpretation:

No parameter of this type is in the model.

Parameters of this type appear in the model and satisfactory preliminary estimates of this type were obtained.

Parameters of this type appear in the model but satisfactory preliminary estimates of this type were not obtainable. The estimates of this type of parameter were set to in array .

Raises
NagValueError
(errno )

The orders vector is invalid.

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: , for .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

Warns
NagAlgorithmicWarning
(errno )

Satisfactory parameter estimates could not be obtained for all parameter types in the model.

Notes

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

Preliminary estimates of the non-seasonal autoregressive parameters and the non-seasonal moving average parameters may be obtained from the sample autocorrelations relating to lags to , i.e., , of the differenced , where is assumed to follow a (possibly) seasonal ARIMA model (see Notes for uni_arima_estim for the specification of an ARIMA model).

Taking and , the , for are the solutions to the equations

The , for , are obtained from the solutions to the equations

(Cramer Wold-factorization), by setting

where are the ‘covariances’ modified in a two stage process by the autoregressive parameters.

Stage 1:

Stage 2:

The seasonal autoregressive parameters and the seasonal moving average parameters are estimated in the same way as the non-seasonal parameters, but each is replaced in the calculation by , where is the seasonal period.

An estimate of the residual variance is obtained by successively reducing the sample variance, first for non-seasonal, and then for seasonal, parameter estimates. If moving average parameters are estimated, the variance is reduced by a multiplying factor of , but otherwise by .

References

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