This example uses an orders table (output by the TimeSeriesOrders function) instead of a PDQ argument. The orders table has two time series.
Input
The input table, milk_3, contains data for two time series. The time series identifier, 1 or 2, is in the column id1.
id_partition | id | period | milkpound |
---|---|---|---|
1 | 1 | 1962-01 | 578.3 |
1 | 2 | 1962-02 | 609.8 |
1 | 3 | 1962-03 | 628.4 |
1 | 4 | 1962-04 | 665.6 |
1 | 5 | 1962-05 | 713.8 |
1 | 6 | 1962-06 | 707.2 |
1 | 7 | 1962-07 | 628.4 |
1 | 8 | 1962-08 | 588.1 |
1 | 9 | 1962-09 | 576.3 |
1 | 10 | 1962-10 | 566.5 |
... | ... | ... | ... |
2 | 1 | 1966-01 | 664.7 |
2 | 2 | 1966-02 | 690.3 |
2 | 3 | 1966-03 | 722.6 |
2 | 4 | 1966-04 | 766 |
2 | 5 | 1966-05 | 796.3 |
2 | 6 | 1966-06 | 809.6 |
2 | 7 | 1966-07 | 721.7 |
2 | 8 | 1966-08 | 684.4 |
2 | 9 | 1966-09 | 670.6 |
... | ... | ... | ... |
SQL Call
SELECT * FROM VARMAX ( ON milk_3 AS "data" PARTITION BY id_partition ORDER BY period ON ( SELECT * FROM TimeSeriesOrders ( ON milk_3 PARTITION BY id_partition ORDER BY period ASC USING TimeColumns ('period') ResponseColumn ('milkpound') PartitionColumns ('id_partition') ) AS dt1 ) AS orders PARTITION BY id_partition USING ResponseColumns ('milkpound') PartitionColumns ('id_partition') MaxIterNum (1000) "Method" ('ML') ) AS dt2;
Output
id_partition | coef | coef_value |
---|---|---|
2 | coef | 0, 1, 2, 0, 0, 0, 0 |
2 | ar_params | |
2 | ma_params | [[0.8304446609139935]],[[0.3998758005219725]] |
2 | exogenous_params | |
2 | seasonal_ar_params | |
2 | seasonal_ma_params | |
2 | period | 0 |
2 | lag | 0 |
2 | sigma | [[643.2306088838526]] |
2 | aic | 6.503886482741382 |
2 | bic | 6.55384590020796 |
2 | iterations | 23 |
2 | converged | true |
1 | coef | 0, 2, 0, 0, 0, 0, 0 |
1 | ar_params | |
1 | ma_params | |
1 | exogenous_params | |
1 | seasonal_ar_params | |
1 | seasonal_ma_params | |
1 | period | 0 |
1 | lag | 0 |
1 | sigma | [[941.2214388391408]] |
1 | aic | 6.84717843479092 |
1 | bic | 6.84717843479092 |
1 | iterations | 1 |
1 | converged | true |