NDK_INTEG

int __stdcall NDK_INTEG ( double *  X,
size_t  N,
size_t  S,
size_t  D,
double *  X0,
size_t  N0 
)

Returns an array of cells for the integrated time series (inverse operator of NDK_DIFF).

Returns
status code of the operation
Return values
NDK_SUCCESS  Operation successful
NDK_FAILED  Operation unsuccessful. See Macros for full list.
Parameters
[in,out] X is the univariate time series data (a one dimensional array).
[in] N is the number of observations in X.
[in] S is the lag order (e.g. k=0 (no lag), k=1 (1st lag), etc.).
[in] D is the number of repeated differencing (e.g. d=0 (none), d=1 (difference once), 2=(difference twice), etc.).
[in] X0   is the initial (un-differenced) univariate time series data (a one dimensional array). If missing (i.e. NULL), zeros are assumed.
[in] N0   is the number of observations in X0.
Remarks
  1. The input (differenced) time series (i.e. Y) is defined as follow: \[ Y_t=\left(1-L^k\right)^d X_t\] Where:
    • \(\left[Y_t\right]\) is the differenced time series.
    • \(\left[X_t\right]\) is the input time series.
    • \(L\) is the lag (backward shift or backshift) operator.
    • \(k\) is the seasonal difference order.
    • \(d\) is the number of repeated differencing.
  2. The initial values array is assumed to end at the last non-missing value in the difference array start
  3. If the difference cell range includes missing values at the beginning, the result array will substute the initial values for missing ones; as we assume the initial values cover up to 1st non-missing value.
  4. The time series is homogeneous or equally spaced.
  5. The time series may include missing values (e.g. NaN) at either end.
  6. The integral transform operator requires an SxD points in the initial time series (i.e. X0). If X0 is missing or has fewer points, points with zeros values are appended.
  7. The time order (i.e. ascending or descending) for the initial (un-differenced) time series X0) is assumed the same as the differenced time series (Y).
  8. Similar to the DIFF operator, INTG can be cascaded (i.e. INTG(INTG(INTG...)))), but care must be taken when you specify the initial time series for each level.
  9. The lag order (i.e. k) must be non-negative and smaller than the time series size. \[ 0 \leq K \leq T-1 \]
Requirements
Header SFSDK.H
Library SFSDK.LIB
DLL SFSDK.DLL
Examples


   
Namespace:  NumXLAPI
Class:  SFSDK
Scope:  Public
Lifetime:  Static
int NDK_INTEG ( double[]  data,
UIntPtr  nSize,
UIntPtr  nLag,
UIntPtr  nDifference,
double[]  pX0,
UIntPtr  nX0Len 
)

Returns an array of cells for the integrated time series (inverse operator of NDK_DIFF).

Returns
status code of the operation
Return values
NDK_SUCCESS  Operation successful
NDK_FAILED  Operation unsuccessful. See Macros for full list.
Parameters
[in,out] data is the univariate time series data (a one dimensional array).
[in] nSize is the number of observations in data.
[in] nLag is the lag order (e.g. k=0 (no lag), k=1 (1st lag), etc.).
[in] nDifference is the number of repeated differencing (e.g. d=0 (none), d=1 (difference once), 2=(difference twice), etc.).
[in] pX0   is the initial (un-differenced) univariate time series data (a one dimensional array). If missing (i.e. NULL), zeros are assumed.
[in] nX0Len   is the number of observations in pX0.
Remarks
  1. The input (differenced) time series (i.e. Y) is defined as follow: \[ Y_t=\left(1-L^k\right)^d X_t\] Where:
    • \(\left[Y_t\right]\) is the differenced time series.
    • \(\left[X_t\right]\) is the input time series.
    • \(L\) is the lag (backward shift or backshift) operator.
    • \(k\) is the seasonal difference order.
    • \(d\) is the number of repeated differencing.
  2. The initial values array is assumed to end at the last non-missing value in the difference array start
  3. If the difference cell range includes missing values at the beginning, the result array will substute the initial values for missing ones; as we assume the initial values cover up to 1st non-missing value.
  4. The time series is homogeneous or equally spaced.
  5. The time series may include missing values (e.g. NaN) at either end.
  6. The integral transform operator requires an SxD points in the initial time series (i.e. pX0). If pX0 is missing or has fewer points, points with zeros values are appended.
  7. The time order (i.e. ascending or descending) for the initial (un-differenced) time series pX0) is assumed the same as the differenced time series (Y).
  8. Similar to the DIFF operator, INTG can be cascaded (i.e. INTG(INTG(INTG...)))), but care must be taken when you specify the initial time series for each level.
  9. The lag order (i.e. k) must be non-negative and smaller than the time series size. \[ 0 \leq K \leq T-1 \]
Requirements
Header SFSDK.H
Library SFSDK.LIB
DLL SFSDK.DLL
Examples


   
References
* Hamilton, J .D.; Time Series Analysis , Princeton University Press (1994), ISBN 0-691-04289-6
* Tsay, Ruey S.; Analysis of Financial Time Series John Wiley & SONS. (2005), ISBN 0-471-690740
* D. S.G. Pollock; Handbook of Time Series Analysis, Signal Processing, and Dynamics; Academic Press; Har/Cdr edition(Nov 17, 1999), ISBN: 125609906
* Box, Jenkins and Reisel; Time Series Analysis: Forecasting and Control; John Wiley & SONS.; 4th edition(Jun 30, 2008), ISBN: 470272848