Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BigVAR.fit not respecting VARX$contemp = FALSE #29

Closed
jonlachmann opened this issue Jun 15, 2022 · 3 comments
Closed

BigVAR.fit not respecting VARX$contemp = FALSE #29

jonlachmann opened this issue Jun 15, 2022 · 3 comments

Comments

@jonlachmann
Copy link
Contributor

When I use BigVAR.fit to fit a model, I may have a VARX list on the form list(k=2, s=1, s1=0, contemp=FALSE). Then, BigVAR.fit will run the following code:

if (!is.null(VARX$contemp)) {
  contemp <- TRUE
  s1 <- 1
} else {
  contemp <- FALSE
  s1 <- 0
}

This will then, erroneously set contemp to TRUE, and the accompanying parameter s1 to 1. I would expect it to respect that I have chosen to not have contemporaneous interaction of the exogenous variables if I set it to FALSE.

Another question, which relates to this, is why does EFX not support contemp=TRUE?

@jonlachmann
Copy link
Contributor Author

The same behavious is expressed in the function VARXConsModel, which to be fair is just an internal function, but something I sometimes end up using to modify a BigVAR model object.

@wbnicholson
Copy link
Owner

Thanks, this has been fixed.

Regarding EFX not supporting contemp=TRUE, my reasoning was that since the EFX shrinks from a VARX to a VAR it didn't make sense to allow contemporaneous exogenous coefficients since there is no corresponding VAR coefficient to shrink toward.

@jonlachmann
Copy link
Contributor Author

Nice! Thank you!

And that explanation makes sense, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants