Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A model selected by ARIMA() from a pool of models cannot be fitted individually #398

Open
NikTuzov opened this issue Jul 31, 2023 · 0 comments

Comments

@NikTuzov
Copy link

NikTuzov commented Jul 31, 2023

Hello:
I would like to report an issue with ARIMA().
Please unzip the attached data first.

train_data.zip


library(fable)
load("train_data.Rdata")

# There are only two models in the pool, with and w/o the intercept.
# ARIMA selects the one w/o the intercept.
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

# Since the intercept was excluded, we try to specify that explicitly, to have only one model in the pool.
# However, it fails:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant