NDK_DETREND

int __stdcall NDK_DETREND ( double *  X,
size_t  N,
WORD  polyOrder 
)

Detrends a time series using a regression of y against a polynomial time trend of order p.

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] polyOrder   is the order of the polynomial time trend: 0. subtracts mean (default)
Order  Description
0 subtracts mean (default)
1 constant plus trend model
2 constant plus trend and squared trend model
Remarks
  1. The time series is homogeneous or equally spaced.
  2. The time series may include missing values (NaN) at either end.
Requirements
Header SFSDK.H
Library SFSDK.LIB
DLL SFSDK.DLL
Examples


   
Namespace:  NumXLAPI
Class:  SFSDK
Scope:  Public
Lifetime:  Static
int NDK_DETREND ( double[]  pData,
UIntPtr  nSize,
short  polyOrder 
)

Detrends a time series using a regression of y against a polynomial time trend of order p.

Returns
status code of the operation
Return values
NDK_SUCCESS  Operation successful
NDK_FAILED  Operation unsuccessful. See Macros for full list.
Parameters
[in,out] pData is the univariate time series data (a one dimensional array).
[in] nSize is the number of observations in pData.
[in] polyOrder   is the order of the polynomial time trend: 0. subtracts mean (default)
Order  Description
0 subtracts mean (default)
1 constant plus trend model
2 constant plus trend and squared trend model
Remarks
  1. The time series is homogeneous or equally spaced.
  2. The time series may include missing values (NaN) at either end.
Exceptions
Exception Type Condition
None N/A
Requirements
Namespace NumXLAPI
Class SFSDK
Scope Public
Lifetime Static
Package NumXLAPI.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