Full covariance matrix for orthogonalized impulse responses
Full covariance matrix for orthogonalized impulse responses
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!
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!
This just requires changing the "bookkeeping" part of something like MONTEVAR.
Before loop:
Inside loop:
After loop:
second(k) will now have the full covariance matrix of the step k responses, packed into an nvar**2 x nvar**2 matrix.
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)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 kCode: Select all
ewise first(k)=first(k)/ndraws
ewise second(k)=second(k)/ndraws-%outerxx(first(k))