Hi,
I've just revisited the available tools for diagnostic checking of VARs
(as you may have guessed from my earlier email this morning). To be
honest, I've found them a little lacking.
Attached is an implementation of the Rao-style F-statistic for VAR
residual autocorrelation that is described in Helmut Luetkepohl's "New"
book (also more than 10 years old already), section 4.4.4 (Lagrange
Multiplier Tests for Checking the Whiteness of the Residuals).
A simple test case is also included (at the bottom of the script). Note
the different p-values for order 4 compared to the built-in tests.
Comments and corrections welcome. Eventually I would propose to adapt
this as a built-in "modtest" variant (if no problems arise with this).
thanks,
sven