TS_AUTO_UNI_AR Function [Aggregate]

Performs automatic selection and fitting of a univariate autoregressive time series model.

Syntax

TS_AUTO_UNI_AR (timeseries_expression, ar_count, ar_elem, method)
OVER (window-spec)

Licensing prerequisites

Available only with RAP – The Trading Edition Enterprise.

Parameters

Usage

This time series function returns a double-precision floating-point number containing the autoregressive estimate. TS_AUTO_UNI_AR calls the function imsls_d_auto_uni_ar in the IMSL libraries.

IMSL mapping

The arguments of TS_AUTO_UNI_AR map to the IMSL library function imsls_d_auto_uni_ar as follows:

params = imsls_d_auto_uni_ar (n_objs, z[], maxlag, p, method, 0);

For detailed information on how the function imsls_d_auto_uni_ar performs time series calculations, see IMSL C Numerical Library User’s Guide: Volume 2 of 2 C Stat Library.

Example

This example shows a SQL statement containing the TS_AUTO_UNI_AR function and the data values returned by the function. This example uses the example input data table (called DATASET) as its input data.

The following SQL statement returns the first element from an array containing two elements from the data column:
SELECT TS_AUTO_UNI_AR(data,2,1,0) OVER (ORDER BY ROWNUM rows BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS res FROM DATASET

Sybase IQ returns 50 rows, each containing the same value:

Values returned from TS_AUTO_UNI_AR

res

0.883453

0.883453

0.883453

0.883453

0.883453

0.883453

0.883453

0.883453

0.883453

...

0.883453

Standards and compatibility

Related concepts
Aggregate Time Series Forecasting and Analysis Functions
Related reference
DATASET Example Input Data Table