I am using proc autoreg. I get autoregression parameter estimates for data up to feb2018 (monthly data), having AR1 and 3 other predicting variables. I insert these parameter estimates into a formula to get the forcast values for mar2018 untill feb 2019. For the first AR1 value I use the actual Y value of the previous month. For each following AR1 value I use the predicted Y value for the previous month. The resulting forcast Y values I get make no sense. Is there another way to get the forcast values / the autoregression formula?
Example of the code I'm using:
proc autoreg data = table_a plots;
model y=a b c /
method = ml
nlag = 1
backstep slstay = 0.0500
output out = table_b lcl=lcl ucl=ucl p=predicted r=residual alphacli=0.05;
PROC AUTOREG with the NLAG= option fits a regression model with an autoregressive error process. When available, lags of the structural residuals are multiplied with the AR coefficients in the fitted model to obtain the predicted values. When lagged structural residuals are no longer available, a best linear predicted of the structural residual is used. For details, please see the following sections of the PROC AUTOREG documentation:
If you want to fit a model with a lagged dependent regressor and other exogenous variables, then you might want to consider using PROC VARMAX to model and forecast your data. Please see the following section of the PROC VARMAX documentation for details:
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.