1.1 - 8.10 - VARMAX Example: Exogenous and Seasonal Models - 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

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

Output

 id coef               coef_value                                                                                                                            stepahead predict_expenditure 
 -- ------------------ ------------------------------------------------------------------------------------------------------------------------------------- --------- ------------------- 
  1 lag                3                                                                                                                                     NULL                     NULL
  1 exogenous_params   [[0.14136535289002805, -0.5764731379270335]],[[4.327609632621381, -3.6776117386402745]],[[1.5658681771405536, 1.7090892798326973]]    NULL                     NULL
  1 bic                10.829562247171378                                                                                                                    NULL                     NULL
  1 seasonal_ar_params [[-1.749468260264603]]                                                                                                                NULL                     NULL
  1 ar_params          [[-0.083675090299998]]                                                                                                                NULL                     NULL
  1 iterations         41                                                                                                                                    NULL                     NULL
  1 seasonal_ma_params NULL                                                                                                                                  NULL                     NULL
  1 NULL               NULL                                                                                                                                  1           3948.029466182273
  1 period             4                                                                                                                                     NULL                     NULL
  1 ma_params          [[0.16557702978800654]]                                                                                                               NULL                     NULL
  1 aic                10.445663405756845                                                                                                                    NULL                     NULL
  1 coef               1, 1, 1, 1, 0, 0, 3                                                                                                                   NULL                     NULL
  1 sigma              [[21679.55531881341]]                                                                                                                 NULL                     NULL
  1 converged          true                                                                                                                                  NULL                     NULL
  1 NULL               NULL                                                                                                                                  2           5935.804907456769
  1 NULL               NULL                                                                                                                                  3           5954.276592372843
  2 ma_params          [[-0.8204637812812601]]                                                                                                               NULL                     NULL
  2 seasonal_ar_params [[-5.614414697261441]]                                                                                                                NULL                     NULL
  2 seasonal_ma_params NULL                                                                                                                                  NULL                     NULL
  2 period             4                                                                                                                                     NULL                     NULL
  2 sigma              [[32608.138895810247]]                                                                                                                NULL                     NULL
  2 aic                10.853855657114226                                                                                                                    NULL                     NULL
  2 bic                11.237754498528759                                                                                                                    NULL                     NULL
  2 iterations         85                                                                                                                                    NULL                     NULL
  2 converged          true                                                                                                                                  NULL                     NULL
  2 NULL               NULL                                                                                                                                  1           1620.451901286435
  2 NULL               NULL                                                                                                                                  2          1586.3420191931932
  2 NULL               NULL                                                                                                                                  3          1658.0951344806858
  2 lag                3                                                                                                                                     NULL                     NULL
  2 exogenous_params   [[-0.9778053595354401, 2.6268103989144316]],[[4.974327689829748, -0.39732611440463356]],[[-2.326100821660923, -2.6208248381459405]]   NULL                     NULL
  2 ar_params          [[0.67251029839066]]                                                                                                                  NULL                     NULL
  2 coef               1, 1, 1, 1, 0, 0, 3                                                                                                                   NULL                     NULL
  3 NULL               NULL                                                                                                                                  2          2372.4860996289876
  3 NULL               NULL                                                                                                                                  1          2327.0431364124015
  3 period             4                                                                                                                                     NULL                     NULL
  3 converged          false                                                                                                                                 NULL                     NULL
  3 iterations         100                                                                                                                                   NULL                     NULL
  3 seasonal_ma_params NULL                                                                                                                                  NULL                     NULL
  3 ma_params          [[-0.014945451170288799]]                                                                                                             NULL                     NULL
  3 bic                -26.29272322661271                                                                                                                    NULL                     NULL
  3 aic                -26.618273904356833                                                                                                                   NULL                     NULL
  3 seasonal_ar_params [[0.13346859797280347]]                                                                                                               NULL                     NULL
  3 sigma              [[5.360025155179078E-13]]                                                                                                             NULL                     NULL
  3 NULL               NULL                                                                                                                                  3          2321.5615950896404
  3 lag                3                                                                                                                                     NULL                     NULL
  3 exogenous_params   [[0.2934923712302498, -0.6135109059450977]],[[-0.11162047294277623, 0.11996630573488476]],[[0.6145949488515016, -1.5210989053056008]] NULL                     NULL
  3 ar_params          [[-0.2624228703654427]]                                                                                                               NULL                     NULL
  3 coef               1, 1, 1, 1, 0, 0, 3                                                                                                                   NULL                     NULL

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