-------------------------------------------------------------------------------
help for varlag                                                        [P.Joly]
-------------------------------------------------------------------------------

Statistics to determine the appropriate lag length in VARs, ECMs

varlag [varlist] [if exp] [in range] , lags(#) [ testlag(#) nomulti exog(varlist) trend noconstant single nodetail cov corr large level(#) vececm_options ]

varlag is for use with time-series data. You must tsset your data before using these commands; see help tsset.

varlist may contain time-series operators; see help varlist.

Description

varlag reports various statistics that are meant to help select the proper lag structure to use in the estimation of Vector autoregressions (VARs) and Error Correction Models (ECMs). For each lag length up to lags(#), varlag reports the Multivariate portmanteau (Ljung-Box) statistic for white noise residuals, p-values from Omnibus tests of multivariate normality of the residuals, as well as the Breusch-Pagan statistic for the independence of residuals between equations. varlag also performs likelihood ratio tests to test successive null hypotheses of smaller lag length.

Whether a varlist is specified determines if the tests should be computed for a VAR or an ECM. If varlist is omitted, varlag assumes the tests are for an ECM and options normally required by vececm must be specified; see help vececm. This means that Johansen's ML cointegration rank test must have been performed prior to running varlag; see help johans. Otherwise, if varlist is specified, varlag is implemented in the context of a VAR.

In the context of a VAR, varlag can report various other statistics for each individual equation in the system and each lag length if option single is declared. It computes the RMSE, FPE, and Schwartz criterion, as well as p-values of Breusch-Godfrey LM tests for autocorrelated disturbances of order 1, 4, and larger (up to min[.25*N,testlag(#)]). The p-value of the Breusch-Pagan LM statistic for heteroskedasticity is also reported as an indicator of potential mispecification. However, the univariate Ljung-Box portmanteau statistic is not reported as these tests are not appropriate when stochastic regressors other than lagged values of the dependent variable are included in individuals regressions.

For each statistic, the apparent optimal number of lags is reported.

Options

lags(#) specifies the largest lag length to be considered.

testlag(#) specifies the largest lag length to use in LM tests of serial correlation as well as for Multivariate portmanteau statistics. The default is for the portmanteau to use min([N/2]-2,40) and the LM to use min(.25*N,40).

nomulti suppresses the calculation multivariate statistics for the system such as Multivariate portmanteau statistics, Omnibus tests for multivariate normality or residuals (Doornik & Hansen (1994)), and Breusch-Pagan tests for the independence of the residuals between equations, i.e., that the disturbance covariance matrix is diagonal.

vececm_options are options used with vececm; see help vececm. Options such as cir(#) and sm(case) are required.

exog(varlist) is only allowed in the context of VARs (i.e. if a varlist is specified) and specifies the exogenous variables that enter the VAR. vececm takes its exogenous variables from those specified at johans.

trend is only allowed in the context of VARs and specifies that a linear trend be included in each equation.

noconstant is only allowed in the context of VARs and suppresses the inclusion of an intercept in each equation of the VAR.

single is only allowed in the context of VARs and displays diagnostic statistics for each individual equation in the system, for each lag length up to lags(#).

nodetail is relevant only with single and suppresses the display of individual statistics for every lag length. Instead, the optimal lag with respect to each statistic is reported.

cov requests the display of the variance-covariance matrix of residuals between equations.

corr requests the display of the correlation matrix of residuals between equations.

large specifies that large sample statistics are to be used, specifically, that the number of sample observations, T, be used as a divisor in computing the covariance matrix for the equation errors rather than alternate divisor, T-K. The covariance matrix of equation errors is used in the sequence of likelihood ratio tests for smaller lag length. As asymptotically justified estimators, vector autoregressions and error correction models may use large sample statistics.

level(#) specifies the confidence level, in percent, for confidence intervals of the coefficients; see help level.

Examples

. use http://fmwww.bc.edu/ec-p/data/macro/wgmacro.dta, clear

. varlag investment income consumption, l(8)

. varlag investment income consumption, l(8) single corr

In Error correction models:

. johans investment income consumption, lags(6) . varlag, lags(10) c(1) sm(1)

Author

Patrick Joly, Industry Canada pat.joly@utoronto.ca

Also see

On-line: help for vecar (if installed), vececm (if installed), johans (if installed), reg3, wntstmvq, omninorm