This example uses an Orders table (output by the TimeSeriesOrders function) instead of a PDQ syntax element. The Orders table has one time series.
Input
id | period | milkpound |
---|---|---|
1 | 1962-01 | 578.3 |
2 | 1962-02 | 609.8 |
3 | 1962-03 | 628.4 |
4 | 1962-04 | 665.6 |
5 | 1962-05 | 713.8 |
6 | 1962-06 | 707.2 |
7 | 1962-07 | 628.4 |
8 | 1962-08 | 588.1 |
9 | 1962-09 | 576.3 |
10 | 1962-10 | 566.5 |
11 | 1962-11 | 561.1 |
12 | 1962-12 | 571.4 |
13 | 1963-01 | 589.1 |
14 | 1963-02 | 615.3 |
15 | 1963-03 | 641.2 |
16 | 1963-04 | 682.8 |
17 | 1963-05 | 728.5 |
18 | 1963-06 | 726.4 |
19 | 1963-07 | 648 |
... | ... | ... |
SQL Call
SELECT * FROM VARMAX ( ON milk_timeseries AS InputTable PARTITION BY 1 ORDER BY id ON TimeSeriesOrders ( ON milk_timeseries AS InputTable PARTITION BY 1 ORDER BY id ASC USING TimestampColumns ('period') ResponseColumn ('milkpound') ) AS orders PARTITION BY 1 USING TargetColumns ('milkpound') MaxIterNum (1000) FitMethod ('ML') ) AS dt ;
Output
coef coef_value ------------------ ---------------------------------------------- coef 0, 1, 2, 0, 0, 0, 0 ar_params NULL ma_params [[0.8569252788514398]],[[0.35803161161466235]] exogenous_params NULL seasonal_ar_params NULL seasonal_ma_params NULL drift_params [0.7402653820420226] period 0 lag 0 sigma [[633.9229968930607]] aic 6.490637168475567 bic 6.54954217073852 iterations 22 converged true
Download a zip file of all examples and a SQL script file that creates their input tables.