plot.mtsforecast | R Documentation |
Plot multivariate time series forecast or residuals
## S3 method for class 'mtsforecast'
plot(x, selected_series, type = c("pi", "dist", "sims"), level = 95, ...)
x |
result from |
selected_series |
name of the time series selected for plotting |
type |
"pi": basic prediction intervals; "dist": a distribution of predictions; "sims": the simulations |
level |
confidence levels for prediction intervals |
... |
additional parameters to be passed to |
require(fpp)
fit_obj_VAR <- ahead::varf(fpp::insurance, lags = 2,
h = 10, level = 95)
fit_obj_ridge2 <- ahead::ridge2f(fpp::insurance, lags = 2,
h = 10, level = 95)
par(mfrow=c(2, 2))
plot(fit_obj_VAR, "Quotes")
plot(fit_obj_VAR, "TV.advert")
plot(fit_obj_ridge2, "Quotes")
plot(fit_obj_ridge2, "TV.advert")
obj <- ahead::ridge2f(fpp::insurance, h = 10, type_pi = "blockbootstrap",
block_length=5, B = 10)
par(mfrow=c(1, 2))
plot(obj, selected_series = "Quotes", type = "sims",
main = "Predictive simulation for Quotes")
plot(obj, selected_series = "TV.advert", type = "sims",
main = "Predictive simulation for TV.advert")
par(mfrow=c(1, 2))
plot(obj, selected_series = "Quotes", type = "dist",
main = "Predictive simulation for Quotes")
plot(obj, selected_series = "TV.advert", type = "dist",
main = "Predictive simulation for TV.advert")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.