## FORECAST in Proc Arima is in-sample prediction?

Hello,

As forecast procedure say, "The FORECAST statement generates forecast values for a time series by using the parameter estimates produced by the previous ESTIMATE statement. See the section Forecasting Details for more information about calculating forecasts.", FORECAST in Proc Arima is in-sample prediction?

If it is, how can I do out-sample prediction? Does SAS provide a proc to do the out-sample prediction?

1 ACCEPTED SOLUTION

Accepted Solutions

## Re: FORECAST in Proc Arima is in-sample prediction?

PROC ARIMA can produce one-step-ahead forecasts within sample (i.e. for time points t in the historical period you can get forecast at time (t+1) using the data up to time t) and multi-step-ahead forecasts after the history ends (i.e., out-of-sample). Please see "Example 7.2 Seasonal Model for the Airline Series" for an example and go over the syntax of the FORECAST statement for the details of lead= and back= options.  If your model contains predictor variables, the values of these variables must be available in the forecast region to produce the forecasts of the response variable.

7 REPLIES 7

## Re: FORECAST in Proc Arima is in-sample prediction?

Typically an "in-sample prediction" means that you want the predicted value at an observation that was used to fit the model. An "out-of-sample prediction" means that you are evaluating the model at a time value that was not in the data. Using this definition, forecasts are usually out-of-sample because you are predicting future values.

If this is not the definition that you are using, please explain what you mean.

## Re: FORECAST in Proc Arima is in-sample prediction?

yes, exactly as you said, so forecast in proc arima is out-sample?

## Re: FORECAST in Proc Arima is in-sample prediction?

PROC ARIMA can produce one-step-ahead forecasts within sample (i.e. for time points t in the historical period you can get forecast at time (t+1) using the data up to time t) and multi-step-ahead forecasts after the history ends (i.e., out-of-sample). Please see "Example 7.2 Seasonal Model for the Airline Series" for an example and go over the syntax of the FORECAST statement for the details of lead= and back= options.  If your model contains predictor variables, the values of these variables must be available in the forecast region to produce the forecasts of the response variable.

## Re: FORECAST in Proc Arima is in-sample prediction?

Thanks a lot for your help!

## Re: FORECAST in Proc Arima is in-sample prediction?

I have checked the results of the forecast again, It seems that the forecast with options lead= and back= cannot provide the out-of-sample forecast. ''Out-of-sample" forecast means that at every time point t, we forecast the value of time t+1 only using the information based on the time t. But the arima proc uses the information of all the observations at all time (the parameters are evaluated based on all the observations).

Am I right? If right, does SAS provide any solution to do the out-of-sample forecast?

## Re: FORECAST in Proc Arima is in-sample prediction?

I am not sure why you want forecast at time t+1 to be based only on data at time t.  Only for very simple models such as random walk model, such a forecast will be optimal.  In most situations forecast at time t+1 is a function of all the available data (i.e. all history up to time t).  PROC ARIMA provides in-sample and out-of-sample (multi-step ahead) forecasts as described standard ARIMA texts such as Box and Jenkins or Brockwell and Davis.  Your comment about parameter estimates is also unclear.  Estimating parameters using all data is also a standard practice.

## Re: FORECAST in Proc Arima is in-sample prediction?

Actually, you cannot get all the information (the data of time [0,T]) at time t. If you want to forecst t+1, you can only do the forecast using the model based on the data of time [0,t]. If you do the forecast at any time t using the full data [0,T], it is a in-sample forecast. It is meaningless for the realistic world but only for academic research.

Discussion stats
• 7 replies
• 2035 views
• 3 likes
• 3 in conversation