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

Extend available methods #19

Closed
9 of 11 tasks
nk027 opened this issue Aug 25, 2019 · 4 comments
Closed
9 of 11 tasks

Extend available methods #19

nk027 opened this issue Aug 25, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@nk027
Copy link
Owner

nk027 commented Aug 25, 2019

At the moment only plot() and print() exist for the bvar object.

Important standard methods are:

  • fitted(): Probably better to calculate ex-post.
  • predict(): This is currently done in the main chain, as it shouldn't necessitate too much additional effort. Allowing to calculate this ex-post should not be an issue, however.
  • summary(): This really needs to be readded.
  • residuals(): See fitted()

Further potential methods are:

  • coef(): Should be useful and rather straightforward. Optionally consider the vars implementation of Acoef() and Bcoef().
  • vcov(): Should also be straightforward.
  • logLik(): Might as well.
  • irf(): See predict().
  • fevd(): Nice shorthand.
  • stability(): Additional dependency, but might make sense.
  • Phi() & Psi(): Would address facilitating switches from and to vars.
  • The user interface of BVAR has bvar as the main fitting function
    returning an object that only has a plot() and a print() method. First,
    other standard methods like fitted(), predict(), residuals(), and
    summary() should be added. Second, methods that are typically available
    for frequentist models like coef(), vcov(), logLik() etc. might also make
    sense in this Bayesian setting. Third, the "vars" package defines generics
    and methods for a lot of VAR-specific functionality, e.g., Phi(), Psi(),
    fevd(), irf(), stability(). As already mentioned in the previous point it
    would be very natural to provide methods to these generics as well.
@nk027 nk027 added the enhancement New feature or request label Aug 27, 2019
@nk027
Copy link
Owner Author

nk027 commented Aug 28, 2019

predict, irf, fitted, residuals and fevd have been implemented as of 92286d2.

This includes methods for different objects that make sense in this context. Beside calculating stuff ex-post the main functionality is calculation of quantiles and improved printing, etc.

@nk027
Copy link
Owner Author

nk027 commented Aug 30, 2019

  • Commit 0dfcce2 contains some preliminary work on logLik().
  • summary() should probably collect the information and outputs of other methods, so it might make sense to implement it last.
  • stability() is not a priority right now.
  • Phi() and Psi() methods seem to not offer much - a method to retrieve the companion matrix probably makes more sense.

nk027 pushed a commit that referenced this issue Aug 31, 2019
@nk027
Copy link
Owner Author

nk027 commented Aug 31, 2019

I'll add summary() tomorrow.
Besides that #27 could use some work.

(Remember to mention density != HPDI)

@nk027
Copy link
Owner Author

nk027 commented Sep 3, 2019

Thanks @oDNAudio for adding the summary method.

I've split it up to return the coefficients and feed that to a print-method.

Medium term it might make sense to create more selected outputs and allow retrieving some HPDIs. But I think that can be done in another issue.

Closing this, as all must-add methods have been added.

@nk027 nk027 closed this as completed Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant