Description Usage Arguments Details Value Author(s) Examples
A function for plotting impulse response funtions using ggplot2.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | IRF(obj,...)
## S3 method for class 'bvarm'
IRF(obj,percentiles=c(.05,.50,.95),which_shock=NULL,which_response=NULL,save=FALSE,height=13,width=13,...)
## S3 method for class 'bvars'
IRF(obj,percentiles=c(.05,.50,.95),save=FALSE,height=13,width=13,...)
## S3 method for class 'bvarw'
IRF(obj,percentiles=c(.05,.50,.95),save=FALSE,height=13,width=13,...)
## S3 method for class 'cvar'
IRF(obj,percentiles=c(.05,.50,.95),save=FALSE,height=13,width=13,...)
## S3 method for class 'bvartvp'
IRF(obj,whichirfs=NULL,percentiles=c(.05,.50,.95),
save=FALSE,height=13,width=13,...)
## S3 method for class 'DSGEVAR'
IRF(obj,var_names=NULL,percentiles=c(.05,.50,.95),comparison=TRUE,
save=FALSE,height=13,width=13,...)
## S3 method for class 'EDSGE'
IRF(obj,observableIRFs=FALSE,var_names=NULL,percentiles=c(.05,.50,.95),
save=FALSE,height=13,width=13,...)
## S3 method for class 'gensys'
IRF(obj,shocks,irf.periods=20,var_names=NULL,
plot=TRUE,save=FALSE,height=13,width=13,...)
## S3 method for class 'uhlig'
IRF(obj,shocks,irf.periods=20,var_names=NULL,
plot=TRUE,save=FALSE,height=13,width=13,...)
## S3 method for class 'SDSGE'
IRF(obj,shocks,irf.periods=20,var_names=NULL,
plot=TRUE,save=FALSE,height=13,width=13,...)
|
For objects of class ‘bvarm’, ‘bvars’, ‘bvarw’, or ‘cvar’,
obj |
An object of the above class. |
percentiles |
The percentiles of the distribution the user wants to use. |
save |
Whether to save the plots. |
height |
If save=FALSE, use this to set the height of the plot. |
width |
If save=FALSE, use this to set the width of the plot. |
For objects of class ‘bvartvp’,
whichirfs |
Which IRFs to plot. (The default is to plot all of the IRFs contained in the estimation object.) |
For objects of class ‘DSGEVAR’,
var_names |
A character vector with the names of the relevant variables. |
comparison |
Whether to plot corresponding DSGE model IRFs. |
For objects of class ‘EDSGE’,
observableIRFs |
Whether to plot the IRFs relating to the state variables, or the implied IRFs of the observable series. |
For objects of class ‘gensys’, ‘uhlig’, or ‘SDSGE’,
shocks |
A numeric vector containing the standard deviations of the shocks. |
irf.periods |
The horizon of the IRFs. |
plot |
Whether to plot the IRFs. |
... |
Additional arguments (not used). |
This function will work with any estimated VAR model, estimated DSGE or DSGE-VAR model, or solved DSGE model.
The function returns a plot of the IRFs with user-selected percentiles.
Keith O'Hara
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.