-------------------------------------------------------------------------------
help for  dpredict                                     juraj.katriak@iskwien.at
-------------------------------------------------------------------------------

Title dpredict -- Dynamic forecasting for ARIMA(p,d,q) models

Syntax

dpredict [varlist ] , from(#) to(#) periods(#) [lvl] : command

options Description ------------------------------------------------------------------------- from(#) the number of the last observation of the first subsample to(#) the number of the last observation of the last subsample periods(#) horizon (no. of periods) of the dynamic forecasts lvl specifies that the dependent variable of the arima-command is in levels, rather than in differences norecursive specifies that the subsamples will have a fixed size, rather than grow ------------------------------------------------------------------------- command must be a valid arima estimation command

Description

dpredict calculates dynamic predictions from the command, which must be the arima command. The predictions calculated by dpredict are all out-of-sample predictions, each based on a different subsample. The horizon of the predictions (how many periods ahead) is specified by the periods(#) option. The subsamples, which the predictions are based on, change sequentially starting with the subsample delimited by 1/from(#) up to 1/to(#). If the norecursive option is specified, then the subsamples will have a fixed size of from(#) observations, i.e. the first subsample will be 1/from(#) and the last (to(#)-from(#))/to(#).

If the lvl options is not specified, then the direction-of-change statistic is computed assuming that the dependent variable of the supplied arima-commmand is in differences corresponding to the forecast horizon specified in periods(#) (i.e. if the forecast horizon is e.g. 3 then the it is assumed that the dependent variable is of the form of s3.dep_var).

If varlist is supplied then in each step the last observation in the current subsample of the all variables in specified in arima (including the dependent) is replaced by the corresponding observation from varlist. Hence, if varlist is supplied, it must contain the same number of variables as the arima command. This allows for the possibility that the last observation of some variables in the dataset must, in fact, be predicted, because it is not available at the time when making the forecasts.

Saved Results

dpredict saves in r(): scalars , r(RMSE), r(MAE) and r(DOC), containing the computed statistcs RMSE, MAE, DOC and matrices , r(Yhat) and r(ResMat), which contain the out-of-sample predictions and residuals respectively. Additionaly a matrix , r(DOCmat), with elements 1 (if the direction of change was predicted correctly) and 0 (if not) is saved.

Remarks

The statistisc computed along with the predictions are: RMSE - root mean square error, MAE - mean absolute errror and DOE - direction of change (gives the proportion of correctly predicted values of dep_var)

Examples

. use http://www.stata-press.com/data/r9/wpi1

. gen wpi_df = d.wpi

. dpredict , f(80) t(124) p(1) : arima wpi_df , arima(1,0,1)

Author

J. Katriak, ISK Vienna, juraj.katriak@iskwien.at

Also see

Online: help for arima, arima_postestimation