Stata 15 help for varbasic

[TS] varbasic -- Fit a simple VAR and graph IRFs and FEVDs

Syntax

varbasic depvarlist [if] [in] [, options]

options Description ------------------------------------------------------------------------- Main lags(numlist) use numlist lags in the model; default is lags(1 2) irf produce matrix graph of IRFs fevd produce matrix graph of FEVDs nograph do not produce a graph step(#) set forecast horizon # for estimating the OIRFs, IRFs, and FEVDs; default is step(8) ------------------------------------------------------------------------- You must tsset your data before using varbasic; see [TS] tsset. depvarlist may contain time-series operators; see tsvarlist. rolling, statsby, and xi are allowed; see prefix. See [TS] varbasic postestimation for features available after estimation.

Menu

Statistics > Multivariate time series > Basic VAR

Description

varbasic fits a basic vector autoregressive (VAR) model and graphs the impulse-response functions (IRFs), the orthogonalized impulse-response functions (OIRFs), or the forecast-error variance decompositions (FEVDs).

Options

+------+ ----+ Main +-------------------------------------------------------------

lags(numlist) specifies the lags to be included in the model. The default is lags(1 2). This option takes a numlist and not simply an integer for the maximum lag. For instance, lags(2) would include only the second lag in the model, whereas lags(1/2) would include both the first and second lags in the model. See numlist and tsvarlist for a more discussion of numlists and lags.

irf causes varbasic to produce a matrix graph of the IRFs instead of a matrix graph of the OIRFs, which is produced by default.

fevd causes varbasic to produce a matrix graph of the FEVDs instead of a matrix graph of the OIRFs, which is produced by default.

nograph specifies that no graph be produced. The IRFs, OIRFs, and FEVDs are still estimated and saved in the IRF file _varbasic.irf.

step(#) specifies the forecast horizon for estimating the IRFs, OIRFs, and FEVDs. The default is eight periods.

Examples

Setup . webuse lutkepohl2

Fit a VAR model and graph OIRFs . varbasic dln_inv dln_inc dln_consump

Same as above, but restrict to specified time period . varbasic dln_inv dln_inc dln_consump if qtr<=tq(1978q4)

Same as above, but use 10 as the forecast horizon . varbasic dln_inv dln_inc dln_consump if qtr<=tq(1978q4), step(10)

Fit a VAR model and graph IRFs . varbasic dln_inv dln_inc dln_consump if qtr<=tq(1978q4), irf

Same as above, but include the first, second, and third lags in the model . varbasic dln_inv dln_inc dln_consump if qtr<=tq(1978q4), irf lags(1/3)

Fit a VAR model and graph FEVDs . varbasic dln_inv dln_inc dln_consump if qtr<=tq(1978q4), fevd

Stored results

See Stored results in [TS] var.


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index