1
$\begingroup$

I want to do cluster analysis of a product monthly sales during 5 years in 30 stores (my data are time series). I want to cluster the stores according to its seasonality. This is an example of my data:

Month Year Shop1 Shop2 Shop3 ...

12 2008 3000 5000 700 ...

1 2009 2000 4000 500 ...

2 2009 6000 5000 300 ...

3 2009 7000 7000 600 ...

4 2009 5000 4000 900 ...

5 2009 5000 8000 1000 ... ...

I have read several questions about this topic but I still do not understand the procedure or how to deal with this problem.

  1. I have found the package TSclust and I am considering using the dissimilarity index CORT. It covers both conventional measures for the proximity on observations and temporal correlation for the behavior proximity estimation. Do you think that is a good approach to use this measure?

  2. I have also found the following procedure in: (Time series clustering), that consists in:

Step 1

Perform a fast Fourier transform on the time series data. This decomposes your time series data into mean and frequency components and allows you to use variables for clustering that do not show heavy autocorrelation like many raw time series.

Step 2

If time series is real-valued, discard the second half of the fast Fourier transform elements because they are redundant.

Step 3

Separate the real and imaginary parts of each fast Fourier transform element.

Step 4

Perform model-based clustering on the real and imaginary parts of each frequency element.

Step 5

Plot the percentiles of the time series by cluster to examine their shape.

Have you ever done something like that? If so, could you provide an example code to carry out these steps? Or do you know other steps?

  1. I have also read the paper of Kumar, Patel and Woo: "Clustering seasonality patterns in the presence of errors", but i do not know how to reproduce their procedure in R.

Any help would be helpful!

$\endgroup$

Your Answer

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

Browse other questions tagged or ask your own question.