On Mon, 27 Mar 2017, Sven Schreiber wrote:
Am 26.03.2017 um 22:57 schrieb Sven Schreiber:
> Am 26.03.2017 um 22:45 schrieb Allin Cottrell:
>> No, I don't have anything specific in mind. Does Lutkepohl discuss a
>> multivariate ARCH test? (Sorry, I don't have his book.)
>
> Yeah, he is basically saying he copied that from the PcFiml/PcGive
> manual by Doornik&Hendry. (multivariate ARCH-LM type test, I mean)
>
> Should also be fairly straightforward, but not right now...
Attached is a prototype. Now this produces some results in the test case, but
it is really untested, please don't make this the standard VAR-ARCH test
output just yet.
Based on section 16.5.1 (essentially equation 16.5.1) from Helmut Lütkepohl.
Very nice script, thanks.
Now, this is slightly OT, because I realise Sven's script is just meant as
a prototype and clarity is more important than efficiency, but just for
future reference to script writers who may be reading this thread: we have
a very nice (and little known) function called "hdprod" that, in cases
like this, makes the loop contruct unnecessary. The lines
<hansl>
matrix vechU = zeros(0, K * (K+1) / 2)
loop tau = 1..T -q
vechU |= transp( vech(mU[tau, ]'mU[tau, ]) )
endloop
</hansl>
could be replaced by
<hansl>
idx = vec(lower(ones(K,K)))
vU = selifc(hdprod(mU, mU), idx')
</hansl>
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------