1

I want to use theta model implemented in Forecast package inside my fable forecasting model. This what I am trying to do.

library(forecast)
library(tidyverse)
library(fable)
library(tsibble)
library(fabletools)

tourism_aus <- tourism %>% 
  summarise(Trips = sum(Trips))
tourism_aus


fit <- tourism_aus %>% 
  model(
    ets = ETS(Trips),
    arima = ARIMA(Trips),
    theta = forecast::thetaf(Trips)
  ) %>% 
  mutate(
    average = (ets + arima + theta) / 3
  )
fit

fit %>% 
  forecast(h = "2 years") %>% 
  autoplot(tourism_aus, level = 95, alpha = 0.5)

I am having this error message,

Failure in thetaf(Trips) : Objekt 'Trips' not found

Is there any way I can use theta method inside fable?

JontroPothon
  • 127
  • 1
  • 9

1 Answers1

1

Models from the forecast package use a different interface, and so are not compatible with the model() function used by fable. The theta model will be added to fable in the next release.

You can create a fable yourself, by using the forecast output of forecast::thetaf() to identify an appropriate distribution. This can be useful for plotting, accuracy evaluation and reconciliation, however ensembling requires models to use the fable interface.

Update: The THETA() model has now been added to fable.