Model selection discrepancy in fable's ARIMA()

Hello:
Please help me figure this out.
I understand (please correct me if I'm wrong) that with the following statement, the model pool is of size 2, with or w/o the intercept, and there is no intercept in the selected model:

train_data |> 
  model(ARIMA(MW_Hourly ~ pdq(p = 1, d = 0, q = 2) + PDQ(P = 4, D = 1, Q = 1) + lag(HumidityLow, 24) + IsWeekend, 
              order_constraint = TRUE, stepwise = FALSE, greedy = FALSE, approximation = FALSE)) |>
              report()

# Series: MW_Hourly 
# Model: LM w/ ARIMA(1,0,2)(4,1,1)[24] errors 
# 
# Coefficients:
#   ar1     ma1      ma2     sar1     sar2     sar3     sar4     sma1  lag(HumidityLow, 24)  IsWeekendTRUE
# 0.9638  0.2247  -0.1032  -0.2097  -0.2230  -0.1849  -0.1512  -0.5088               -1.5179       -97.3029
# s.e.  0.0087  0.0320   0.0318   0.1012   0.0714   0.0571   0.0471   0.1030                1.6111        42.0355
# 
# sigma^2 estimated as 32392:  log likelihood=-7477.02
# AIC=14976.04   AICc=14976.27   BIC=15031.58

The intercept wasn't included in the final model. To get the same model explicitly, I exclude the intercept by hand, but it generates an error:

train_data |> 
  model(ARIMA(MW_Hourly ~ 0 + pdq(p = 1, d = 0, q = 2) + PDQ(P = 4, D = 1, Q = 1) + lag(HumidityLow, 24) + IsWeekend, 
              order_constraint = TRUE, stepwise = FALSE, greedy = FALSE, approximation = FALSE)) |>
  report()

# Series: MW_Hourly 
# Model: NULL model 
# NULL modelWarning message:
#   1 error encountered for ARIMA(MW_Hourly ~ 0 + pdq(p = 1, d = 0, q = 2) + PDQ(P = 4, D = 1, 
#                                                                                Q = 1) + lag(HumidityLow, 24) + IsWeekend, order_constraint = TRUE, 
#                                 stepwise = FALSE, greedy = FALSE, approximation = FALSE)
# [1] non-finite value supplied by optim

@robjhyndman

Referred here by Forecasting: Principles and Practice, by Rob J Hyndman and George Athanasopoulos

Specify an intercept with 1 + not 0 +.

2 Likes

Thank you for replying.
The first run didn't choose to include the intercept, correct? That's why I want to specify that it should be absent in the 2nd run.

Yes, there is no intercept selected in your first model. I assumed you wanted to specify that it should be present in your second model, which can be achieved by adding 1+ to the start of the RHS of the formula.

My intention was to make a specification that identifies one single model that coincides with what was selected in the first run. It is to make sure that when I run TSCV, the model doesn't change from one fold to the next.
Regardless, the discrepancy is that if the first run is successful, then then second statement should not have failed.

OK. Can you please post a bug report at Issues · tidyverts/fable · GitHub,
preferably with a reproducible example.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.