I am trying to fit an ARIMA model (fable package) where I include dummies. Here is the code I am using
mod_region <- aggregated_region %>%
filter(SETTLEMENTDATE < '2020-02-11') %>%
model(
arima = ARIMA(sum ~ as.factor(Day))
)
fc_region <- mod_region %>%
forecast(h='7 days’)
It gives this error:
“Error: object 'Day' not found Unable to compute required variables from provided
new_data
. Does your model require extra variables to produce forecasts?”
I tried looking up on google but couldn’t figure out anything.
I earlier thought maybe it’s creating 7 dummies and that’s why the code blows up and then I tested using
arima = ARIMA(sum ~ I(Day == ’Sunday’))
But it gives the same error at the time of using forecast() function.
Do you know why this might be happening?