You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exog support in VAR is incomplete
currently intercept or trend is not added to exog.
VARProcess does not directly have information about the coef composition.
coeffs in VARProcess and VARResults is split out and reshaped from params.
forecast needs the full prediction and all components
some other process methods (need to) ignore exog/trend/...
VAR model has predict method that looks similar to other TImeSeriesModels, but doesn't handle exog (bug).
There is no predict method in VARResults or VARProcess. Those two classes do not subclass any TSA model, i.e. doesn't have direct access to forecast date handling.
Explicit handling of trend and seasonal components has the advantage that we can automatically construct out of sample "exog" values, which we cannot do for user provided exog. But otherwise it would be more convenient to keep trend and other "exog" in exog.
TBC
right now I would just like to fix the missing intercept in VARProcess. (but I don't see my way through this yet.)
related: I don't think the VARProcess class can currently work completely as standalone class. Some things are mixed up with VARResults.
I'm not sure which information is needed and used in VARProcess, and is accessed through VARResults attributes.
e.g. it would be easier to add intercept (the coefficient for the constant) to VARResults but those are needed in VARProcess which is the super class of VARResults.
I think it would be easier to keep a params_info or parameter class around, to keep track of what's in params and what the different coefs_xxx are.
VARResults has coefs for 3-d lag coefficients (coefs_endog), and coefs_exog which also includes the trend/intercept. coefs_exog is not added in VARProcess.__init__
There is currently an inconsistency in the results returned by VAR:
coefs_exog includes trend/constant
exog is None, if only constant (I haven't checked trend > 'c')
i.e. intercept = either params[0] or coefs_exog[:, 0] (assuming prepended constant)
a possible ambiguity as in ARMA: constant specified in trend versus constant added to exog by user.
If we have methods in VARProcess that use only intercept from trend and endog, then it would be more consistent to also check for constant in exog (as we do in base.data check for has_const/const_idx)
VARProcess forecast forecast(y, self.coefs, trend_coefs, steps, exog_future)
trend has been aded to exog_future, so it's all exog (including constant)
trend_coefs is then coefs_exog and the name should refer to exog
naming problem:
we have exog provided by users, and exog augmented with trend (and in VECM also with seasonal dummies). It would be better to use two different names.
current (pre-VECM) usage of intercept, e.g. in var_sim, could be replaced by an offset variable as in GLM and count models, i.e. as part of the linear predictor for which we don't need or want params.
This would correspond to a observation specific intercept array, instead of just the constant parameters.
part of the changes mentioned here are now merged in PR #4538
It mostly brought the behavior in the no exog case back to pre-VECM, and has now more support of exog in VARProcess and VARResults.
But, exog support and consistent namings/definitions are still incomplete.
Some additional changes require better unit test coverage in VAR, e.g. currently there are no verifying unit tests for irf errbands based on simulation and FEVD.
Activity
josef-pkt commentedon Apr 23, 2018
related: I don't think the VARProcess class can currently work completely as standalone class. Some things are mixed up with VARResults.
I'm not sure which information is needed and used in VARProcess, and is accessed through VARResults attributes.
e.g. it would be easier to add
intercept(the coefficient for the constant) to VARResults but those are needed in VARProcess which is the super class of VARResults.josef-pkt commentedon Apr 23, 2018
I think it would be easier to keep a params_info or parameter class around, to keep track of what's in params and what the different coefs_xxx are.
VARResults has coefs for 3-d lag coefficients (coefs_endog), and coefs_exog which also includes the trend/intercept. coefs_exog is not added in
VARProcess.__init__There is currently an inconsistency in the results returned by VAR:
coefs_exog includes trend/constant
exog is None, if only constant (I haven't checked trend > 'c')
i.e. intercept = either params[0] or coefs_exog[:, 0] (assuming prepended constant)
a possible ambiguity as in ARMA: constant specified in trend versus constant added to exog by user.
If we have methods in VARProcess that use only
interceptfrom trend and endog, then it would be more consistent to also check for constant in exog (as we do in base.data check for has_const/const_idx)josef-pkt commentedon Apr 23, 2018
related misnomer
VARProcess forecast
forecast(y, self.coefs, trend_coefs, steps, exog_future)trend has been aded to exog_future, so it's all exog (including constant)
trend_coefs is then coefs_exog and the name should refer to exog
naming problem:
we have
exogprovided by users, andexogaugmented with trend (and in VECM also with seasonal dummies). It would be better to use two different names.josef-pkt commentedon Apr 23, 2018
current (pre-VECM) usage of
intercept, e.g. in var_sim, could be replaced by anoffsetvariable as in GLM and count models, i.e. as part of the linear predictor for which we don't need or want params.This would correspond to a observation specific
interceptarray, instead of just theconstantparameters.AFAICS, change in varsim would be trivial.
josef-pkt commentedon Apr 26, 2018
part of the changes mentioned here are now merged in PR #4538
It mostly brought the behavior in the no exog case back to pre-VECM, and has now more support of exog in VARProcess and VARResults.
But, exog support and consistent namings/definitions are still incomplete.
Some additional changes require better unit test coverage in VAR, e.g. currently there are no verifying unit tests for irf errbands based on simulation and FEVD.