1.1 - 8.10 - VARMAX Example: Seasonal Model, No Exogenous Model - Teradata Vantage

Teradata Vantage™ - Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
1.1
8.10
Release Date
October 2019
Content Type
Programming Reference
Publication ID
B700-4003-079K
Language
English (United States)

Input

SQL Call

Seasonal modeling are specified by the Period and SeasonalPDQ syntax elements.

SELECT * FROM VARMAX (
  ON finance_data3 AS InputTable PARTITION BY id ORDER BY period
  USING
  TargetColumns ('expenditure', 'income', 'investment')
  PartitionColumns ('id')
  PDQ ('1,1,1')
  SeasonalPDQ ('1,0,0')
  Period (4)
  IncludeMean ('false')
  StepAhead (3)
) AS dt ORDER BY id;

Output

 id coef               coef_value                                                                                                                                                                                                         stepahead predict_expenditure predict_income     predict_investment 
 -- ------------------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ --------- ------------------- ------------------ ------------------ 
  1 ma_params          [[0.047161415589433306, -1.906043453002955, 1.0468038966218294],[-0.13240014325688745, -1.718397893417201, 1.39178874725834],[0.0037687548122121994, -0.5051382020273312, -0.15314353469864087]]                   NULL                     NULL               NULL               NULL
  1 aic                25.32292860210836                                                                                                                                                                                                  NULL                     NULL               NULL               NULL
  1 converged          true                                                                                                                                                                                                               NULL                     NULL               NULL               NULL
  1 seasonal_ar_params [[-0.16845518629067494, 1.6244951628223803, -1.919050728871083],[1.3604369899583515, 2.3278614226936565, -3.096311206806939],[0.692982567095393, 0.6025475118342052, -1.7567031588496334]]                         NULL                     NULL               NULL               NULL
  1 sigma              [[8507.086753280108, 9128.51276469664, 1501.0110439314783],[9128.51276469664, 10931.74025041702, 1877.8340370539074],[1501.0110439314783, 1877.8340370539074, 2903.7551352984965]]                                 NULL                     NULL               NULL               NULL
  1 period             4                                                                                                                                                                                                                  NULL                     NULL               NULL               NULL
  1 bic                26.474625126351963                                                                                                                                                                                                 NULL                     NULL               NULL               NULL
  1 NULL               NULL                                                                                                                                                                                                               3            2261.66509463083  4805.075647611341 -85.65885437898675
  1 NULL               NULL                                                                                                                                                                                                               1          3008.4122472417243  5243.487089399085 1593.0015737498193
  1 coef               1, 1, 1, 1, 0, 0, 0                                                                                                                                                                                                NULL                     NULL               NULL               NULL
  1 seasonal_ma_params NULL                                                                                                                                                                                                               NULL                     NULL               NULL               NULL
  1 exogenous_params   NULL                                                                                                                                                                                                               NULL                     NULL               NULL               NULL
  1 iterations         90                                                                                                                                                                                                                 NULL                     NULL               NULL               NULL
  1 NULL               NULL                                                                                                                                                                                                               2          3139.7419274225804   4677.14682761945 -160.6000488318316
  1 lag                0                                                                                                                                                                                                                  NULL                     NULL               NULL               NULL
  1 ar_params          [[0.6749792690680297, 0.09241813288404432, 0.5484884989127043],[1.0839981966998173, -0.23542155358055403, 0.14231078552096657],[1.2894538111710467, -0.9457973261338974, 0.38673451989311164]]                     NULL                     NULL               NULL               NULL
  2 ma_params          [[-1.5756434415526015, 1.630187686487473, 2.1347097874729792],[-1.9435395521265888, 1.873384498811412, 2.6763882969664268],[-0.933312508854108, 0.49480536089543276, 1.590592606432673]]                           NULL                     NULL               NULL               NULL
  2 seasonal_ar_params [[-2.973968196921355, 2.9573715910806713, -1.4339914670174523],[-3.1805599462697067, 3.3167662120040973, -2.1174689799806643],[-2.035395283487158, 1.2767914660698918, 1.2383397778611864]]                        NULL                     NULL               NULL               NULL
  2 seasonal_ma_params NULL                                                                                                                                                                                                               NULL                     NULL               NULL               NULL
  2 period             4                                                                                                                                                                                                                  NULL                     NULL               NULL               NULL
  2 sigma              [[10013.563226714596, 10328.92305258156, 2522.651762868327],[10328.92305258156, 13660.58770687717, 3586.0393410620686],[2522.651762868327, 3586.0393410620686, 4065.2136506535103]]                                NULL                     NULL               NULL               NULL
  2 aic                26.6464291226334                                                                                                                                                                                                   NULL                     NULL               NULL               NULL
  2 bic                27.798125646877004                                                                                                                                                                                                 NULL                     NULL               NULL               NULL
  2 iterations         100                                                                                                                                                                                                                NULL                     NULL               NULL               NULL
  2 converged          false                                                                                                                                                                                                              NULL                     NULL               NULL               NULL
  2 NULL               NULL                                                                                                                                                                                                               1          1886.5914476963292  2222.789211779163  728.0400718629573
  2 NULL               NULL                                                                                                                                                                                                               2          1903.2071472190191 2210.4430886478253  746.9419150917527
  2 NULL               NULL                                                                                                                                                                                                               3          1932.9016081238367 2310.3080468286544  755.5631886642103
  2 lag                0                                                                                                                                                                                                                  NULL                     NULL               NULL               NULL
  2 exogenous_params   NULL                                                                                                                                                                                                               NULL                     NULL               NULL               NULL
  2 ar_params          [[-1.6168918787094855, 1.3975465858808604, -0.02967704587502138],[-0.6136719639019782, 0.6245910144797986, -0.004323898456822209],[-0.10656699187624753, -0.0041473039543114066, 0.2760541617316411]]              NULL                     NULL               NULL               NULL
  2 coef               1, 1, 1, 1, 0, 0, 0                                                                                                                                                                                                NULL                     NULL               NULL               NULL
  3 NULL               NULL                                                                                                                                                                                                               1            2286.73827930903  2666.389925343694  846.6929154260399
  3 converged          false                                                                                                                                                                                                              NULL                     NULL               NULL               NULL
  3 iterations         100                                                                                                                                                                                                                NULL                     NULL               NULL               NULL
  3 aic                -44.60965861168598                                                                                                                                                                                                 NULL                     NULL               NULL               NULL
  3 sigma              [[7.526043504203248E-8, -5.613039588268464E-8, 3.493979116954864E-8],[-5.613039588268464E-8, 1.6041066073702722E-7, -1.1143252721740114E-7],[3.493979116954864E-8, -1.1143252721740114E-7, 1.1268415707165419E-7]] NULL                     NULL               NULL               NULL
  3 lag                0                                                                                                                                                                                                                  NULL                     NULL               NULL               NULL
  3 bic                -43.63300657845361                                                                                                                                                                                                 NULL                     NULL               NULL               NULL
  3 period             4                                                                                                                                                                                                                  NULL                     NULL               NULL               NULL
  3 seasonal_ma_params NULL                                                                                                                                                                                                               NULL                     NULL               NULL               NULL
  3 seasonal_ar_params [[-0.2101429741884885, 0.2796383976301956, -0.22814036733111545],[0.39208495397322296, -0.18940564549948544, -0.2544806668877057],[0.4733053379224758, -0.2671558233963303, -0.22331382713353207]]                 NULL                     NULL               NULL               NULL
  3 exogenous_params   NULL                                                                                                                                                                                                               NULL                     NULL               NULL               NULL
  3 NULL               NULL                                                                                                                                                                                                               2          2275.0386892095153   2674.72073694218  859.8962665935035
  3 ma_params          [[0.4727104594654274, -0.4088587225958212, 0.2525235211650897],[-0.312645520932563, 0.33960805201909594, 0.23370759611826677],[0.4471490198322245, -0.4664238983816184, -0.24726031377126428]]                     NULL                     NULL               NULL               NULL
  3 ar_params          [[1.2942647874597708, -0.9582895919745037, -0.3611398899762283],[0.8491941789939056, 0.13426472552340252, 0.10004993633165297],[-1.3595901466064593, 0.1927208494956761, 0.5089697698633536]]                      NULL                     NULL               NULL               NULL
  3 coef               1, 1, 1, 1, 0, 0, 0                                                                                                                                                                                                NULL                     NULL               NULL               NULL
  3 NULL               NULL                                                                                                                                                                                                               3          2245.3218790410156 2677.8225099270294  864.8036704818687

Download a zip file of all examples and a SQL script file that creates their input tables from the attachment in the left sidebar.