0
$\begingroup$

I have two sets of data, drawn from the same source. I know that the data exhibits seasonal behavior, visible over each week and over each day, and am willing to assume that the seasonal behavior is the same between observations. I have timestamps for each observation.

The 'training' set is of arbitrary length, let's say 1 month. I can perform stl, HoltWinters or some other decomposition to get a seasonal adjustment.

The test set is of fixed length, say 6 hours. At this resolution, we still have seasonal behavior, however performing a decomposition would be meaningless.

How can I apply the seasonal trend that I found within the training set to the new set?

$\endgroup$
0
$\begingroup$

This is very common and is easy. From the training data set, let's suppose you have seasonal factors of 1.1, .95, .95 and 1.0 (e.g. quarterly data, multiplicative seasonality so factors average 1.0).

Then divide your new data set by these seasonal factors to deseasonalize the new set.

Make sure you start the sequence in the right spot! e.g. training will start in period 1, but your new set may naturally start in some other period.

$\endgroup$
  • $\begingroup$ To clarify: I should find the mean of the entire training set, call that value 1.0, then find the mean of each 'season' I want to break it into (e.g. day of week, or quarter of year), and rescale the seasonal means to the training mean. This gives me the seasonal factors? How does this relate to the output in R of stl, hw, or dec? $\endgroup$ – Chris Jul 17 '15 at 19:57
  • $\begingroup$ stl() only gives additive seasonal factors, which center around 0. In my example above, I assumed multiplicative seasonal factors, which center around 1. With additive factors, you'd need to rescale (because the two time series you have are likely not in the same scale, e.g. the mean of one series might be 80, the mean of the other 50). So, to make it easy for now, I'd use multiplicative seasonality from classical decomposition. Hyndman covers this in otexts.org/fpp/6/3 In my experience (mostly in marketing contexts) seasonality is normally multiplicative. $\endgroup$ – zbicyclist Jul 18 '15 at 21:51

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.