suppressPackageStartupMessages(library(forecast))
suppressPackageStartupMessages(library(dplyr))
# Create a model
fit <- auto.arima(AirPassengers)
data_tbl <- ts_to_tbl(AirPassengers)
# Simulate 50 possible forecast paths, with .horizon of 12 months
output <- ts_forecast_simulator(
.model = fit
, .horizon = 12
, .iterations = 50
, .data = data_tbl
)
output$ggplot
Run the code above in your browser using DataLab