g13ah produces forecasts of a time series, given a time series model which has already been fitted to the time series using (G13AEF not in this release) g13af. The original observations are not required, since g13ah uses as input either the original state set produced by (G13AEF not in this release) g13af or the state set updated by a series of new observations using g13ag. Standard errors of the forecasts are also provided.
Syntax
C# |
---|
public static void g13ah( double[] st, int nst, int[] mr, double[] par, double c, double rms, int nfv, double[] fva, double[] fsd, out int ifail ) |
Visual Basic |
---|
Public Shared Sub g13ah ( _ st As Double(), _ nst As Integer, _ mr As Integer(), _ par As Double(), _ c As Double, _ rms As Double, _ nfv As Integer, _ fva As Double(), _ fsd As Double(), _ <OutAttribute> ByRef ifail As Integer _ ) |
Visual C++ |
---|
public: static void g13ah( array<double>^ st, int nst, array<int>^ mr, array<double>^ par, double c, double rms, int nfv, array<double>^ fva, array<double>^ fsd, [OutAttribute] int% ifail ) |
F# |
---|
static member g13ah : st : float[] * nst : int * mr : int[] * par : float[] * c : float * rms : float * nfv : int * fva : float[] * fsd : 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 originally, or as modified using earlier calls of g13ag.
- 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 which specify the model and which were output originally by (G13AEF not in this release) g13af.
- c
- Type: System..::..DoubleOn entry: , the value of the model constant. This will have been output by (G13AEF not in this release) g13af.
- rms
- Type: System..::..DoubleOn entry: , the residual variance associated with the model.Constraint: .
- nfv
- Type: System..::..Int32On entry: , the required number of forecasts.Constraint: .
- fva
- Type: array<System..::..Double>[]()[][]An array of size [nfv]On exit: nfv forecast values relating to the original undifferenced series.
- fsd
- Type: array<System..::..Double>[]()[][]An array of size [nfv]
- 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 original time series is , for and parameters have been fitted to the model of this time series using (G13AEF not in this release) g13af.
Forecasts of , for , are calculated in five stages, as follows:
(i) | set for , where is the number of differenced values in the series; |
(ii) | calculate the values of , for , and ; |
(iii) | calculate the values of , for , where and for are the first values in the state set, corrected for the constant; |
(iv) | add the constant term to give the differenced series , for ; |
(v) | the differencing operations are reversed to reconstitute , for . |
The standard errors of these forecasts are given by , for , where , is the residual variance of , and is the coefficient expressing the dependence of on .
To calculate , for , the following device is used.
A copy of the state set is initialized to zero throughout and the calculations outlined above for the construction of forecasts are carried out with the settings , and , for .
The resulting quantities corresponding to the sequence are precisely , .
The supplied time series model is used throughout these calculations, with the exception that the constant term is taken to be zero.
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 given in [Parameters]).
On entry, .
On entry, .
On entry, .
Accuracy
The computations are believed to be stable.
Parallelism and Performance
None.
Further Comments
The time taken by g13ah is approximately proportional to .
Example
These consist of a set of orders indicating that there are two moving average parameters (one non-seasonal, and one seasonal with periodicity ).
The model constant is zero.
The state set contains values.
In addition the residual mean-square derived when the model was originally fitted is given.
Twelve forecasts and their associated errors are obtained.
Example program (C#): g13ahe.cs