BookmarkSubscribeRSS Feed
pjy1006
Calcite | Level 5

I am forecasting 3 months weekly data based on 48 weeks of data. One year has roughly 52 weeks of data. So 48 weeks of data is less than a year.

When using proc esm, some models (addwinter, seasonal) just use the same numbers from historical week n to predict future week n. For ex, if my historical week 1 is of 163 , historical week 2 is 115, historical week 3 is 97... . My forecast week 1 also has 163, forecast week 2 has 115, forecast week3 has 97...Why is that? Is this caused by lack of sufficient data? 

3 REPLIES 3
ballardw
Super User

As a bare minimum you should include the code used, best is to copy from the log all the code and messages related to this. That way we have some clue as to where to look.

 

Dates and interval value variables are a key part of these. If you have "dates" that are not actual SAS date variables (numeric with a date type format such as date9 or yymmdd10) you may have introduced some oddities. I do not understand what this means:" if my historical week 1 is of 163 , historical week 2 is 115,". If that means you have a variable week with values like 1, 2, 3 that may be a part of the problem if the options you have used in the code (Hint) expect dates.

 

Be prepared to provide example data that behaves the way you describe the problem. If your data is sensitive then dummy is fine as long as variable values are "reasonable" (depends on options but typically not having every value the same) and generate similar output.

 

 

pjy1006
Calcite | Level 5

I just posted an example of our forecast result.  Here is the the code. Our date variable is in date9. format already. 

 

Data &input_data.;
   Set &input_data.;

  adj_vol_addwinters=Actuals;

  adj_vol_seasonal=Actuals;

Run;

 

 

proc esm data=&input_data.
outfor=forecast_model
outstat=stat_models
lead=52;
Id week_dt
interval=weekly
accumulate=total;
Forecast adj_vol_seasonal / model=seasonal;
Forecast adj_vol_addwinters / model=addwinters;
Run;

SAS Innovate 2025: Call for Content

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 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 3 replies
  • 422 views
  • 0 likes
  • 2 in conversation