This is a comprehensive model that includes all the possible model types (Autoregressive, Exogenous, Seasonal and Moving Average) for prediction.
Input
- finance_data3, as in VARMAX Example 1: No Exogenous Model
SQL Call
SELECT * FROM VARMAX ( ON finance_data3 AS "data" PARTITION BY id ORDER BY period USING ResponseColumns ('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 | coef | 1, 1, 1, 1, 0, 0, 3 | ||
1 | ar_params | [[-0.08614401327519393]] | ||
1 | ma_params | [[-0.1680269481962965]] | ||
1 | exogenous_params | [[0.14203710879699824, -0.5781265904163024]], [[4.346857849907079, -3.6811357032482723]], [[1.5837616273557507, 1.6939228988751796]] | ||
1 | seasonal_ar_params | [[-1.774477167876499]] | ||
1 | seasonal_ma_params | |||
1 | period | 4 | ||
1 | lag | 3 | ||
1 | sigma | [[21676.58531469003]] | ||
1 | aic | 10.445526400752035 | ||
1 | bic | 10.829425242166568 | ||
1 | iterations | 20 | ||
1 | converged | true | ||
1 | 1 | 3943.92757311105 | ||
1 | 2 | 5935.79783027663 | ||
1 | 3 | 5949.27104339776 | ||
2 | coef | 1, 1, 1, 1, 0, 0, 3 | ||
2 | ar_params | [[0.7116543185119842]] | ||
2 | ma_params | [[0.7409842225080137]] | ||
2 | exogenous_params | [[-1.3036705963984643, 3.539286250241028]], [[4.598852419341966, 0.24549009988380754]], [[-1.665252032620963, -4.712566452061846]] | ||
2 | seasonal_ar_params | [[-5.409614969849707]] | ||
2 | seasonal_ma_params | |||
2 | period | 4 | ||
2 | lag | 3 | ||
2 | sigma | [[36921.803548309304]] | ||
2 | aic | 10.97809599913301 | ||
2 | bic | 11.361994840547544 | ||
2 | iterations | 53 | ||
2 | converged | true | ||
2 | 1 | 1684.98113900396 | ||
2 | 2 | 1678.10798395172 | ||
2 | 3 | 1737.6262526761 | ||
3 | coef | 1, 1, 1, 1, 0, 0, 3 | ||
3 | ar_params | [[0.254361642305569]] | ||
3 | ma_params | [[0.1001575083196238]] | ||
3 | exogenous_params | [[0.29320016884259, -0.7088197800884475]], [[0.029695938455021133, 0.3298987004589782]], [[0.552628701381863, -1.4286270925970472]] | ||
3 | seasonal_ar_params | [[-0.1780611965952543]] | ||
3 | seasonal_ma_params | |||
3 | period | 4 | ||
3 | lag | 3 | ||
3 | sigma | [[2.333553926057712E-18]] | ||
3 | aic | -38.962775641871566 | ||
3 | bic | -38.63722496412744 | ||
3 | iterations | 20 | ||
3 | converged | true | ||
3 | 1 | 2323.20886314076 | ||
3 | 2 | 2393.45004194531 | ||
3 | 3 | 2374.68753995705 |