TD_ARIMAVALIDATE Function Examples | Teradata Vantage - TD_ARIMAVALIDATE Examples - Teradata Vantage

Database Unbounded Array Framework Time Series Functions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
ncd1634149624743.ditamap
dita:ditavalPath
ruu1634160136230.ditaval
dita:id
ncd1634149624743

Example: TD_ARIMAVALIDATE Call

This function creates the primary results set (layer).

EXECUTE FUNCTION INTO VOLATILE ART (ART_VAL_FLOW_TS)
TD_ARIMAVALIDATE (
ART_SPEC (
   TABLE_NAME (ART_EST_FLOW_TS)
  ),
FUNC_PARAMS (
  FIT_METRICS(1),
  RESIDUALS(1)
),
OUTPUT_FMT(INDEX_STYLE(FLOW_THROUGH))
);

TD_ARIMAVALIDATE Output

This is the primary result set (layer).

SELECT * FROM ARMA_VAL_FLOW_TS;
One 1
ROW_I 0
NUM_SAMPLES 10
VAR_COUNT 7
AIC 1.12883832074012E 001
SBIC 1.15001927724970E 001
HQIC 1.10560286307483E 001
MLR -5.54419160370058E 001
MSE 1.97001830665498E 004

Example: Call for Residual Result Set

EXECUTE FUNCTION INTO VOLATILE ART(ARMA_VAL_FITRESIDUALS)
TD_EXTRACT_RESULTS(ART_SPEC(TABLE_NAME(ARMA_VAL_RESULTS),LAYER(ARTFITRESIDUALS) ));

Residual Result Set Output

SELECT * FROM ARMA_VAL_FITRESIDUALS;
One ROW_I            ACTUAL_VALUE            CALC_VALUE            RESIDUAL
---------------------------------------------------------------------------
1  2014-01-21 08:00:00.000016   4.34000000000000E 002   3.58283803851913E 002   7.57161961480870E 001
1  2014-01-22 08:00:00.000017   2.20000000000000E 002   3.05414237261354E 002  -8.54142372613545E 001
1  2014-01-23 08:00:00.000018   3.74000000000000E 002   3.78214144770345E 002  -4.21414477034462E 000
1  2014-01-24 08:00:00.000019   3.08000000000000E 002   3.02699896567743E 002   5.30010343225653E 000
1  2014-01-25 08:00:00.000020   2.20000000000000E 002   3.32152731174251E 002  -1.12152731174251E 002
1  2014-01-26 08:00:00.000021   3.11000000000000E 002   3.90166837902411E 002  -7.91668379024109E 001
1  2014-01-27 08:00:00.000022   1.81000000000000E 002   3.61089393115972E 002  -1.80089393115973E 002
1  2014-01-28 08:00:00.000023   2.74000000000000E 002   4.71544775300067E 002  -1.97544775300067E 002
1  2014-01-29 08:00:00.000024   3.03000000000000E 002   4.75444599614643E 002  -1.72444599614643E 002
1  2014-01-30 08:00:00.000025   2.44000000000000E 002   4.96761854788430E 002  -2.52761854788430E 002