How to decompose a time series using a frequency of 6 months?

Asked

Viewed 160 times

1

I have a sample of data with the period of one year. I Gero the time series without problems with the frequency = 12, but when will I use the decompose it shows the following error message:

Error in decompose(teste_compras) : 
  série temporal não tem período, ou tem menos de 2

From what I understand my time series has a frequency of 12 months, but I need a sample with at least 2 years to have 2 periods. However, my sample is only 12 months old and has no previous data.

What I’d like to know is if it’s possible to generate a time series with a frequency of 6 months so you can generate two periods of 6 months so you can break down the series. It is possible?

1 answer

3


This can be done computationally, but it doesn’t make mathematical sense.

Imagine that you have the average monthly temperatures of Porto Alegre, a city with well-defined summer and winter. But you only have one year of observations (i.e., n=12). Being temperature data, it makes sense to imagine that the seasonality of these data is annual. After all, the Janeiros in the city tend to be warm, while the Julhos tend to be cold.

Seasonality means that the behavior of observations tend to repeat after a fixed period of time. It makes no sense, in terms of modeling, to divide a series like this into two six-month periods. After all, a six-month seasonality would imply that the behavior in January and July would be similar; in February and August as well; in March and September and so on. And, at least for a series of temperatures, we know that the behavior of these pairs of months are opposite: the temperature increases from January to February, but low from July to August.

Your problem has no solution based on the theory of time series including seasonality in the period. Or more data should be collected (and even then are well over data: suggest 50 to 100 observations to adjust a time series model), or give up seasonality. After all, with 12 observations, a 12-period seasonality will not even be detected by the autocorrelation function.

  • I understand. Thank you very much for your reply.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.