Following up on Sven at
http://lists.wfu.edu/pipermail/gretl-devel/2017-March/007508.html
Thanks for another nice hansl prototype! I've now implemented this in
C and you can access it after estimating a VAR, with
modtest [horizon] --arch --multivariate
(--multivariate is currently a "secret" option).
Lutkepohl provides some example results (2005, p. 578) but
unfortunately in this case they're based on a dataset that has
apparently not been made public (Volkswagen daily stock returns).
However I've done some basic testing:
* The test seems to be sized about right, based on Monte Carlo
using varsimul() -- thanks, Jack! -- with plain mnormal() errors.
* I've verified that the new test collapses to equivalence with our
existing univariate ARCH test for a "VAR" with a single variable.
Well, almost: there's a small difference in that our univariate test
skips missing lagged residuals at the start of the sample range while
the new one substitutes zeros.
For anyone wanting to mess with this, here's my Monte Carlo script:
<hansl>
set verbose off
scalar T = 200
# coeffs from Lutkepohl's VW example
matrix A = {0, 0.02, -0.18, 0.16, -0.08, 0.11 ;\
0.12, -0.13, -0.08, 0.03, -0.01, 0.01 }
matrix y0 = zeros(3, 2)
n = T + 3
nulldata n --preserve
setobs 12 2000:01
K = 5000
matrix rej05 = zeros(K, 3)
matrix rej01 = zeros(K, 3)
matrix pv
loop i=1..K -q
matrix U = mnormal(T, 2)
matrix Y = varsimul(A, U, y0)
series y1 = Y[,1]
series y2 = Y[,2]
smpl 4 ;
var 3 y1 y2 --silent
modtest 6 --arch --multivariate --quiet
pv = $pvalue
rej05[i, 1] = pv[1] < 0.05
rej05[i, 2] = pv[3] < 0.05
rej05[i, 3] = pv[6] < 0.05
rej01[i, 1] = pv[1] < 0.01
rej01[i, 2] = pv[3] < 0.01
rej01[i, 3] = pv[6] < 0.01
smpl full
endloop
sz05 = sumc(rej05) / K
sz01 = sumc(rej01) / K
print sz05
print sz01
</hansl>
Allin