Learn R Programming

shrinkTVPVAR (version 0.1.1)

TV_heatmap: Heatmap of hyperparameters of time-varying coefficient matrix in a TVP-VAR model

Description

TV_heatmap plots a heatmap of posterior distribution for hyperparameters of a time-varying parameter coefficient matrix in a TVP-VAR model. This is achieved by plotting the median of the posterior of the absolute value for theta_sr and the median of the posterior for all others. The plot itself is generated by lattice::levelplot. beta_mean and theta_sr will most likely be of interest here.

Usage

TV_heatmap(x, cuts = 15, cols, max_val, flipcols, ...)

Value

Called for its side effects and returns invisibly.

Arguments

x

mcmc.var object

cuts

single integer value, determining the number of cuts for the color palette. The default value is 15.

cols

character string, determining the color palette to be used. The default value is "Purples" for theta_sr and "RdBu" for all others. See RColorBrewer::brewer.pal.info for more information.

max_val

numeric value, determining the maximum value for the color palette. If missing, the maximum value is determined by the largest absolute value of the data.

flipcols

logical value, determining whether the color palette should be flipped. The default value is FALSE for theta_sr and TRUE for all others.

...

further arguments to be passed to lattice::levelplot.

Author

Peter Knaus peter.knaus@wu.ac.at

See Also

Other plotting functions: density_plotter(), plot.mcmc.tvp.var(), plot.mcmc.var(), plot.shrinkTVPVAR(), plot.shrinkTVPVAR_fit(), plot.shrinkTVPVAR_forc(), state_plotter()

Examples

Run this code
# \donttest{
set.seed(123)
sim <- simTVPVAR(p = 2)
data <- sim$data

res <- shrinkTVPVAR(data, p = 2)
TV_heatmap(res$theta_sr)
# }

Run the code above in your browser using DataLab