03-09-2018 01:01 AM
when I do forecast procedure the result stop in 2015 which does not give a forecast for the next years
can you please help me with this issue
this is my code
input year 1-4 cost 5-11 ;
format date year4.;
proc means data=costwater;
proc corr data=costwater;
var cost ;
Proc arima data=costwater plots=forecast(forecast);
Identify var=cost(1) crosscorr=(yr2003(1)) nlag=11;
Estimate input=yr2003 q=(1) p=(3);
forecast lead=6 interval=year id=date printall out=result;
proc print data=result;
/*Proc forecast data=water(where=(year<2016)) lead=20 out=pred;*/
/*var prod consum;*/
/*proc print data=est;*/
/*proc print data=pred;*/
/*proc sgplot data=pred;*/
/*series x=date y=prod/group=_type_lineattrs=(pattern=1);*/
03-12-2018 02:37 PM
Your question requires more details before experts can help. Can you revise your question to include more information?
Review this checklist:
To edit your original message, select the "blue gear" icon at the top of the message and select Edit Message. From there you can adjust the title and add more details to the body of the message. Or, simply reply to this message with any additional information you can supply.
SAS experts are eager to help -- help them by providing as much detail as you can.
This prewritten response was triggered for you by fellow SAS Support Communities member @BeverlyBrown.
03-16-2018 01:11 PM
As you are using an independent variable (yr2003) in your model, you will have to provide forecasts for the independent variable too.
In the output window you will find a note which suggests that there is an issue with your model:
|Warning:||More values of input variable yr2003 are needed.|
|The value for option LEAD= has been reduced to 0.|
Here is an example, which might be useful (featuring ESM and AUTOREG procedures, but the idea is the same):
Hope this helps,