Object Reference : Object View and Procedure Reference : Var
  
 
forecast
Computes (n-period ahead) dynamic forecasts of the VAR or VEC equation.
forecast computes the forecast for all variables and all observations in a specified sample. In some settings, you may instruct forecast to compare the forecasted data to actual data, and to compute summary statistics.
Syntax
var_name.forecast(options) f_pattern [se_pattern]
You should enter a naming suffix for the forecast series and, optionally, a naming suffix for the series containing the standard errors. Forecast standard errors are currently only available for non-Bayesian VARs, and are computed via simulation.
Not currently available for switching VARs
Options
General Options
 
g
Graph the forecasts in individual graphs - one per dependent variable.
m
Graph the forecasts in a combined graph.
e
Produce the forecast evaluation table.
f = arg (default= “actual”)
Out-of-forecast-sample fill behavior: “actual” (fill observations outside the forecast sample with actual values for the fitted variable), “na” (fill observations outside the forecast sample with missing values).
prompt
Force the dialog to appear from within a program.
p
Print view.
Non-Bayesian Options
 
streps=integer
Number of simulation repetitions. Only applicable if a se_pattern is provided.
f=number
Fraction of failed repetitions before stopping. Only applicable if a se_pattern is provided.
BVAR Options
 
classical
Perform classical forecasting – forecast based upon the posterior means of the coefficients as if they were calculated from a classical VAR. If omitted Bayesian sampling is used.
If “classical” is not specified, the following Bayesian forecasting options are available:
 
mean
Store the mean of the draws from the sampler. If omitted the median is stored.
draws=integer (default= 100000)
Number of draws.
burn=arg (default=0.1)
Proportion of initial draws to discard.
seed=integer
Random number seed.
dropunstable
Drop any draws that produce unstable coefficients.
dgraph
Produce distribution graphs.
fangraph
Produce fan graphs.
page=arg
Store the individual draws in a new page.
BTVCVAR Options
 
usemean
Use posterior mean as the point estimate. The posterior median is used if usemean is not included in the options list.
showci
Show credibility intervals (bands).
cilevels = arg
(default = "0.95")
Set credibility levels. For multiple levels, enter a space-delimited list of values surrounded by quotation marks, e.g., "0.3 0.5 0.8".
uselines
Use lines instead of shading for credibility intervals.
seed = int
Set the random seed. EViews will generate a seed if one is not specified.
rng = arg
(default = “kn” or method set via rndseed)
Set random number generator type. Available types are: improved Knuth generator (“kn”), improved Mersenne Twister (“mt”), Knuth’s (1997) lagged Fibonacci generator used in EViews 4 (“kn4”), L’Ecuyer’s (1999) combined multiple recursive generator (“le”), Matsumoto and Nishimura’s (1998) Mersenne Twister used in EViews 4 (“mt4”).
Examples
The following lines:
smpl 1970q1 1990q4
var var1.ls 1 3 con inc
smpl 1991q1 1995q4
var1.forecast(m) _f _se
estimate a VAR over the period 1970Q1–1990Q4, and then computes dynamic forecasts for the period 1991Q1–1995Q4, and plots the forecasts as line graphs.
smpl 1970q1 1990q4
var var2.bvar(prior=inw) 1 3 con inc
smpl 1991q1 1995q4
var1.forecast(m, draws=50000, burn=.05, dgraph, page=draws) _f
estimates a Bayesian VAR with an independent normal-Wishart prior over the same period, and then forecasts that VAR taking 50,000 draws of a Gibbs sampler, discarding the first 2,500 draws, producing a distribution graph of the forecasts and storing the draws into a new panel page called DRAWS.
Cross-references
See “Forecasting” for a discussion of forecasting from VARs and VECS.
See also Var::fit.