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 Shared Sub g13aa ( _ x As Double(), _ nx As Integer, _ nd As Integer, _ nds As Integer, _ ns As Integer, _ xd As Double(), _ <OutAttribute> ByRef nxd As Integer, _ <OutAttribute> ByRef ifail As Integer _ )
public: static void g13aa( array<double>^ x, int nx, int nd, int nds, int ns, array<double>^ xd, [OutAttribute] int% nxd, [OutAttribute] int% ifail )
- Type: array<System..::..Double>()An array of size [nx]On entry: the undifferenced time series, , for .
- Type: System..::..Int32On entry: , the number of values in the undifferenced time series.Constraint: .
- Type: System..::..Int32On entry: , the order of non-seasonal differencing.Constraint: .
- Type: System..::..Int32On entry: , the order of seasonal differencing.Constraint: .
- Type: System..::..Int32On entry: , the seasonality.Constraints:
- if , ;
- if , .
- Type: array<System..::..Double>()An array of size [nx]On exit: the differenced values in elements to , and reconstitution data in the remainder of the array.
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:
On entry, , or , or , or when . On entry, .
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.