This code works correctly
require(fable)
it <- tsibbledata::global_economy %>%
filter(Country == "Italy")
fm0 <- model(.data = it,
ARIMA(log(GDP) ~ Population),
ETS(log(GDP)))
Next one is not expected to work
fm1 <- model(.data = it,
ARIMA(log(GDP) ~ Population + pdq(3,1,7) +PDQ(5,1,1)),
ETS(log(GDP)))
Clearly it does not work because of ARIMA model. ETS works fine
I could do:
fm2 <- try(
model(.data = it,
ARIMA(log(GDP) ~ Population + pdq(3,1,7) +PDQ(5,1,1)),
ETS(log(GDP))))
But this will make both models to fail
I would like something like
fm3 <- try(
model(.data = it,
try(ARIMA(log(GDP) ~ Population + pdq(3,1,7) +PDQ(5,1,1))),
ETS(log(GDP))))
so that fm3 contains the correct results for ETS and an object of class 'try-error' for ARIMA
Possibly modifying fablelite:::estimate so that it can handle errors could be a solution?
Any help would be very much appreciated