BI Tools

Tips and tricks for building information maps, OLAP cubes, reports, and dashboards

BI Admin

Learn your way around a SAS BI installation.

Visual Analytics

Learn your way around the SAS Visual Analytics tool

Coding & Data

Extract, transform, and load your data into the SAS BI toolset

Stored Processes

Create and design stored processes like a rock star

Home » Enterprise Guide

Using SAS to Automatically Forecast

Submitted by on 2012-04-06 – 10:05 AM

In honor of Easter, here’s a rare egg for the BI Notes blog – information about SAS statistical products! Today guest blogger Phil Low offers some insight about some of the other SAS procedures, particularly those used for the forecasting.

Would You Manually Forecast 60,000 Data Items?

Ever wake up to find you have to produce forecasts for 60,000 different items? As a data analyst for a medical supply distributor, I have. Manual forecasting under these conditions is neither feasible nor profitable. Enter the FORECAST and ESM procedures. These two procedures combined can produce more than 10 different forecast models to choose from, and can easily be compared against each other with goodness of fit stats.

The FORECAST procedure was written in the 1980s and is a simple auto regression with or without trend. Stepwise selection is used to determine which autoregressive lags make it into the final model. Because it is so old, some the more advanced features are better represented by ESM or AUTOREG. The ESM procedure is a moving average model. What’s great about ESM is its ability to throw deterministic trend and seasonality into the mix. You can customize just about every aspect of the model and every possible statistic is printed out.

Fancy Forecasting

If you really want to get fancy, you can throw in some lower order ARMA models. Be careful about the goodness of fit statistics though, some are calculated differently in the ARIMA procedure than in FORECAST or ESM. To get the correct goodness of fit statistics, you will have to calculate the formulas manually. SAS tech support has pre-written code available.

Once you have run the models, simply choose a goodness of fit statistic to rely on, be it RMSE, MAPE, AIC, SBC, etc…, and run with the champion. This methodology is not perfect of course, but I’ve found it to be incredibly useful at producing decent forecasts for an infinite number of items in mere minutes. For high value items with a long history, I will often go ahead and build a model using the AUTOREG or ARIMA procedures, which as a manual model can often be a much tighter fit. This combination of manually forecasting for important items and automatically forecasting the remaining items yields quite satisfactory results.

More about Phil Low

Phil Low is a data analyst at MDR specialty distribution corporation. As the only member of the data analytics department, Phil works very hard at writing code so that he won’t have to work so hard. You can connect with Phil through LinkedIn.

 Image courtesy of Microsoft image library.

Never miss a BI Notes post!

Click here for free subscription. Once you subscribe you'll be asked to confirm your subscription through your email account. You email address is kept private and you can unsubscribe anytime.
The following two tabs change content below.

Tricia Aanderud

Director of Data Visualization at Zencos Consulting
Tricia Aanderud is a SAS Business Intelligence and Visual Analytics consultant based in Raleigh, NC who works for Zencos Consulting. She has written several books about SAS, presented papers at many SAS conferences, and has been using SAS since 2001. Contact her for assistance with your next project.
Spread the love