g13dk accepts a sequence of new observations in a multivariate time series and updates both the forecasts and the standard deviations of the forecast errors. A call to g13dj must be made prior to calling this method in order to calculate the elements of a reference vector together with a set of forecasts and their standard errors. On a successful exit from g13dk the reference vector is updated so that should future series values become available these forecasts may be updated by recalling g13dk.
Syntax
C# |
---|
public static void g13dk( int k, int lmax, int m, ref int mlast, double[,] z, double[] dnref, double[,] v, double[,] predz, double[,] sefz, out int ifail ) |
Visual Basic |
---|
Public Shared Sub g13dk ( _ k As Integer, _ lmax As Integer, _ m As Integer, _ ByRef mlast As Integer, _ z As Double(,), _ dnref As Double(), _ v As Double(,), _ predz As Double(,), _ sefz As Double(,), _ <OutAttribute> ByRef ifail As Integer _ ) |
Visual C++ |
---|
public: static void g13dk( int k, int lmax, int m, int% mlast, array<double,2>^ z, array<double>^ dnref, array<double,2>^ v, array<double,2>^ predz, array<double,2>^ sefz, [OutAttribute] int% ifail ) |
F# |
---|
static member g13dk : k : int * lmax : int * m : int * mlast : int byref * z : float[,] * dnref : float[] * v : float[,] * predz : float[,] * sefz : float[,] * ifail : int byref -> unit |
Parameters
- k
- Type: System..::..Int32On entry: , the dimension of the multivariate time series.Constraint: .
- lmax
- Type: System..::..Int32On entry: the number, , of forecasts requested in the call to g13dj.Constraint: .
- m
- Type: System..::..Int32On entry: , the number of new observations available since the last call to either g13dj or g13dk. The number of new observations since the last call to g13dj is then .Constraint: .
- mlast
- Type: System..::..Int32%On entry: on the first call to g13dk, since calling g13dj, mlast must be set to to indicate that no new observations have yet been used to update the forecasts; on subsequent calls mlast must contain the value of mlast as output on the previous call to g13dk.On exit: is incremented by to indicate that observations have now been used to update the forecasts since the last call to g13dj.Constraint: .
- z
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, m]Note: dim1 must satisfy the constraint:On entry: must contain the value of , for and , and where is the number of observations in the time series in the last call made to g13dj.
- dnref
- Type: array<System..::..Double>[]()[][]An array of size [lref]
- v
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, m]Note: dim1 must satisfy the constraint:On exit: contains an estimate of the th component of , for and .
- predz
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, lmax]Note: dim1 must satisfy the constraint:On entry: nonupdated values are kept intact.
- sefz
- Type: array<System..::..Double,2>[,](,)[,][,]An array of size [dim1, lmax]Note: dim1 must satisfy the constraint:On entry: nonupdated values are kept intact.
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
Let , for , denote a -dimensional time series for which forecasts of have been computed using g13dj. Given further observations , where , g13dk updates the forecasts of and their corresponding standard errors.
g13dk uses a multivariate version of the procedure described in Box and Jenkins (1976). The forecasts are updated using the weights, computed in g13dj. If denotes the transformed value of and denotes the forecast of from time with a lead of (that is the forecast of given observations ), then
and
where is a constant vector of length involving the differencing parameters and the mean vector . By subtraction we obtain
Estimates of the residuals corresponding to the new observations are also computed as , for . These may be of use in checking that the new observations conform to the previously fitted model.
On a successful exit, the reference array is updated so that g13dk may be called again should future series values become available, see [Further Comments].
When a transformation has been used the forecasts and their standard errors are suitably modified to give results in terms of the original series ; see Granger and Newbold (1976).
References
Box G E P and Jenkins G M (1976) Time Series Analysis: Forecasting and Control (Revised Edition) Holden–Day
Granger C W J and Newbold P (1976) Forecasting transformed series J. Roy. Statist. Soc. Ser. B 38 189–203
Wei W W S (1990) Time Series Analysis: Univariate and Multivariate Methods Addison–Wesley
Error Indicators and Warnings
Errors or warnings detected by the method:
Some error messages may refer to parameters that are dropped from this interface
(KMAX) In these
cases, an error in another parameter has usually caused an incorrect value to be inferred.
On entry, , or , or , or , or , or .
- On entry, one or more of the elements of z is invalid, for the transformation being used; that is you may be trying to log or square root a series, some of whose values are negative.
- This is an unlikely exit. For one of the series, overflow will occur if the forecasts are updated. You should check whether the elements of ref have been corrupted.
Accuracy
The matrix computations are believed to be stable.
Parallelism and Performance
None.
Further Comments
If a further observations, , become available, then forecasts of may be updated by recalling g13dk with . Note that m and the contents of the array z are the only quantities which need updating; mlast is updated on exit from the previous call. On a successful exit, v contains estimates of ; columns of predz contain the new observed values and columns of sefz are set to zero.