Full covariance matrix for orthogonalized impulse responses

Questions and discussions on Vector Autoregressions

Full covariance matrix for orthogonalized impulse responses

Postby johannes » Mon Sep 17, 2007 11:06 am

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!
johannes
 
Posts: 2
Joined: Fri Sep 14, 2007 6:31 pm

Postby TomDoan » Thu Sep 20, 2007 11:44 am

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.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Postby johannes » Thu Sep 20, 2007 1:31 pm

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

Thank you very much for the response!
johannes
 
Posts: 2
Joined: Fri Sep 14, 2007 6:31 pm


Return to VARs (Vector Autoregression Models)

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron