Hi all,
I have a sample of 260 observations (52 weeks of sales for 5 items within two categories)
I would like to forecast weekly sales for each item for the next 4-6 week or forecast on weekly bases.
Is simple regression works here if yes how can I perform this task.
Any help will be greatly appreciated.
I am extremely skeptical that a regression is a good tool to do this type of forecasting. I would think some time series model would work better. Nevertheless:
You need to add a record for weeks 53, 54, 55, 56, ... for each category and item to the data set, leaving sales as missing.
Then fit the regression using PROC REG with a BY statement (by category item;), and use the OUTPUT statement to ask for predicted values to be written to a SAS data set. The predicted values for weeks 53, 54, 55, 56, ... are the forecasts.
Here's a simple explanation, with code that would have to be modified for your actual application: https://blogs.sas.com/content/iml/2014/02/17/the-missing-value-trick-for-scoring-a-regression-model....
But really, you should be using a time series model.
I like your idea of time series, Can you help with time series code for this data set?
To tell you the truth, I cannot help with time series models, other than the most simple ones. Probably someone else can help with that.
Thank you so much for sharing Regression code
You can also read the first 4 articles under Getting Started at this link https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/etsug/etsug_arima_toc.htm which is an example of forecasting sales.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.