Calculates the least-square estimates of parameters for an autoregressive moving average (ARMA) model, and returns an estimated constant.
This time series function returns a double-precision floating-point value containing the constant estimate produced by the function. TS_ARMA_CONST calls the function imsls_d_arma in the IMSL libraries.
The arguments of TS_ARMA_CONST map to the IMSL library function imsls_d_arma as follows:
params = imsls_d_arma(n_objs, z, p, q, IMSLS_CONSTANT, method_id, 0);
For detailed information on how the function imsls_d_arma 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_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.
SELECT TS_ARMA_CONST(data,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:
select ts_arma_ar(data,1,1,0) over (order by rownum rows between unbounded preceding and unbounded following) as ar_param, ts_arma_ma(data,1,1,0) over (order by rownum rows between unbounded preceding and unbounded following) as ma_param, ts_arma_const(data,0) over (order by rownum rows between unbounded preceding and unbounded following) as const_param FROM DATASET
Sybase IQ returns 50 rows of data, each containing the same three values:
ar_param |
ma_param |
const_param |
---|---|---|
0.898793 |
0.105075 |
0.082077 |
0.898793 |
0.105075 |
0.082077 |
0.898793 |
0.105075 |
0.082077 |
0.898793 |
0.105075 |
0.082077 |
0.898793 |
0.105075 |
0.082077 |
0.898793 |
0.105075 |
0.082077 |
0.898793 |
0.105075 |
0.082077 |
0.898793 |
0.105075 |
0.082077 |
0.898793 |
0.105075 |
0.082077 |
... |
... |
... |
0.898793 |
0.105075 |
0.082077 |