g13aj 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.
Public Shared Sub g13aj ( _ mr As Integer(), _ par As Double(), _ c As Double, _ kfc As Integer, _ x As Double(), _ nx As Integer, _ <OutAttribute> ByRef rms As Double, _ st As Double(), _ <OutAttribute> ByRef nst As Integer, _ nfv As Integer, _ fva As Double(), _ fsd As Double(), _ isf As Integer(), _ <OutAttribute> ByRef ifail As Integer _ )
- Type: array<System..::..Int32>()An array of size On entry: the orders vector of the ARIMA model, in the usual notation.Constraints:
- if , ;
- if , ;
- Type: array<System..::..Double>()An array of size [dim1]Note: dim1 must satisfy the constraint:On entry: the values of the parameters, the values of the parameters, the values of the parameters, and the values of the parameters, in that order.
- Type: System..::..DoubleOn entry: , the expected value of the differenced series (i.e., is the constant correction). Where there is no constant term, c must be set to .
- Type: System..::..Int32On entry: must be set to if c was not estimated, and if c 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.Constraint: or .
- Type: array<System..::..Double>()An array of size [nx]On entry: the values of the original undifferenced time series.
- Type: System..::..Int32On entry: , the length of the original undifferenced time series.
- Type: System..::..Double%On exit: the residual variance (mean square) associated with the model.
- Type: array<System..::..Double>()An array of size [ist]On exit: the nst values of the state set.
- Type: System..::..Int32On entry: the required number of forecasts. If , no forecasts will be computed.
- Type: array<System..::..Int32>()An array of size On exit: 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.
The time series supplied to the method is assumed to follow a seasonal autoregressive integrated moving average (ARIMA) model with known parameters.
The model is defined by the following relations.
|(a)||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.|
This equation describes the seasonal structure with seasonal period ; in the absence of seasonality it reduces to .
This equation describes the non-seasonal structure.
Given the series, the constant , and the model parameters , , , , the method computes the following.
|(a)||The state set required for forecasting. This contains the minimum amount of information required for forecasting and comprises:
|(b)||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 g13ah.
Use of g13aj 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.
Box G E P and Jenkins G M (1976) Time Series Analysis: Forecasting and Control (Revised Edition) Holden–Day
Errors or warnings detected by the method:
Some error messages may refer to parameters that are dropped from this interface (NPAR) In these cases, an error in another parameter has usually caused an incorrect value to be inferred.
- On entry, , i.e., the number of terms in the differenced series is not greater than the number of parameters in the model. The model is over-parameterised.
- On entry, the workspace array w is too small.
- This indicates a failure in (F04ASF not in this release) which is used to solve the equations giving estimates of the backforecasts.
- On entry, valid values were not supplied for all parameter types in the model. Inspect array isf for further information on the parameter type(s) in error.
On entry, .
The computations are believed to be stable.
The time taken by g13aj is approximately proportional to and the square of the number of backforecasts derived.