Returns a 1xN array of detrended data computed by subtracting the linear least squares fit from the input data stream.
Format
DETREND (INDEP, DEPEND)
Arguments
INDEP | A 1xN array of independent data. |
DEPEND | A 1xN array of data dependent on input independent data. |
Example
The following example illustrates the use of the DETREND function:
Function | DETREND(SERIES(0,1,5), {0,1,4,9,16}) |
Result | 2.0, -1.0, -2.0, -1.0, 2.0 |