2
$\begingroup$

How many cycles should I have in my time series to model the seasonality component of it so that I can get rid of it and just look at the trend?

$\endgroup$
0
$\begingroup$

Let's say you have $N$ years of monthly data. Think of FFT (fourier analysis). Your bin resolution is $F/N$, where $F$ - sampling frequency, so we get $12/(12N)=1/N$

So, if your $N=1$, i.e. you have 12 observations, you bin size is 1. This means that your precision is approximately 1. Basically, this is garbage. If you analysis tells you there's one annual cycle, then it's [0,2] range, really.

If you have $N=5$ years of data, then the bin size is $0.2$, i.e. cycle one would be in range [0.8,1.2] - much better.

$\endgroup$
2
  • $\begingroup$ So what precision is enough? Suppose I want to model daily and weekly seasonality to get rid of it using R ... How many weeks worth of data should I collect? $\endgroup$ Sep 20 '16 at 17:33
  • 1
    $\begingroup$ @user2253546, you did not specify how do you measure the precision and what's your tolerance: these will determine how much data you need. When you say "daily" seasoinality do you mean the cycle length is a day? If that's the case, then you need a few days worth of data sampled at at least 12 hour frequency. $\endgroup$
    – Aksakal
    Sep 20 '16 at 17:44
4
$\begingroup$

As @Ben_Bolker says, this is a "how long" question.

In my experience (mostly with marketing and sales data), 3 cycles is minimal, and usually sufficient if the seasonality is consistent. But who cares about the experience of a person who doesn't even post under his own name? What about a citation?

Checking a popular textbook [John E. Hanke and Dean W. Wichern, Business Forecasting, 9th edition, 2009, Pearson] I see the following recommendations in table 3.6, page 80, for minimum data requirements:

Seasonal exponential smoothing [Holt-Winters]: 2 cycles (seems too short to me; that's a lot of parameters to fit in two cycles)

Adaptive filtering: 5 cycles

Classical decomposition: 5 cycles (seems long to me, if the series looks pretty regular)

Census X-12: 6 cycles (newer version available; note the Census versions have nice handling of holiday effects)

Box-Jenkins: 3 cycles

Time series multiple regression: 6 cycles

$\endgroup$
1
  • 1
    $\begingroup$ Thanks for taking time to look up a reference: they may just rules of thumb, but rules of thumb are about as good as the OP is going to get $\endgroup$
    – Silverfish
    Sep 21 '16 at 18:19
1
$\begingroup$

This is a "how long is a piece of string" question, i.e. one that can't be given an objective, quantitative answer without more context. @Aksalal has a nice technical explanation, but your question is effectively the same as "how many data points do I need to characterize the population mean?" - i.e., it depends how noisy your data are and how precise you need the answer to be. The only thing we can say with certainty is that you need $N>1$. Any rule of thumb you're given will depend on what levels of noise are expected in "typical" data in a particular field, and what levels of precision are useful. If you showed us a graph of a time series people here might be willing to give you subjective answers, but you're unlikely to get a hard-and-fast answer.

$\endgroup$

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.