Full covariance matrix for orthogonalized impulse responses

Questions and discussions on Vector Autoregressions
johannes
Posts: 2
Joined: Fri Sep 14, 2007 6:31 pm

Full covariance matrix for orthogonalized impulse responses

Unread post by johannes »

Is there a routine out there that computes the full covariance matrix for a set of (orthogonalized) impulse response functions?

This could be either based on asymptotics (as in Mittnik and Zadrozny, Econometrica 1993) or based on bootstrapping.

The routines I found only do confidence intervals for the impulse responses but don't report the full covariance matrix which I need.

Links to a routine or other suggestions would be greatly appreciated, thanks in advance!
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Unread post by TomDoan »

This just requires changing the "bookkeeping" part of something like MONTEVAR.

Before loop:

Code: Select all

dec vect[vect] first(nstep)
dec vect[rect] second(nstep)
ewise first(k)=%zeros(nvar**2,1)
ewise second(k)=%zeros(nvar**2,nvar**2)
Inside loop:

Code: Select all

do k=1,nstep
   ewise first(k)(i)=first(k)(i)+impulses((i-1)/nvar+1,%clock(i,nvar))
   ewise second(k)(i,j)=second(k)(i,j)+impulses((i-1)/nvar+1,%clock(i,nvar))*$
impulses((j-1)/nvar+1,%clock(j,nvar))
end do k
After loop:

Code: Select all

ewise first(k)=first(k)/ndraws
ewise second(k)=second(k)/ndraws-%outerxx(first(k))
second(k) will now have the full covariance matrix of the step k responses, packed into an nvar**2 x nvar**2 matrix.
johannes
Posts: 2
Joined: Fri Sep 14, 2007 6:31 pm

Unread post by johannes »

This sounds like it's straightforward to do--I will try to implement it today.

Thank you very much for the response!
Post Reply