There are many techniques to decompose a time series into trend, seasonal, and remainder components. I was wondering if these techniques can be applied without worry to time series which have some zero values. I think that the answer may be different according to the decomposition method used and to the observed ratio of zero to non zero values.

Since the question might sound too broad, I'll focus on just two decomposition methods: decomposition using a moving average and the STL procedure. I'm worried that the estimate of the seasonal component will be biased by the presence of the zero values. Intuitively, if the time series isn't too short, I'd say that the seasonal component will not be too much affected if the ratio of zero to non zero values is low. But how can I ensure that the zero values aren't too many? I'd like to know if I should aggregate the data until there are non more zero values (such as considering data by quarters instead that by month) or if I need to apply specific techniques which can handle zero values.

Thank you in advance

  • $\begingroup$ Are these true zero values, or missing data? Additive seasonal-trend models should have no problem handling zero values. $\endgroup$ – sfjac Jul 26 '18 at 0:34
  • $\begingroup$ They are true zero values $\endgroup$ – John M Jul 26 '18 at 6:38

Additive models for seasonal-trend decomposition should have no problem with zero values. With additive models

data = seasonality + trend + residual

the trend will be calculated adjust to the appropriate level, which can be near zero without any restriction.

If there were reason to believe that the composition should be multiplicative, then zero values would be problematic.

| cite | improve this answer | |
  • $\begingroup$ This is being automatically flagged as low quality, probably because it is so short. At present it is more of a comment than an answer by our standards. Can you expand on it? You can also turn it into a comment. $\endgroup$ – gung - Reinstate Monica Jul 27 '18 at 1:52
  • $\begingroup$ Thank you for your answer, sfjac. Before accepting the answer, I would like to know why zero values are problematic if the time series follows a multiplicative decomposition. Is it because we can't log-transform the data? $\endgroup$ – John M Aug 1 '18 at 16:50
  • $\begingroup$ @John M - That is one way of looking at it - typically multiplicative decomposition is actually done by log transforming and then doing an additive decomposition. Another way to think of it is if one of the components S or T goes to zero, then V is zero and the other is undetermined, as is the "residual". $\endgroup$ – sfjac Aug 1 '18 at 18:56
  • $\begingroup$ I see, thank you for the explanation. Let's suppose that the time series follows a multiplicative model. Wouldn't it be helpful to add a positive constant to the time series (so that all the values become greater than zero), perform the decomposition on the transformed data and then go back to the original scale by a back-trasformation? $\endgroup$ – John M Sep 10 '18 at 18:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.