Forecasting using SAS Forecast Server, SAS/ETS, and more

Hourly Forecast Error: Proc ESM Interval = Hour

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Hourly Forecast Error: Proc ESM Interval = Hour

Hi,

 

I am fairly new to SAS and trying to perform an hourly forecast using proc esm.

 

below is the code that I am using for this.

 

proc esm data=test111
out=forecasting  
lead=24
print=forecasts;
id Hours interval= hour;
forecast Sun / model=ADDWINTERS;
run;

 

However it give me the below error:

 

ERROR: Duplicate time interval found at observation number 2 in the data set WORK.TEST111, according to the INTERVAL=HOUR option
and the ID variable values. The current ID is Hours=1 and the previous is Hours=0, which are within the same HOUR interval.
Check that INTERVAL=HOUR is correct for this data set, and that the ID variable Hours contains SAS date or datetime values
that correctly identify the observations.
 
Please help.
 
Raw Data:
HoursSunMonTueWedThuFriSat
01914168195528
121141521191133
21013131417258
3261614182366
4816394328301
571362013157
692351718206
7722232516193
81626161018187
9933172621142
10843121522308
11101730148113
12132221243195
131320191020158
14282917112488
1524183640292510
16133628172077
178251223291214
18424132819129
19919182421523
20912141216165
217119812164
22111378143
233724816102
 

Accepted Solutions
Solution
‎11-13-2015 03:10 AM
SAS Super FREQ
Posts: 93

Re: Hourly Forecast Error: Proc ESM Interval = Hour

Posted in reply to badriprath

the Hours column is not in the datetime format, and thus PROC ESM doesnt handle the ID variable properly. you can try the following to trick PROC ESM to do hourly forecast:

 

PROC ESM SEASONALITY = 24 data = ....;

   ID HOURS INTERVAL = DAY;

  ...

 

View solution in original post


All Replies
Solution
‎11-13-2015 03:10 AM
SAS Super FREQ
Posts: 93

Re: Hourly Forecast Error: Proc ESM Interval = Hour

Posted in reply to badriprath

the Hours column is not in the datetime format, and thus PROC ESM doesnt handle the ID variable properly. you can try the following to trick PROC ESM to do hourly forecast:

 

PROC ESM SEASONALITY = 24 data = ....;

   ID HOURS INTERVAL = DAY;

  ...

 

New Contributor
Posts: 2

Re: Hourly Forecast Error: Proc ESM Interval = Hour

Posted in reply to alexchien
Thank you for the prompt response. It works perfectly. Smiley Happy
🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 613 views
  • 1 like
  • 2 in conversation