Created
October 24, 2021 18:31
-
-
Save anita-owens/78080fb9c3ac20d7ae606fd41105ce69 to your computer and use it in GitHub Desktop.
Forecast Future Data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Step 5 (Alternative): Specify the h or horizon to get a forecast into the future, but if using xregs (independent regressors), you must create a new dataframe with the xregs. | |
| #forecast on the new tibble | |
| forecast_tbl_future_data <- calibration_tbl %>% | |
| modeltime_forecast( | |
| new_data = explanatory_data | |
| ) | |
| #plot forecast for the next 3 months | |
| plot_modeltime_forecast(forecast_tbl, .interactive = TRUE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment