This is Chapter 2 ("Vector Autoregressive Models"). These all work with a single three variable system (US GNP growth, Federal Funds rate and inflation).
- klchap2.zip
- Chapter 2 examples, data
- (9.18 KiB) Downloaded 1777 times
chap2_laglength.rpf shows several methods of choosing the lag length
chap2_ls.rpf does estimation by LS and restricted LS (the latter being a "near-VAR" estimated by iterated SUR).
chap2_biascorrect.rpf does a small-sample bias correction using closed form formulas
chap2_diagnostics.rpf does several diagnostics on the residuals from the least squares estimates. The text describes these (and other) tests but actually doesn't include any of the results of those.
Note on the diagnostics---we have a rather different attitude towards diagnostics than certain other software packages (which can routinely spit out large numbers of them). This is a good example for taking things more carefully. The diagnostics often have interactions in their assumptions. In particular, the
@MVJB (multivariate Jarque-Bera test for normality) assumes the residuals are i.i.d. both under the null and the alternative. If they aren't, the whole test is invalid. In this case, the
@MVQSTAT (serial correlation test) comes back OK, which is really, really important in a VAR. However, the
@CVSTABTEST(stability test on the covariance matrix) and the
@MVARCHTEST (heteroscedasticity test with an alternative of "ARCH"-like behavior) both strongly reject their nulls. If you look at the residuals from the GNP equation,

- klresids.png (30.68 KiB) Viewed 159212 times
it's rather obvious that the residuals pre-1980 have a variance quite different from those post-1982, hence the rejection of the stability test and also the rejection of homoscedasticity on the "ARCH" test, which will also reject if large residuals "cluster". Note, however, that the VAR estimates are consistent even if the residuals are heteroscedastic, and they are consistent
and have same asymptotic distribution if the residuals are homoscedastic but not Normal, so even if the two tests on the variance were OK (they aren't), the rejection of Normality really would create no serious issue in this case.