View source: R/plot_forecast_compare.R
plot_forecast_compare | R Documentation |
Generates a time series plot comparing the forecasts from two models along with observed data.
plot_forecast_compare(
forecast1,
forecast2,
data_train,
data_test,
time,
quant_high,
quant_low,
col1,
title
)
forecast1 |
Numeric matrix, forecasted values from the first model (columns: time points). |
forecast2 |
Numeric matrix, forecasted values from the second model (columns: time points). |
data_train |
Numeric vector, training data used for modeling. |
data_test |
Numeric vector, actual test data for evaluation. |
time |
Numeric vector, representing the time points corresponding to the data. |
quant_high |
Numeric, upper quantile (e.g., 0.9) for confidence interval. |
quant_low |
Numeric, lower quantile (e.g., 0.1) for confidence interval. |
col1 |
Character, color for observed data lines. |
title |
Character, title for the plot. |
A ggplot2
object showing the forecast comparison.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.