i don't know what's wrong in this code
cement_cv <- aus_production %>%
slice(1:(n()-4)) %>%
stretch_tsibble(.init = 5*4, .step = 1)
fc <- cement_cv %>%
model(ETS(Cement),
SNAIVE(Cement),
) %>%
forecast(h = "1 year")
fc %>%
group_by(.id, .model) %>%
mutate(h = row_number()) %>%
ungroup() %>%
accuracy(aus_production, by = c(".model", "h"))
Error in accuracy.default(., aus_production, by = c(".model", "h")) :
First argument should be a forecast object or a time series.
I would be grateful for your help in pointing out what I am doing wrong.