g13agf accepts a series of new observations of a time series, the model of which is already fully specified, and updates the ‘state set’ information for use in constructing further forecasts. The previous specifications of the time series model should have been obtained by using g13aeforg13aff to estimate the relevant parameters. The supplied state set will originally have been produced by g13aeforg13aff, but may since have been updated by earlier calls to g13agf.
A set of residuals corresponding to the new observations is returned. These may be of use in checking that the new observations conform to the previously fitted model.
The routine may be called by the names g13agf or nagf_tsa_uni_arima_update.
3Description
The time series model is specified as outlined in Section 3 in g13aeforg13aff. This also describes how the state set, which contains the minimum amount of time series information needed to construct forecasts, is made up of
(i)the differenced series (uncorrected for the constant ), for ,
(ii)the values required to reconstitute the original series from the differenced series ,
(iii)the intermediate series
, for
, and
(iv)the residual series , for .
If the number of original undifferenced observations was , then and .
To update the state set, given a number of new undifferenced observations , , the four series above are first reconstituted.
Differencing and residual calculation operations are then applied to the new observations and new values of and are derived.
The first values in these three series are then discarded and a new state set is obtained.
The residuals in the series corresponding to the new observations are preserved in an output array. The parameters of the time series model are not changed in this routine.
4References
None.
5Arguments
1: – Real (Kind=nag_wp) arrayInput/Output
On entry: the state set derived from g13aeforg13aff, or as modified using earlier calls of g13agf.
On exit: the updated values of the state set.
2: – IntegerInput
On entry: the number of values in the state set array st.
On entry: the orders vector of the ARIMA model, in the usual notation.
Constraints:
;
;
;
if , ;
if , .
4: – Real (Kind=nag_wp) arrayInput
On entry: the estimates of the values of the parameters, the values of the parameters, the values of the parameters and the values of the parameters in the model – in that order, using the usual notation.
5: – IntegerInput
On entry: the number of , , and parameters in the model.
Constraint:
.
6: – Real (Kind=nag_wp)Input
On entry: the constant to be subtracted from the differenced data.
7: – Real (Kind=nag_wp) arrayInput
On entry: the new undifferenced observations which are to be used to update st.
8: – IntegerInput
On entry: , the number of new observations in anx.
9: – Real (Kind=nag_wp) arrayOutput
On exit: the residuals corresponding to the new observations in anx.
10: – Real (Kind=nag_wp) arrayWorkspace
11: – IntegerInput
On entry: the dimension of the array wa as declared in the (sub)program from which g13agf is called.
Constraint:
.
12: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
An unexpected error has been triggered by this routine. Please
contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
7Accuracy
The computations are believed to be stable.
8Parallelism and Performance
g13agf is not threaded in any implementation.
9Further Comments
The time taken by g13agf is approximately proportional to .
10Example
The following program is based on data derived from a study of monthly airline passenger totals (in thousands) to which a logarithmic transformation had been applied. The time series model was based on seasonal and non-seasonal differencing both of order , with seasonal period . The number of parameters estimated was two: a non-seasonal moving average parameter with value and a seasonal moving average parameter with value . There was no constant correction. These, together with the state set array, were obtained using g13aef.
Twelve new observations are supplied. The routine updates the state set and outputs a set of residuals corresponding to the new observations.