Problem to fit NNETAR fable Model

Here I am again in my journey to learn fable package,

I have some issue in my code according below, maybe I have some misunderstanding about this model, I apologize about that

library(fpp3)
library(imputeTS)
library(tidyverse)

serie <- tibble(data = seq(as.Date("1949-01-01"), length = 24, by = "month"),
value1 = sample(1:24),
value2 = sample(1:24)) %>%
as_tsibble() %>%
fill_gaps(.full = TRUE)

serie<- serie %>%
na_kalman()

fit_nn_train <- serie %>%
model(NNETAR(value1 ~ value2 + lag(value1, 5) + trend() + season() + AR(p = 1), n_nodes = 14, scale_inputs = T))

future <- new_data(serie, 1) %>%
mutate(value2 = mean(data_tsbl_train$value2)) %>%
mutate(value1 = 6)

fc <- forecast(fit_nn,new_data = future)

Erro: Problem with mutate() input NNETAR(value1 ~ value2 + lag(value1, 5) + trend() + season() + AR(p = 1), n_nodes = 14, scale_inputs = T).
x Problem with mutate() input .sim.
x I can't use NNETAR to forecast with missing values near the end of the series.
:information_source: Input .sim is sim_nnetar(.innov).
:information_source: Input NNETAR(value1 ~ value2 + lag(value1, 5) + trend() + season() + AR(p = 1), n_nodes = 14, scale_inputs = T) is (function (object, ...) ....

For me this error does not make sense, because there is no missing values in this dataset

Some help again will be highly appreciated,

Best
Lucas

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.