TS_MAX_ARMA_LIKELIHOOD Function [Aggregate]

Calculates the exact maximum likelihood estimation of the parameters in a univariate ARMA (autoregressive moving average) time series model, and returns likelihood value (ln) for the fitted model.

Syntax

TS_MAX_ARMA_LIKELIHOOD (timeseries_expression)
OVER (window-spec)

Licensing Prerequisites

Available only with RAP – The Trading Edition Enterprise.

Parameters

Usage

This function returns a double-precision floating-point value containing the value of -2*(ln(likelihood)). TS_MAX_ARMA_LIKELIHOOD calls the function imsls_d_max_arma in the IMSL libraries.

IMSL Mapping

The arguments of TS_MAX_ARMA_LIKELIHOOD map to the IMSL library function imsls_d_max_arma as follows:

params = imsls_d_max_arma(n_objs, z, p, q, IMSLS_LOG_LIKELIHOOD, &likelihood, 0);

For detailed information on how the IMSL function imsls_d_max_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_LIKELIHOOD 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 likelihood value of the maximum likelihood estimation on data from the data column:
Select ts_max_arma_likelihood(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_LIKELIHOOD

res

-11.7818

-11.7818

-11.7818

-11.7818

-11.7818

-11.7818

-11.7818

-11.7818

-11.7818

-11.7818

...

-11.7818

Standards and Compatibility

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