1

I have been trying to find the seasonal indexes from a time series using the forecast package in R, but with no success. Basically, I need to find the seasonal indexes like this image below. It's two tables from wikipedia https://en.wikipedia.org/wiki/Seasonality

I'm trying this way:

time_series <- ts(values, start = 2019, frequency =12)

autoplot(decompose(time_series)) + ggtitle("Decomposition of the series")

time_series_decompose <- decompose(time_series)  
  
seasonal_index <- rep(time_series_decompose$figure, 3)

But the output has negative number, and it doesn't make sense. May you guys help me, please?

enter image description here

  • Hi! Is it possible to share the code you are using and also the data, or part of it? See: https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example/5963610#5963610 – jassis Feb 21 '22 at 13:06

0 Answers0