Forecasting weekly data with ARIMA and tsibble for year with 53 weeks

75 views Asked by At

I am trying to forecast some weekly data in a tsibble format with train data from 2013 to 2016.

In 2015, I have year week W53 with NA.

Results with W53 and NA

Then, I join W52 and W53:

join yearweek W52 and W53

train2 <- ts_2020_filled%>% wk1 <- yearweek("2015 W52") wk2 <- yearweek("2015 W53") seq(from = wk1, to = wk2, by = 2) wk1 + 0:9

Fit arima model after joining W52 and W53

fit_ARIMA <- train2 %>% model(ARIMA(Perc_positive))

When I try to fit arima model I got this message:

Warning message: 1 error encountered for ARIMA(Perc_positive) [1] .data contains implicit gaps in time. You should check your data and convert implicit gaps into explicit missing values using tsibble::fill_gaps() if required.

I expect to be able to run arima model with yearweek 52 (without week 53) for year 2015.

Please, could someone give a suggestion in this case?

0

There are 0 answers