Home > Software design >  R geom_forescast use case interpretation
R geom_forescast use case interpretation

Time:06-29

Since I just started getting familiar with forecasting, so I stumbled upon the example enter image description here

To forecast 5 years you can use h to set the number of forecasts:

autoplot(lungDeaths)   
  geom_forecast(h = 60, showgap = FALSE)

Output:

enter image description here

To remove the confidence intervals use PI:

If FALSE, confidence intervals will not be plotted, giving only the forecast line.

library(forecast)
autoplot(lungDeaths)   
  geom_forecast(h = 60, showgap = FALSE, PI = FALSE)

Output:

enter image description here

  • Related