Hi, am using HoltWinters function for a hypothetical univariate dataset with clear seasonality:
A <- c(1,2,3,4,5,4,3,2,3,4,5,6,5,4,3,4,5,6,7,6,5,4,5,6,7,8,7,6,5,6,7,8,9,8,7,6,7,8,9,10)
AForecast <- HoltWinters(A, beta=NULL, gamma=FALSE, l.start=1)
works perfectly well.
But when I introduce a gamma parameter that is not false as per below, I get an error.
AForecast <- HoltWinters(A, beta=NULL, gamma=NULL, l.start=1)
Error in decompose(ts(x[1L:wind], start = start(x), frequency = f), seasonal) :
time series has no or less than 2 periods
Same when gamma is a numeric value between zero and 1. Any Idea what this could be? I thank you in advance.