Performs a forward or inverse Box-Cox power transformation.
TS_BOX_COX_XFORM returns the corresponding calculated transformed value for each element in the time series; it calls the function imsls_d_box_cox_transform in the IMSL libraries.
The arguments of TS_BOX_COX_XFORM map to the IMSL library function imsls_d_box_cox_transform as follows:
params = imsls_d_box_cox_transform(n_objs, z[], power, IMSLS_SHIFT, shift [, IMSLS_INVERSE], 0);
For detailed information on how the function imsls_d_box_cox_transform performs time series calculations, see IMSL C Numerical Library User’s Guide: Volume 2 of 2 C Stat Library.
This example shows an input data table, a SQL statement containing the TS_BOX_COX_XFORM function, and the data values returned by the function. This example uses the following table (called BOX_COX_XFORM_DATASET) as its input data. The BOX_COX_XFORM_DATASET table contains 13 rows of time series data:
rownum |
data |
---|---|
1 |
7 |
2 |
26 |
3 |
6 |
4 |
60 |
5 |
78.5 |
6 |
1 |
7 |
29 |
8 |
15 |
9 |
52 |
10 |
74.3 |
11 |
11 |
12 |
56 |
13 |
8 |
SELECT TS_BOX_COX_XFORM(data,1.0,1.0,0) OVER (ORDER BY rownum ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS res FROM BOX_COX_XFORM_DATASET
Sybase IQ returns the following 13 rows: