Repository navigation
BUG/ENH: VARMAX Fix trend / exog. timing. Add polynomial trends. - #4766
Conversation
|
This pull request introduces 1 alert and fixes 1 when merging 7501356 into 450f30d - view on LGTM.com new alerts:
fixed alerts:
Comment posted by LGTM.com |
|
This pull request introduces 1 alert and fixes 1 when merging e16ef78 into 450f30d - view on LGTM.com new alerts:
fixed alerts:
Comment posted by LGTM.com |
|
This PR also switches from raising an error on non-stationary or non-invertible starting params to giving a warning. This is the same as what #4739 did for SARIMAX. Edit: this could also be pulled out of this PR since it's not related, if that was cleaner. |
|
This is coming up green. Since it's a bigger PR, I'll wait a bit (tomorrow or on the weekend) before merging (or longer if there are concerns), but it would be good to get the fix in. |
|
This pull request fixes 1 alert when merging d6d1b3d into 450f30d - view on LGTM.com fixed alerts:
Comment posted by LGTM.com |
Codecov Report
@@ Coverage Diff @@
## master #4766 +/- ##
=========================================
+ Coverage 81.1% 81.1% +<.01%
=========================================
Files 580 581 +1
Lines 89615 89796 +181
Branches 9991 10028 +37
=========================================
+ Hits 72678 72833 +155
- Misses 14657 14683 +26
Partials 2280 2280
Continue to review full report at Codecov.
|
VARMAX models with trend or exog used a misleading timing convention that I think qualifies as type-bug-wrong. The timing convention it used was as according to the general state space transition equation:
\alpha_{t+1} = d_t + T_t \alpha_t + \eta_tBut for a VAR,
\alpha_t = y_t, and so trend / exog for time t would be associated with the endog for t+1.This fixes this problem and also adds a more extensive set of trends (allows a polynomial trend like in SARIMAX rather than just
trend='c').Also adds a bunch of unit tests for VARX models with and without trends against the R package "vars".