plot.PosteriorHD | R Documentation |
Plots of the posterior means of the historical decompositions.
## S3 method for class 'PosteriorHD'
plot(
x,
shock_names,
cols,
main,
xlab,
mar.multi = c(1, 4.6, 0, 4.6),
oma.multi = c(6, 0, 5, 0),
...
)
x |
an object of class PosteriorHD obtained using the
|
shock_names |
a vector of length |
cols |
an |
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. |
Tomasz Woźniak wozniak.tom@pm.me
compute_historical_decompositions
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 historical decompositions
fevd = compute_historical_decompositions(posterior)
plot(fevd)
# workflow with the pipe |>
############################################################
set.seed(123)
us_fiscal_lsuw |>
specify_bsvar$new() |>
estimate(S = 10) |>
estimate(S = 20, thin = 1) |>
compute_historical_decompositions() |>
plot()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.