BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
alex_wang
Calcite | Level 5

I want to build a forecast value add report, in the report I use a naive forecast (MA3, 3 month moving average) as baseline.

For example,

Now I am in November, I want my forecast start from December and cover 12 months

I have complete request history up to September.

For MA3, I want the forecast to be built as below

Dec forecast = sum of jul,aug and sep request / 3

jan forecast = (sum of aug and sep request + dec forecast) /3

feb forecast = (sep forecast + sum of dec and jan forecast) /3

mar forecast = sum of dec, jan and feb forecast

......

expend up to 12 months

typejulaugsepoctnovdecjanfebmarapr
request order1008030
forecast7060536158


my data store in below structure (for all missing month, request quantity is 0)

ProductArea        Product_Level_1 Request_Period_DT  Request_Quantity

AAA                   bbb                    nov-2010                   100

AAA                   bbb                    mar-2011                   80

AAA                   bbb                    apr-2011                   100

AAA                   bbb                    may-2011                   90

AAA                   bbb                    sep-2011                   200 

AAA                   ccc                    jun-2011                    100

AAA                   ccc                    jul-2011                     50

AAA                   ccc                    aug-2011                   80

AAA                   ccc                    sep-2011                   90

BBB                   ddd                    jul-2011                    100

BBB                   eee                    mar-2011                   80

BBB                   eee                    apr-2011                   100

BBB                   eee                    may-2011                   90

With any give date periods(e.g. from Jun-2011 to Oct-2011), how can I program to build MA3 forecast for 5 cycles:smileyconfused:

BR//alex                                         

1 ACCEPTED SOLUTION

Accepted Solutions
udo_sas
SAS Employee

Hello Alex -

In my SAS Global Forum Paper: "Extending SAS High-Performance Forecasting Using User-Defined Models" I'm using a MA3 model as an example.

You will find some code snippets on how to use the following procedures to come up with MA3 models: EXPAND, HPFARIMASPEC, and FMCP.

Check out: http://support.sas.com/resources/papers/proceedings11/329-2011.pdf

Thanks,

Udo

View solution in original post

2 REPLIES 2
udo_sas
SAS Employee

Hello Alex -

In my SAS Global Forum Paper: "Extending SAS High-Performance Forecasting Using User-Defined Models" I'm using a MA3 model as an example.

You will find some code snippets on how to use the following procedures to come up with MA3 models: EXPAND, HPFARIMASPEC, and FMCP.

Check out: http://support.sas.com/resources/papers/proceedings11/329-2011.pdf

Thanks,

Udo

alex_wang
Calcite | Level 5

Hi Udo,

Thank you very much for your kindly help!

Now I am studying it.

BR//alex:smileygrin:

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!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 2376 views
  • 4 likes
  • 2 in conversation