Calculates the exact maximum likelihood estimation of the
parameters in a univariate ARMA (autoregressive moving average)
time series model, and returns the constant estimate.
Syntax
TS_MAX_ARMA_CONST (timeseries_expression)
OVER (window-spec)
Licensing prerequisites
Available only with RAP – The Trading Edition Enterprise.
Parameters
-
timeseries_expression –
a numeric expression, generally a column name, containing
an element in a time series.
-
window-spec –
TS_MAX_ARMA_CONST is an OLAP function
requiring an OVER () clause.
Usage
This function returns a double-precision floating-point value
containing the constant estimate. TS_MAX_ARMA_CONST calls
the function imsls_d_arma in the
IMSL libraries.
IMSL mapping
The arguments of TS_MAX_ARMA_CONST map
to the IMSL library function imsls_d_arma as
follows:
params = imsls_d_max_arma(n_objs, z, p, q, 0);
-
n_objs –
contains the number of rows in the current window frame.
-
z[] –
contains the value of timeseries_expression for the
current window frame.
-
p –
= 1.
-
q –
= 1.
For detailed information on how the IMSL function imsls_d_arma 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_MAX_ARMA_CONST function and the
data values returned by the function. This example uses the example input data
table (called DATASET) as its input data. See DATASET example input data.
The following SQL statement returns the constant estimate
of the maximum likelihood autoregressive calculation on data from
the
data column:
select ts_max_arma_const(data) 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_MAX_ARMA_CONST
|
res
|
|
0.107555
|
|
0.107555
|
|
0.107555
|
|
0.107555
|
|
0.107555
|
|
0.107555
|
|
0.107555
|
|
0.107555
|
|
0.107555
|
|
0.107555
|
|
...
|
|
0.107555
|
Standards and compatibility
-
SQL –
ISO/ANSI SQL compliant
-
Sybase –
not compatible with SQL Anywhere or Adaptive Server Enterprise
See also
System Administration Guide: Volume 2 > Using OLAP
IMSL C Numerical Library User’s Guide: Volume 2 of 2 C Stat Library