g13aa carries out non-seasonal and seasonal differencing on a time series. Information which allows the original series to be reconstituted from the differenced series is also produced. This information is required in time series forecasting.
public static void g13aa(  x, nx, nd, nds, ns,  xd, out nxd, out ifail )
|Visual Basic (Declaration)|
Public Shared Sub g13aa ( _ x As (), _ nx As , _ nd As , _ nds As , _ ns As , _ xd As (), _ < > ByRef nxd As , _ < > ByRef ifail As _ )
public: static void g13aa( array< >^ x, nx, nd, nds, ns, array< >^ xd, [ ] % nxd, [ ] % ifail )
static member g13aa : x:  * nx: * nd: * nds: * ns: * xd:  * nxd: byref * ifail: byref -> unit
- Type: array<
>()An array of size [nx]On entry: the undifferenced time series, , for .
On entry: , the number of values in the undifferenced time series.Constraint: .
On entry: , the order of non-seasonal differencing.Constraint: .
On entry: , the order of seasonal differencing.Constraint: .
On entry: , the seasonality.Constraints:
- if , ;
- if , .
- Type: array<
>()An array of size [nx]On exit: the differenced values in elements to , and reconstitution data in the remainder of the array.
On exit: the number of differenced values in the array xd.
On exit: unless the method detects an error (see [Error Indicators and Warnings]).
Let be the th value of a time series , for after non-seasonal differencing of order and seasonal differencing of order (with period or seasonality ). In general,
Non-seasonal differencing up to the required order is obtained using
Seasonal differencing up to the required order is then obtained using
Mathematically, the sequence in which the differencing operations are performed does not affect the final resulting series of values.
Errors or warnings detected by the method:
The computations are believed to be stable.
The time taken by g13aa is approximately proportional to .
This example reads in a set of data consisting of observations from a time series. Non-seasonal differencing of order and seasonal differencing of order (with seasonality of ) are applied to the input data, giving an output array holding differenced values and values which can be used to reconstitute the output array.