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

IRF issues #53

Open
EmmanuelAmeyaw opened this issue Nov 19, 2020 · 3 comments
Open

IRF issues #53

EmmanuelAmeyaw opened this issue Nov 19, 2020 · 3 comments

Comments

@EmmanuelAmeyaw
Copy link

EmmanuelAmeyaw commented Nov 19, 2020

IRF.Rcpp_bvartvp(bvar_obj, 20, which_irfs, var_names=colnames(USMacroData), save=T) works.

IRF(bvar_obj, 20, which_irfs, var_names=colnames(USMacroData), save=T) does not work. This is a bug, right?

Also, it seems there is a typo here in this code: whichirfs instead of which_irfs


  \method{IRF}{bvartvp}(obj,whichirfs=NULL,percentiles=c(.05,.50,.95),
  save=FALSE,height=13,width=13,...)

Could this be causing IRF issues?

Anybody was able to get these graphs? IRF(bvar_obj, 20, which_irfs, var_names=colnames(USMacroData), save=T) didn't help.
Screenshot from 2020-11-19 20-14-17

@justKarlJust
Copy link

I have the same problem with IRF:

I executed this:

dsge_irf <- IRF(obj = dsge_obj,periods = 12,var_names = var_names,save = TRUE)

and got this:

Error in UseMethod("IRF") :
no applicable method for 'IRF' applied to an object of class "c('Rcpp_gensys', 'C++Object', 'envRefClass', '.environment',
'refClass', 'environment', 'refObject')"

Can anyone help?

@muhsinciftci
Copy link

I also had the same problem but when I checked the functions in R folder then I tackled the problem as:
"IRF.Rcpp_gensys(dsge_obj, 20, var_names = var_names, save = FALSE)" Of course you could change saving option as TRUE. Also this is applicable to IRF.Rcpp_uhlig(...) as well.

For Bayesian VAR I also used the same staff.
"IRF.Rcpp_bvarm(bvar_obj, 20, var_names = colnames(bvarMCdata),
save = FALSE, cumulative = T)" works well.

@djhurio
Copy link

djhurio commented Aug 16, 2022

So the temporal solution is not to use the IRF() function but to call the underlying IRF.Rcpp_* functions. Referring to the readme examples:

IRF(bvar_obj, 20, save = FALSE) # Error
IRF.Rcpp_bvarm(bvar_obj, 20, save = FALSE) # Works

dsge_irf <- IRF(dsge_obj,12,var_names=var_names) # Error
dsge_irf <- IRF.Rcpp_gensys(dsge_obj,12,var_names=var_names) # Works

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

4 participants