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

Proc Forecast Error

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 10
Accepted Solution

Proc Forecast Error

Hi guys. Doing some proc forecast work but running into some trouble. Here is my code. A snapshot of what my data looks like is also below. I would greatly appreciate the help!

PROC FORECAST data=sasuser.nader_excel method=exp interval=year lead=12

out=foreexsm outactual out1step;

VAR aus;

ID date;

RUN;

But I have spent hours trying to get around this error and nothing. I ran into one forum post on this issue and it not get resolved.

errERROR: Duplicate time interval found at observation number 2 according to the INTERVAL=YEAR

       option and the ID variable values. The current ID is DATE=02AUG1926 and the previous is

       DATE=31JUL1926, which are within the same YEAR interval.


Screen Shot 2015-03-05 at 11.51.56 PM.png


Accepted Solutions
Solution
‎03-06-2015 04:26 PM
SAS Employee
Posts: 416

Re: Proc Forecast Error

Hello -

Your data is on daily frequency, but you are asking PROC FORECAST to generate a forecast on yearly frequency. This is why the procedure is complaining.

To address the situation you will need to accumulate your data first.

Alternatively you may want to consider PROC ESM, which allows you to deal with this challenge in one step.

Example (going from monthly to yearly by adding up values - syntax for going from daily to yearly does not change):

proc esm data=sashelp.air out=_null_ outfor=outfor plot=forecasts lead=3;

id date interval=year accumulate=total;

forecast air /method=linear;

run;

Note that you will need to decide which ESM technique to use - in the example above method=linear seems to make sense.

Thanks,

Udo

View solution in original post


All Replies
Solution
‎03-06-2015 04:26 PM
SAS Employee
Posts: 416

Re: Proc Forecast Error

Hello -

Your data is on daily frequency, but you are asking PROC FORECAST to generate a forecast on yearly frequency. This is why the procedure is complaining.

To address the situation you will need to accumulate your data first.

Alternatively you may want to consider PROC ESM, which allows you to deal with this challenge in one step.

Example (going from monthly to yearly by adding up values - syntax for going from daily to yearly does not change):

proc esm data=sashelp.air out=_null_ outfor=outfor plot=forecasts lead=3;

id date interval=year accumulate=total;

forecast air /method=linear;

run;

Note that you will need to decide which ESM technique to use - in the example above method=linear seems to make sense.

Thanks,

Udo

☑ This topic is SOLVED.

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

Discussion stats
  • 1 reply
  • 1060 views
  • 0 likes
  • 2 in conversation