Example: TD_AUTOARIMA Call for Best Model Using AIC Value and a Grid Search Algorithm
The ARTFITRESIDUALS and ARTARMAROOTS layers are required for this call.
EXECUTE FUNCTION INTO ART(myart) TD_AUTOARIMA( SERIES_SPEC( TABLE_NAME(covid_confirm_sd), ROW_AXIS(SEQUENCE(row_axis)), SERIES_ID(city), PAYLOAD(FIELDS(cnumber), CONTENT(REAL))), FUNC_PARAMS( MAX_PQ_NONSEASONAL(3,3), STATIONARY(0), STEPWISE(0), RESIDUALS(1), ARMA_ROOTS(1) ) );
TD_AUTOARIMA Output
SELECT * FROM myart
CITY SanDiego ROW_I 0 COEFF_NAME A R 1 COEFF_VALUE 9.75171474425615E-001 city SanDiego ROW_I 1 COEFF_NAME M A 1 COEFF_VALUE -1.13270038481129E 000 city SanDiego ROW_I 2 COEFF_NAME M A 2 COEFF_VALUE 9.75304228428513E-002 city SanDiego ROW_I 3 COEFF_NAME M A 3 COEFF_VALUE 3.36060010300250E-001
Example: Call for Tertiary Result of TD_AUTOARIMA
EXECUTE FUNCTION INTO ART(myart_res) TD_EXTRACT_RESULTS( ART_SPEC( TABLE_NAME(myart), LAYER(ARTFITRESIDUALS) ) );
Tertiary Results Output
SELECT TOP 5 * FROM myart_res;
city ROW_I ACTUAL_VALUE CALC_VALUE RESIDUAL SanDiego 0 2.00000000000000E 000 1.99800000264226E 000 1.99999735774007E-003 SanDiego 1 2.00000000000000E 000 2.00000173453277E 000 -1.73453276908150E-006 SanDiego 2 2.00000000000000E 000 2.00000097057910E 000 -9.70579104164770E-007 SanDiego 3 2.00000000000000E 000 2.00000113902231E 000 -1.13902231274533E-006 SanDiego 4 3.00000000000000E 000 2.13297550110591E 000 8.67024498894092E-001
Example: Call for Quinary Results of TD_AUTOARIMA
EXECUTE FUNCTION INTO ART(myart_ic) TD_EXTRACT_RESULTS( ART_SPEC( TABLE_NAME(myart), LAYER(ARTICANDORDER) ) );
Quinary Results Output
SELECT * FROM myart_ic;
city SanDiego ROW_I 0 NUM_SAMPLES 81 VAR_COUNT 1 AIC 9.07446763465541E 002 SBIC 9.12235661774886E 002 HQIC 9.09368132220488E 002 MLR -4.51723381732771E 002 MSE 3.94136570941504 MODEL_ORDER ARIMA(1, 1, 3)