View source: R/plot_functions.R
plot.shrinkTVP_forc | R Documentation |
plot.shrinkTVP_forc
generates plots visualizing the posterior predictive density generated by forecast_shrinkTVP
.
## S3 method for class 'shrinkTVP_forc'
plot(x, showgap = FALSE, ...)
x |
a |
showgap |
if |
... |
further arguments to be passed to |
Called for its side effects and returns invisibly.
Peter Knaus peter.knaus@wu.ac.at
Other plotting functions:
plot.mcmc.tvp()
,
plot.shrinkTVP()
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.