ellisp / forecastxgb-r-package

An R package for time series models and forecasts with xgboost compatible with {forecast} S3 classes
GNU General Public License v3.0
140 stars 42 forks source link

"decompose" method doesn't work well in combination with differencing #32

Open ellisp opened 7 years ago

ellisp commented 7 years ago

for example, here are the four different seasonal adjustment methods with differencing on:

model5 <- xgbar(AirPassengers, maxlag = 24, trend_method = "differencing", seas_method = "dummies")
model6 <- xgbar(AirPassengers, maxlag = 24, trend_method = "differencing", seas_method = "decompose")
model7 <- xgbar(AirPassengers, maxlag = 24, trend_method = "differencing", seas_method = "fourier")
model8 <- xgbar(AirPassengers, maxlag = 24, trend_method = "differencing", seas_method = "none")

fc5 <- forecast(model5, h = 24)
fc6 <- forecast(model6, h = 24)
fc7 <- forecast(model7, h = 24)
fc8 <- forecast(model8, h = 24)

par(mfrow = c(2, 2), bty = "l")
plot(fc5, main = "dummies"); grid()
plot(fc6, main = "decompose"); grid()
plot(fc7, main = "fourier"); grid()
plot(fc8, main = "none"); grid()

image