Skip to content

REF/BUG: exog, trend, ... in VAR #4535

Open

Description

@josef-pkt

(some notes, several other open issues)

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.)

Activity

  1. added this to the 0.9 milestone on Apr 23, 2018
  2. josef-pkt commented on Apr 23, 2018

    @josef-pkt
    MemberAuthor

    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.

  3. josef-pkt commented on Apr 23, 2018

    @josef-pkt
    MemberAuthor

    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)

  4. josef-pkt commented on Apr 23, 2018

    @josef-pkt
    MemberAuthor

    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 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.

  5. josef-pkt commented on Apr 23, 2018

    @josef-pkt
    MemberAuthor

    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.

    AFAICS, change in varsim would be trivial.

  6. josef-pkt commented on Apr 26, 2018

    @josef-pkt
    MemberAuthor

    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.

  7. modified the milestones: 0.9, 0.10 on Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions