View source: R/plot_forecast.R
| plot_forecast | R Documentation |
Creates a plot of observed data, forecasted values, and confidence intervals.
plot_forecast(
forecast,
data_train,
data_test,
time,
quant_high,
quant_low,
observed_col,
forecast_col,
title
)
forecast |
A matrix of BSTS forecast samples. |
data_train |
Numeric vector, training data. |
data_test |
Numeric vector, test data. |
time |
Numeric vector, representing time indices. |
quant_high |
Numeric, upper quantile for confidence interval. |
quant_low |
Numeric, lower quantile for confidence interval. |
observed_col |
Character, color for observed data. |
forecast_col |
Character, color for forecasted data. |
title |
Character, title of the plot. |
A ggplot2 object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.