density_plotter {shrinkTVPVAR} | R Documentation |
Kernel density plots of posterior distribution for hyperparameters of time-varying coefficient matrix in a TVP-VAR model
Description
density_plotter
plots empirical kernel density estimates of the posterior distribution for hyperparameters
of a time-varying parameter coefficient matrix in a TVP-VAR model. beta_mean
and theta_sr
will most
likely be of interest here.
Usage
density_plotter(
x,
lag = 1,
mgp = c(1.5, 0.5, 0),
ylim,
xlim,
ylabs,
mains,
h_borders = c(0.075, 0.05),
w_borders = c(0.05, 0.05),
...
)
Arguments
x |
|
lag |
single integer value, indicating the lag of the time-varying VAR to be plotted. The default value is 1. |
mgp |
vector of length 3, determining the margin line (in |
ylim |
numeric vector of length 2, determining the y-axis limits of the plot.
If missing, the limits are determined by the |
xlim |
numeric vector of length 2, determining the x-axis limits of the plot. If missing, the limits are determined by the minimum and maximum values of the data. |
ylabs |
character vector of length m, determining the y-axis labels of the plot. If missing, the labels are taken from the column names of the data. |
mains |
character vector of length m, determining the main titles of the plot. If missing, the titles are taken from the column names of the data. |
h_borders |
numeric vector of length 2, determining the horizontal borders of the plot.
The first value is the space between the plot and the left border,
the second value is the space between the plot and the right border.
Both are fractions of the total width of the plot. The default value is |
w_borders |
numeric vector of length 2, determining the vertical borders of the plot.
The first value is the space between the plot and the top border,
the second value is the space between the plot and the bottom border.
Both are fractions of the total height of the plot. The default value is |
... |
further arguments to be passed to |
Value
Called for its side effects and returns invisibly.
Author(s)
Peter Knaus peter.knaus@wu.ac.at
See Also
Other plotting functions:
TV_heatmap()
,
plot.mcmc.tvp.var()
,
plot.mcmc.var()
,
plot.shrinkTVPVAR()
,
plot.shrinkTVPVAR_fit()
,
plot.shrinkTVPVAR_forc()
,
state_plotter()
Examples
set.seed(123)
sim <- simTVPVAR(p = 2)
data <- sim$data
res <- shrinkTVPVAR(data, p = 2)
plot(res$theta_sr)
# Plot second lag
plot(res$theta_sr, lag = 2)