FORCST

Output     Options     Examples     Reference

FORCST allows you to use the results of any linear equation estimation routine in TSP to compute predicted values of the dependent variable over observations which may be the same or different from those used for estimation. You may also do a forecast using a different set of exogenous variables. The model for the forecast is either that specified on the previous linear (index) estimation procedure (OLSQ, INST, PROBIT, TOBIT, ORDPROB, POISSON, NEGBIN, ARCH or AR1) or you may supply the model yourself using various options. To compute predicted values after a nonlinear estimation procedure (LSQ or FIML) use the GENR, SIML, or SOLVE commands. Use BJFRCST if your model was estimated by Box-Jenkins techniques in BJEST.

FORCST (COEF=<vector name>,DEPVAR=<var name>,DYNAM or STATIC,PRINT,RHO=<scalar>) <predvarname> [<list of indep variables>] ;

Usage

The simplest form of FORCST follows the estimation command which specifies the model to be used for prediction; no other estimation commands can intervene. You should change the sample with a SMPL statement between the estimation and the forecast if you want to forecast for a different time period. The statement in this case is:

FORCST <name to be given to predicted variable> ;

Include a PRINT option with the command to have the results printed and plotted.

The other way to use the FORCST command does not require it to appear immediately following the estimation. However, you must specify the coefficient vector, the names of the right hand side variables, and, if a serial correlation correction is desired, the value of RHO.

If STATIC or NODYNAM is specified, FORCST will treat a lagged dependent variable like any other exogenous variable in computing the forecast. However, if you specify the (default) DYNAM option on the FORCST statement, FORCST will feed back the fitted values into the lagged dependent variable dynamically. As an initial condition the actual lagged dependent variable is used in the first period.

When FORCST follows an AR1 regression, the forecast is computed including a serial correlation correction using the estimated value of rho from the regression. This means that the dependent variable y must be available to the program so that

may be computed. This "static" forecast is that computed by FORCST when STATIC is specified. To obtain a true dynamic forecast or extrapolation, use the (default) DYNAM option. In this case, FORCST will look for presample data to calculate a presample residual. In either case, unless the FORCST statement immediately follows the AR1 estimation of interest, the name of the dependent variable must appear in the DEPVAR= option.

If there are any gaps in the SMPL vector, FORCST will treat the observations between each pair of SMPL numbers separately. If the DYNAM option is off, the output will be identical to that of a single SMPL over the entire period except for the indicated gaps. With RHO not zero or the DYNAM option, forecasting will start anew with each pair of SMPL numbers (that is, it will start with new initial conditions), and thus the results will be different than a single forecast over the entire sample.

Output

When the PRINT option is off, no output is printed by FORCST and only the single forecasted series is stored in data storage.

When the PRINT option is on, the procedure prints a title, the vector of coefficients used in the forecast, the serial correlation parameter, and whether the forecast is static or dynamic. A plot of the forecasted series is printed which has the observation's name down the left hand side and the values of the series printed on the right hand side. The series is also stored.

Options

COEF= the name of a vector containing the coefficient estimates to be used in the forecast. This could be the vector of coefficients stored under the name @COEF after a previous estimation. The order of the coefficients in this vector should match the order of the names of the right hand side variables in the forecast model.

DEPVAR= the name of the dependent variable in the estimation model. This option is necessary to obtain correct dynamic forecasts when the FORCST procedure is not executed immediately following the estimation procedure.

DYNAM/STATIC specifies whether the forecast is to be dynamic or static. A static forecast uses historical (supplied by the user) values for the lagged endogenous variable(s) throughout the forecast period, while a dynamic forecast uses the lagged forecasted values whenever it can (i.e., in the second observation for lag one, third observation for lag two, and so forth). This also applies to the lagged endogenous variable which appears in the residual in an AR(1) forecast. Obviously, STATIC is the default for non-AR1 forecasting when there is no lagged dependent variable.

PRINT/NOPRINT specifies whether or not the forecast is to be printed and plotted. If this option is on, a title and a description of the forecasting model are also printed.

RHO= the value of the serial correlation parameter if an AR1 forecast is being requested and the value from the immediately preceding estimation is not wanted.

Examples

In the example below, an OLSQ equation is used to extrapolate into a future time period; values of the exogenous variables for that time period should already have been loaded. The extrapolated values of CONS are stored under the name CONSP; they are also printed and plotted (because of the PRINT option).

SMPL 1 20;

OLSQ CONS C GNP;

SMPL 21 30;

FORCST (PRINT) CONSP;

The example below computes a series CONSP using the equation estimated by OLSQ, but with a different series for GNP on the right hand side. If an AR1 forecast of this type were desired, the serial correlation coefficient would be specified as a RHO= option in the parentheses also.

SMPL 1 20;

OLSQ CONS C GNP;

COPY @COEF B ;

.......

FORCST (COEF=B) CONSP C GNPNEW;

This example shows the use of the DYNAM option to obtain a dynamic forecast with a lagged endogenous variable on the right hand side of the equation (I(-1)).

SMPL 1 20;

OLSQ I I(-1) GNP ;

SMPL 21 30;

FORCST (PRINT,DYNAM) IFIT;

This example shows both uses of the FORCST procedure; the dynamic option was specified on the first statement so that an extrapolation of the estimating equation will be produced. The statements which save R and B were required only for the second forecast, which is over the same sample as the original estimation, but uses a different right hand side variable, GNPNEW.

SMPL 1 20;

AR1 I I(-1) GNP;

SET R = @RHO ; MFORM B=@COEF ;

SMPL 21 30;

FORCST (PRINT,DYNAM) IFIT;

(Other TSP program statements may occur here.)

SMPL 1,20;

FORCST (COEF=B,RHO=R) I2FIT I(-1) GNPNEW;

The example below shows how to compute a set of forecasts for a sales variable based on three slightly different GNP projections:

SMPL 65:1 82:4 ;

AR1 SALES C SALES(-1) GNP GNP(-1) ;

SMPL 83:1 86:4 ;

GENR GNP1 = GNPFCST ;

GENR GNP2 = 1.1*GNPFCST ;

GENR GNP3 = 0.9*GNPFCST ;

DOT 1 2 3 ;

    FORCST (DYNAM,PRINT) SALESF. C SALES(-1) GNP. GNP.(-1) ;

ENDDOT ;

Reference

Pindyck, Robert S. and Daniel L. Rubinfeld, Econometric Models and Economic Forecasts, Chapter 6, McGraw-Hill Book Company, New York, 1976.