I was trying to forecast a model using holt winters in R and this failed as showing the below mentioned error. I am not sure what is the issue and how to bypass it? I am actually forecasting this on loop so, because of this error my other time series forecasts with other SKU's are not getting completed.
Can someone help me out with this. Please
Attached is the dataset which is used and the code which I ran for the same.
library(dplyr)
library(tidyverse)
library(tidyr)
library(tidymodels)
library(forecast)
library(prophet)
library(readxl)
pd1 <- readxl::read_excel("C:X/X/X")
colnames(pd1)[1]="X1"
Y1 = ts(data = pd1$X1,
frequency = 12,
start = c(2019,1),
end = c(2022,8))
training_Y1 = window(x=Y1,
end = c(2022,8))
Model_Y1 = HoltWinters(x=training_Y1,
seasonal = "additive")
The data frame pd1 is given below:
structure(list(X1 = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 7, 7,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)), row.names = c(NA, -44L), class = "data.frame")