plot.PosteriorShocks {bsvars} | R Documentation |
Plots structural shocks
Description
Plots of structural shocks including their median and percentiles.
Usage
## S3 method for class 'PosteriorShocks'
plot(
x,
probability = 0.9,
col = "#ff69b4",
main,
xlab,
mar.multi = c(1, 4.6, 0, 2.1),
oma.multi = c(6, 0, 5, 0),
...
)
Arguments
x |
an object of class PosteriorShocks obtained using the
|
probability |
a parameter determining the interval to be plotted. The
interval stretches from the |
col |
a colour of the plot line and the ribbon |
main |
an alternative main title for the plot |
xlab |
an alternative x-axis label for the plot |
mar.multi |
the default |
oma.multi |
the default |
... |
additional arguments affecting the summary produced. |
Author(s)
Tomasz Woźniak wozniak.tom@pm.me
See Also
Examples
data(us_fiscal_lsuw) # upload data
set.seed(123) # set seed
specification = specify_bsvar$new(us_fiscal_lsuw) # specify model
burn_in = estimate(specification, 10) # run the burn-in
posterior = estimate(burn_in, 20, thin = 1) # estimate the model
# compute structural shocks
shocks = compute_structural_shocks(posterior)
plot(shocks) # plot
# workflow with the pipe |>
############################################################
set.seed(123)
us_fiscal_lsuw |>
specify_bsvar$new() |>
estimate(S = 10) |>
estimate(S = 20, thin = 1) |>
compute_structural_shocks() |>
plot()
[Package bsvars version 3.1 Index]