BookmarkSubscribeRSS Feed
vasanthz
Calcite | Level 5

Hi Experts,

I have a SAS dataset that has transactions count by hour for 3 years.

The count of transactions at a specific hour depends on the same hour and day of the previous n weeks.

Example, The transaction count of future Tuesday 10AM, depends on all the past Tuesdays 10AM values.

The value at Thurdsay 6 PM would depend on all past Thursday 6PM.

 

Could you please let me a starting program to forecast this for the next day. Thank you. I have tried using PROC ARIMA with NLAG=168. But that doesn't seem to work, the forecast for 00:00 hours starts at high value and then the forecast value tends to move to zero by 23:00

 

PROC ARIMA DATA=PDB.UNIFIED_TS;
IDENTIFY VAR=SALES NLAG=168;
ESTIMATE P=1 Q=1;
RUN;
FORECAST LEAD=168 INTERVAL=HOUR ID=DATETIME OUT=PDB.RESULTS;
RUN;
QUIT;

 

I then tried using PROC UCM, but I am not sure what I am doing wrong there.

PROC UCM DATA=TIMESER_TS;
ID DATETM INTERVAL=HOUR;
MODEL MSU;
IRREGULAR;
LEVEL;
SLOPE;
SEASON LENGTH=24 TYPE=TRIG;
ESTIMATE;
FORECAST LEAD=48 OUTFOR=FORE_UCM;
RUN;
QUIT;

 

Thank you,

Vasanth.S

2 REPLIES 2
vasanthz
Calcite | Level 5

Pardon my ignorance, I am a base programmer and don't have much knowledge on statistics and learning now.

Ksharp
Super User
It is a question about SAS/ETS.
Better post it at Forecasting forum:
https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/bd-p/forecasting_econometrics

Also you could try PROC ESM .
And I quoted:
"The ESM procedure generates forecasts by using exponential smoothing models with optimized smoothing
weights for many time series or transactional data."

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 289 views
  • 0 likes
  • 2 in conversation