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:
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 |