## PROC AUTOREG: forecast values

Solved
Occasional Contributor
Posts: 6

# PROC AUTOREG: forecast values

[ Edited ]

I am trying to forecast a time series value for 2026. I have historical data from 1990 to 2016. I am using PROC AUTOREG. When I use the simple linear trend regression, I am able to get the forecast value, but when I use the logarithmic or polynomial model, the forecast values are missing.

* the linear regression is ok and I can see the 2026 value in the final table
PROC AUTOREG data=varfinal;
model Y = TIME / method=ml nlag=5 backstep;
output out=result1 predicted=Yhat pm=Ytrend lcl=Ylcl ucl=Yucl;
RUN;

The following 2, shows missing values after 2016 Yhat, Ytrendm, Ylcl and Yucl

/**** Logarithmic ****/

PROC AUTOREG data=varfinal;
model Y = TIMELOG / method=ml nlag=5 backstep;
output out=result2 predicted=Yhat pm=Ytrend lcl=Ylcl ucl=Yucl;
RUN;

/*Polynomial */

PROC AUTOREG  data=varfinal;
model WIAWW = TIME TIMESQ / method=ml nlag=5 backstep;
output out=result3 predicted=Yhat pm=Ytrend lcl=Ylcl ucl=Yucl;
RUN;

Note; TIMELOG= LOG(TIME) and TIMESQ: TIME*TIME

Any help on why I can't see the forecast values in the logarithmic and polynomial case would we useful

Thanks

Final Note: I found the solution myself. Instead of using DATE: 1990 TO 2016, I used DATE: 1 TO 37

Accepted Solutions
Solution
‎04-16-2018 12:11 PM
Occasional Contributor
Posts: 6

## Re: PROC AUTOREG: forecast values

[ Edited ]

The code it works is the original code I shared. I did not change anything

All Replies
Super User
Posts: 13,583

## Re: PROC AUTOREG: forecast values

Posted in reply to pilicasalv

What do your actual "time" values look like? You say that you have data from 1990 to 2016 but is each record a single year? Date within the year? Datetime value from the year?

Also do you have any interesting notes in log?

Occasional Contributor
Posts: 6

## Re: PROC AUTOREG: forecast values

I should delete the question because it is working now. Only thing I did is to change my variable Time: 1990 to 2026 to time=1 to 37 and I can see forecast values for 3 models.

Super User
Posts: 13,583

## Re: PROC AUTOREG: forecast values

Posted in reply to pilicasalv

@pilicasalv wrote:

I should delete the question because it is working now. Only thing I did is to change my variable Time: 1990 to 2026 to time=1 to 37 and I can see forecast values for 3 models.

Actually the appropriate approach is to show the code that worked, any change made to the data if any and mark that post as a solution. That way the solution is available to others and marking the question as solved helps others.

Solution
‎04-16-2018 12:11 PM
Occasional Contributor
Posts: 6

## Re: PROC AUTOREG: forecast values

[ Edited ]

The code it works is the original code I shared. I did not change anything

☑ This topic is solved.

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

Discussion stats
• 4 replies
• 121 views
• 0 likes
• 2 in conversation