plot.shrinkTVP_forc: Graphical summary of posterior predictive density

View source: R/plot_functions.R

plot.shrinkTVP_forcR Documentation

Graphical summary of posterior predictive density

Description

plot.shrinkTVP_forc generates plots visualizing the posterior predictive density generated by forecast_shrinkTVP.

Usage

## S3 method for class 'shrinkTVP_forc'
plot(x, showgap = FALSE, ...)

Arguments

x

a shrinkTVP_forc object.

showgap

if showgap = FALSE, the gap between the historical observations and the forecasts is removed. The default value is FALSE.

...

further arguments to be passed to plot.

Value

Called for its side effects and returns invisibly.

Author(s)

Peter Knaus peter.knaus@wu.ac.at

See Also

Other plotting functions: plot.mcmc.tvp(), plot.shrinkTVP()

Examples


set.seed(123)
sim <- simTVP()

train <- sim$data[1:190, ]
test <- sim$data[191:200, ]

res <- shrinkTVP(y ~ x1 + x2, train)

forecast <- forecast_shrinkTVP(res, test)
plot(forecast)
lines(sim$data$y, col = "forestgreen")



shrinkTVP documentation built on May 29, 2024, 7:24 a.m.