BookmarkSubscribeRSS Feed
Mumbai_1983
Calcite | Level 5

Hi,
I have sales data for 30 stores on a daily basis. The store stocks only one type of item and there is a seasonal pattern to sales. The business would like to understand if certain periods should be grouped together (day 1 - 60, 61 - 180, etc) so they can manage demand for products accordingly. They currently derive the day groups visually (around 5-6 groups for each store) and since they have only 30 stores, it is easily managable to visually inspect sales data.

 

However, they would like to understand if a data driven approach can be used to group days together.

 

Grateful for any suggestions on how to approach this problem.

 

 

Store ID Day No Sales
1 1 125
1 2 140
1 3 166
1 363 300
1 364 321
1 365 340

 

3 REPLIES 3
Mumbai_1983
Calcite | Level 5

Hi,
I have sales data for 30 stores on a daily basis. The store stocks only one type of item and there is a seasonal pattern to sales. The business would like to understand if certain periods should be grouped together (day 1 - 60, 61 - 180, etc) so they can manage demand for products accordingly. They currently derive the day groups visually (around 5-6 groups for each store) and since they have only 30 stores, it is easily managable to visually inspect sales data.

 

However, they would like to understand if a data driven approach can be used to group days together.

 

Grateful for any suggestions on how to approach this problem.

 

Store ID Day No Sales
1 1 125
1 2 140
1 3 166
1 363 300
1 364 321
1 365 340

 

PGStats
Opal | Level 21

You could try to find optimal date ranges with HPSPLIT. For 5 periods of at least 10 days, you would use: 

 

proc hpsplit data=myStoreData
	leafsize=10 maxbranch=5;
input date / level=int;
target sales / level=int;
output nodestats=myStoreDataSplit;
run;

The procedure will try to minimize the variance of sales within each period.

 

PG
Mumbai_1983
Calcite | Level 5

Thanks for your response, I have been reading about structural breaks in time series data too. 

If my time series data had features, how would I go about doing this. Say for each day, I had other attributes like sale indicator, customer footfall in the store, web visits, etc, how would I then approach this problem. I was considering clustering but this could end up grouping days wierdly (e.g. days 1, 40, 80 and 90 are in Cluster 1, etc). 

 

Is there an approach to structural breaks in time series with multiple attributes? Would love to try an open source implementation for this. 

 

Grateful for suggestions. 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 987 views
  • 0 likes
  • 2 in conversation