This example uses an existing Orders table instead of a PDQ syntax element or TimeSeriesOrders call.
Input
- InputTable: finance_data3, as in VARMAX Example: No Exogenous Model
- Orders: orders_ex7
id | p | d | q | include_drift | include_mean |
---|---|---|---|---|---|
3 | 0 | 2 | 0 | 0 | 0 |
1 | 0 | 1 | 0 | 1 | 0 |
2 | 0 | 1 | 0 | 0 | 0 |
SQL Call
SELECT * FROM VARMAX ( ON finance_data3 AS InputTable PARTITION BY id ORDER BY period ON orders_ex7 AS Orders PARTITION BY id USING TargetColumns ('expenditure') PartitionColumns ('id') MaxIterNum (1000) FitMethod ('ML') ) AS dt ORDER BY id;
Output
id coef coef_value -- ------------------ ---------------------- 1 sigma [[24235.070398818556]] 1 drift_params [35.1194422383902] 1 iterations 22 1 coef 0, 1, 0, 0, 0, 0, 0 1 seasonal_ar_params NULL 1 aic 10.146838104398181 1 lag 0 1 period 0 1 seasonal_ma_params NULL 1 exogenous_params NULL 1 ar_params NULL 1 bic 10.189493531222018 1 converged true 1 ma_params NULL 2 ma_params NULL 2 seasonal_ar_params NULL 2 seasonal_ma_params NULL 2 period 0 2 sigma [[45895.666666666664]] 2 aic 10.734125983458284 2 bic 10.734125983458284 2 iterations 1 2 converged true 2 lag 0 2 exogenous_params NULL 2 ar_params NULL 2 coef 0, 1, 0, 0, 0, 0, 0 3 period 0 3 converged true 3 iterations 1 3 seasonal_ma_params NULL 3 ma_params NULL 3 bic 10.214956949880218 3 aic 10.214956949880218 3 seasonal_ar_params NULL 3 sigma [[27308.600000000002]] 3 lag 0 3 exogenous_params NULL 3 ar_params NULL 3 coef 0, 2, 0, 0, 0, 0, 0
Download a zip file of all examples and a SQL script file that creates their input tables.