Hello 🙂 I have this data:
interval | sales |
1 | 2,564,303,150 |
2 | 2,549,961,650 |
3 | 2,505,588,400 |
4 | 2,657,071,900 |
5 | 2,661,563,300 |
6 | 2,710,006,000 |
7 | 2,576,194,550 |
8 | 2,747,461,050 |
9 | 2,695,094,300 |
10 | 2,755,230,050 |
11 | 2,623,167,350 |
12 | 2,850,129,800 |
13 | 2,849,498,000 |
14 | 2,947,182,650 |
15 | 2,629,371,850 |
On excel, "=FORECAST.ETS(A17,B2:B16,A2:A16,,,)" achieves the following result:
Interval | Sales |
16 | 2,917,825,906 |
However, when I forecast on SAS, I achieve a different result:
data have;
input interval sales;
datalines;
1 2564303150
2 2549961650
3 2505588400
4 2657071900
5 2661563300
6 2710006000
7 2576194550
8 2747461050
9 2695094300
10 2755230050
11 2623167350
12 2850129800
13 2849498000
14 2947182650
15 2629371850
;
proc forecast data=have lead=1
method=expo trend=3
out=pred outfull outresid;
var sales;
id interval;
run;
SAS forecast result:
16 | 2880043215.5 |
How do I modify the SAS code to replicate excel's forecast for interval 16 ($2,917,825,906 sales)?
Any help is appreciated, thank you.
First of all,
PROC FORECAST is obsolete and is no longer part of the documentation (SAS 9.4 M7).
This is what you get when submitting PROC FORECAST in SAS 9.4 M7 (Maintenance Level 7) :
proc forecast; run;
WARNING: The FORECAST Procedure is obsolete. You may continue to use PROC FORECAST but this is
not recommended. For time series forecasting, consider using newer procedures such as
the ESM Procedure, the UCM Procedure, or the ARIMA Procedure.
Hence, try PROC ESM !
ESM optimizes the smoothing weights ( and PROC FORECAST does not !! )
Or better, try to find out what Excel is exactly doing and tell us, because there are dozens of possible algorithms that can be applied of course ! Only Exponential Smoothing already has about ten flavors.
Thanks,
Koen
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.