naginterfaces.library.tsa.uni_​arima_​forcecast

naginterfaces.library.tsa.uni_arima_forcecast(mr, par, c, kfc, x, ist, nfv, ifv)[source]

uni_arima_forcecast applies a fully specified seasonal ARIMA model to an observed time series, generates the state set for forecasting and (optionally) derives a specified number of forecasts together with their standard deviations.

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

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

Parameters
mrint, array-like, shape

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

parfloat, array-like, shape

The values of the parameters, the values of the parameters, the values of the parameters, and the values of the parameters, in that order.

cfloat

, the expected value of the differenced series (i.e., is the constant correction). Where there is no constant term, must be set to .

kfcint

Must be set to if was not estimated, and if was estimated. This is irrespective of whether or not . The only effect is that the residual degrees of freedom are one greater when . Assuming the supplied time series to be the same as that to which the model was originally fitted, this ensures an unbiased estimate of the residual mean-square.

xfloat, array-like, shape

The values of the original undifferenced time series.

istint

The dimension of the array .

nfvint

The required number of forecasts. If , no forecasts will be computed.

ifvint

The dimension of the arrays and .

Returns
rmsfloat

The residual variance (mean square) associated with the model.

stfloat, ndarray, shape

The values of the state set.

nstint

The number of values in the state set array .

fvafloat, ndarray, shape

If , contains the forecast values relating to the original undifferenced time series.

fsdfloat, ndarray, shape

If , contains the estimated standard errors of the forecast values.

isfint, ndarray, shape

Contains validity indicators, one for each of the four possible parameter types in the model (autoregressive, moving average, seasonal autoregressive, seasonal moving average), in that order.

Each indicator has the interpretation:

On entry the set of parameter values of this type does not satisfy the stationarity or invertibility test conditions.

No parameter of this type is in the model.

Valid parameter values of this type have been supplied.

Raises
NagValueError
(errno )

On entry, .

Constraint: or .

(errno )

The orders vector is invalid.

(errno )

On entry, .

Constraint: .

(errno )

The model is over-parameterised.

(errno )

On entry, and the minimum size .

Constraint: .

(errno )

Unable to calculate the latest estimates of the backforecasts.

(errno )

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

(errno )

On entry, and .

Constraint: .

Notes

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

The time series supplied to the function is assumed to follow a seasonal autoregressive integrated moving average (ARIMA) model with known parameters.

The model is defined by the following relations.

  1. where is the result of applying non-seasonal differencing of order and seasonal differencing of seasonality and order to the series , and is a constant.

  2. This equation describes the seasonal structure with seasonal period ; in the absence of seasonality it reduces to .

  3. This equation describes the non-seasonal structure.

Given the series, the constant , and the model parameters , , , , the function computes the following.

  1. The state set required for forecasting. This contains the minimum amount of information required for forecasting and comprises:

    1. the differenced series , for ;

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

    3. the intermediate series , for ;

    4. the residual series , for , where .

  2. A set of forecasts of and their estimated standard errors, , for ( may be zero).

    The forecasts and estimated standard errors are generated from the state set, and are identical to those that would be produced from the same state set by uni_arima_forecast_state().

Use of uni_arima_forcecast should be confined to situations in which the state set for forecasting is unknown. Forecasting from the series requires recalculation of the state set and this is relatively expensive.

References

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