Detects and determines outliers and simultaneously estimates the model parameters in a time series where the underlying outlier-free series follows a general seasonal or non-seasonal ARMA model.
TS_OUTLIER_IDENTIFICATION (timeseries_expression, p_value, q_value, s_value, d_value, [, delta_value[, critical_value]])
OVER (window-spec)
This function returns an outlier-free time series. TS_OUTLIER_IDENTIFICATION calls the function imsls_d_ts_outlier_identification in the IMSL libraries.
The arguments of TS_OUTLIER_IDENTIFICATION map to the IMSL library function imsls_d_ts_outlier_identification as follows:
params = imsls_d_ts_outlier_identification(n_objs, model[], z[], 0);
If delta_value is non-null, the arguments of TS_OUTLIER_IDENTIFICATION map to the IMSL library function imsls_d_ts_outlier_identification as follows:
params = imsls_d_ts_outlier_identification(n_objs, model[], z[], IMSL_DELTA, delta_value, 0);
If critical_value is non-null, the arguments of TS_OUTLIER_IDENTIFICATION map to the IMSL library function imsls_d_ts_outlier_identification as follows:
params = imsls_d_ts_outlier_identification(n_objs, model[], z[], IMSL_CRITICAL, critical_value, 0);
If both delta_value and critical_value are non-null, the arguments of TS_OUTLIER_IDENTIFICATION map to the IMSL library function imsls_d_ts_outlier_identification as follows:
params = imsls_d_ts_outlier_identification(n_objs, model[], z[], IMSL_DELTA, delta_value, IMSL_CRITICAL, critical_value, 0);
For detailed information on how the IMSL function imsls_d_ts_outlier_identification performs time series calculations, see IMSL C Numerical Library User’s Guide: Volume 2 of 2 C Stat Library.
This example shows a SQL statement containing the TS_OUTLIER_IDENTIFICATION function and the data values returned by the function. This example uses the example input data table (called DATASET) as its input data.
select ts_outlier_identification(data,1,1,1,1,0.7,3.0) over (order by rownum rows between unbounded preceding and unbounded following) as res FROM DATASET
Sybase IQ returns 50 rows:
|
res |
|---|
|
0.315523 |
|
0.485859 |
|
0.676886 |
|
1.97381 |
|
2.77555 |
|
2.73657 |
|
2.64233 |
|
4.26118 |
|
3.13641 |
|
4.16566 |
|
2.95952 |
|
2.14504 |
|
1.98799 |
|
0.805859 |
|
0.833405 |
|
2.29075 |
|
1.30045 |
|
0.467122 |
|
-0.170107 |
|
-0.256657 |
|
-0.382597 |
|
-0.505511 |
|
-1.90147 |
|
-0.981688 |
|
-1.43116 |
|
-1.39389 |
|
-2.34823 |
|
-2.91122 |
|
-0.927423 |
|
-0.044383 |
|
-0.389648 |
|
0.545008 |
|
0.614096 |
|
0.364668 |
|
1.16043 |
|
-0.654063 |
|
0.616094 |
|
2.00875 |
|
1.86696 |
|
2.80171 |
|
3.78422 |
|
4.11499 |
|
2.77188 |
|
4.00312 |
|
4.21298 |
|
5.00413 |
|
4.74498 |
|
4.89621 |
|
3.93273 |
|
4.31592 |