g13ag 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 (G13AEF not in this release) g13af to estimate the relevant parameters. The supplied state set will originally have been produced by (G13AEF not in this release) g13af, but may since have been updated by earlier calls to g13ag.
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.
Syntax
C# |
---|
public static void g13ag( double[] st, int nst, int[] mr, double[] par, double c, double[] anx, int nuv, double[] anexr, out int ifail ) |
Visual Basic |
---|
Public Shared Sub g13ag ( _ st As Double(), _ nst As Integer, _ mr As Integer(), _ par As Double(), _ c As Double, _ anx As Double(), _ nuv As Integer, _ anexr As Double(), _ <OutAttribute> ByRef ifail As Integer _ ) |
Visual C++ |
---|
public: static void g13ag( array<double>^ st, int nst, array<int>^ mr, array<double>^ par, double c, array<double>^ anx, int nuv, array<double>^ anexr, [OutAttribute] int% ifail ) |
F# |
---|
static member g13ag : st : float[] * nst : int * mr : int[] * par : float[] * c : float * anx : float[] * nuv : int * anexr : float[] * ifail : int byref -> unit |
Parameters
- st
- Type: array<System..::..Double>[]()[][]An array of size [nst]On entry: the state set derived from (G13AEF not in this release) g13af, or as modified using earlier calls of g13ag.On exit: the updated values of the state set.
- nst
- Type: System..::..Int32On entry: the number of values in the state set array st.Constraint: . (As returned by (G13AEF not in this release) g13af).
- mr
- Type: array<System..::..Int32>[]()[][]An array of size []On entry: the orders vector of the ARIMA model, in the usual notation.Constraints:
- ;
- ;
- ;
- if , ;
- if , .
- par
- Type: array<System..::..Double>[]()[][]An array of size [dim1]Note: dim1 must satisfy the constraint: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.
- c
- Type: System..::..DoubleOn entry: the constant to be subtracted from the differenced data.
- anx
- Type: array<System..::..Double>[]()[][]An array of size [nuv]On entry: the new undifferenced observations which are to be used to update st.
- nuv
- Type: System..::..Int32On entry: , the number of new observations in anx.
- anexr
- Type: array<System..::..Double>[]()[][]An array of size [nuv]On exit: the residuals corresponding to the new observations in anx.
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
The time series model is specified as outlined in Section in g13ae or g13af. 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 method.
References
None.
Error Indicators and Warnings
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, the orders vector mr is invalid (check the constraints in [Parameters]).
On entry, .
On entry, .
Accuracy
The computations are believed to be stable.
Parallelism and Performance
None.
Further Comments
The time taken by g13ag is approximately proportional to .
Example
Twelve new observations are supplied. The method updates the state set and outputs a set of residuals corresponding to the new observations.
Example program (C#): g13age.cs