@MCVARDODRAWS is a procedure for doing the draws (only) in a Monte Carlo analysis of a VAR. This leaves the graphing and other analysis to other procedures (particularly @MCGraphIRF and @MCProcessIRF). By default, @MCVARDODRAWS does a Cholesky factorization, though it can easily be adapted to other situations by using the FFUNCTION option to provide a function to compute an alternative factorization. A specific alternative for the BlanchardQuah model is @BQDODRAWS.
@MCVARDoDraws( options )
Options
MODEL=model to analyze [required]
You must have just estimated this.
STEP=number of response steps[48]
DRAWS=number of Monte Carlo draws[1000]
ACCUMULATE=list of variables (by position) to accumulate [none]
The ACCUMULATE option allows you to estimate the VAR in differences, then convert the impulse responses to the responses of the levels. For instance, ACCUMULATE=1 will "undifference" the 1st variable.
FFUNCTION=FUNCTION[RECT](SYMM,MODEL) [not used]
This must be a FUNCTION which returns an alternate factorization (rather than the Cholesky) using the draw for the covariance matrix (first argument in the function) and the model (second argument). Note that this is only technically correct if the factorization involves a justidentified model. An overidentified model requires more complicated methods.
Example
This estimates a twovariable VAR, computes the point estimates of the impulse responses (into BASEIRF's), does the Monte Carlo draws and graphs with a pair of inner (.16,.84) and outer (.025,.975) confidence bands. @MCVARDODRAWS does not, itself, create any output; it just defines %%RESPONSES for use by @MCGRAPHIRF.
system(model=varmodel)
variables gnp82 m1
lags 1 to nlags
det constant
end(system)
*
estimate(noprint,resids=resids)
impulse(model=varmodel,steps=nsteps,results=baseirfs,noprint)
*
* Do figure 2
*
@mcvardodraws(model=varmodel,draws=mcdraws,steps=nsteps)
@mcgraphirf(model=varmodel,$
center=input,impulses=baseirfs,percent=.025,.16,.84,.975,$
footer="Figure 2. Pointwise 68 and 95% Posterior Bands, YM Model")
