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:
Hours | Sun | Mon | Tue | Wed | Thu | Fri | Sat |
0 | 19 | 14 | 16 | 8 | 19 | 55 | 28 |
1 | 21 | 14 | 15 | 21 | 19 | 11 | 33 |
2 | 10 | 13 | 13 | 14 | 17 | 25 | 8 |
3 | 26 | 16 | 14 | 18 | 23 | 6 | 6 |
4 | 8 | 16 | 39 | 43 | 28 | 30 | 1 |
5 | 7 | 13 | 6 | 20 | 13 | 15 | 7 |
6 | 9 | 23 | 5 | 17 | 18 | 20 | 6 |
7 | 7 | 22 | 23 | 25 | 16 | 19 | 3 |
8 | 16 | 26 | 16 | 10 | 18 | 18 | 7 |
9 | 9 | 33 | 17 | 26 | 21 | 14 | 2 |
10 | 8 | 43 | 12 | 15 | 22 | 30 | 8 |
11 | 10 | 17 | 30 | 14 | 8 | 11 | 3 |
12 | 13 | 22 | 21 | 24 | 31 | 9 | 5 |
13 | 13 | 20 | 19 | 10 | 20 | 15 | 8 |
14 | 28 | 29 | 17 | 11 | 24 | 8 | 8 |
15 | 24 | 18 | 36 | 40 | 29 | 25 | 10 |
16 | 13 | 36 | 28 | 17 | 20 | 7 | 7 |
17 | 8 | 25 | 12 | 23 | 29 | 12 | 14 |
18 | 4 | 24 | 13 | 28 | 19 | 12 | 9 |
19 | 9 | 19 | 18 | 24 | 21 | 52 | 3 |
20 | 9 | 12 | 14 | 12 | 16 | 16 | 5 |
21 | 7 | 11 | 9 | 8 | 12 | 16 | 4 |
22 | 1 | 1 | 13 | 7 | 8 | 14 | 3 |
23 | 3 | 7 | 24 | 8 | 16 | 10 | 2 |
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;
...
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;
...
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.