3

I am trying to predict time series through decomposition, my time series is as follows, enter image description here

As islamic calendars lag the gregorian calendar by 10 days after each year, so my seasonality is also changing, when I try to decompose time series through normal decomposition, constant seasonality pattern comes, although this is contrary to what should have been.

enter image description here

For example in this case seasonality is always constant, What should be the way of solving this problem.

The things that i have come across and after thinking myself is: 1)use decomposition on each year(or Two years), separately, i am confused that how would i include future with this kind of task, as i donot know future. 2) Instead of dealing separately Seasonaity and residues, use predictors to catch this sifting seasonality.

Stephan Kolassa
  • 95,027
  • 13
  • 197
  • 357

1 Answers1

6

This is what the TBATS method was designed to handle. See https://robjhyndman.com/publications/complex-seasonality/ for the paper. The method is implemented in the tbats() function from the forecast package in R.

Rob Hyndman
  • 51,928
  • 23
  • 126
  • 178
  • Thank you Rob Hyndman, I have implemented tbats on my data set and it is indeed giving acceptable results [link](https://www.linkpicture.com/q/Capture_160.png) – abubakar ilyas Apr 16 '21 at 20:08
  • I want to ask that how would i deal with outliers in time series using tbat, i have searched documentation but i could not find any clue, In STL we could have used robust fitting to avoid outliers, is their a way in TBAT to have such capability. Due to corona time series had changed in the lockdown period, is their a way to account for correction? eg such anomalies. [link]https://www.linkpicture.com/q/Capture_174.png – abubakar ilyas Apr 16 '21 at 20:16
  • You could pre-clean your data to replace outliers with estimates. The tsclean() function can help with that. – Rob Hyndman Apr 17 '21 at 00:55