Hello. Im doing a forecasting task, and have a problem that I really cant find a solution on. I get this message, when wanting to do a gg_season and even when wanting to do STL and ETS modelling / analyzing:
"[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 cant really see any implicit gaps. I have imported a TS-dataset called "sales". I then made the dataset more tidy by making a pivot. This gives me a "month" column by character (Jan, Feb and so on), "year" column and a "sales" column.
I ran this code to create a new column with a YMD-variable by combining the year and month variables. This will first make the format like this "2007 Jan", "2007 Feb" and so on. I make a new dataset where i only include the sold and new month-variable.
sales$month <- paste(sales$year, sales$month, sep = " ")
sales <- subset(sold, select = c(sold, month))
Next im mutating the month-variable, where it formates it into YMD-format (2007-01-01, 2007-02-01) etc. The observations are per month. Im creating a tsibble with month variable as index.
sales <- sales %>%
mutate(month = ym(month)) %>%
as_tsibble(index = month)
I cant find the problem / solution.