Page 1 of 1

Structural Shock Identification in VARs

Posted: Tue Jul 09, 2019 9:37 am
by Jason2011
Dear all,

I have successfully run a Panel SVAR code in EViews, but have been unable to interpret the portion of the code relating to the identification of the structural shock. I initially thought it was Short-run recursive (Cholesky), but this is not supported by the impulse response functions (i.e. there is contemporaneous impact on the variables ordered before the shock variable (policy variable). Would be grateful if you could assist me interpret the codes below. Also, how should the codes be rewritten to achieve a short-run recursive (cholesky) identification?

Thanks very much.


' The structural shocks are recovered and saved in a matrix called srmat
matrix coefmat = varest{!R}.@coefmat
matrix(!m,!m) varlagsums = @identity(!m)
for !row=1 to !m
for !col=1 to !m
for !lag=1 to !lagopt
varlagsums(!row,!col) = varlagsums(!row,!col) - coefmat(!lag + (!row-1)*!lagopt, !col)
next
next
next
varlagsums = @transpose(varlagsums)
matrix varlagsums_inv = @inverse(varlagsums)

' non-dof adjusted residual covariance matrix
sym residcov = (varestbar.@regobs - varestbar.@ncoefs/!m)/(varestbar.@regobs) * varest{!R}.@residcov
sym qresidcov = varlagsums_inv * residcov * @transpose(varlagsums_inv)
matrix A1 = @cholesky(qresidcov)
matrix A0 = varlagsums*A1
matrix srmat{!R} = @transpose(@inverse(A0) * @transpose(resmat{!R}))

Re: Structural Shock Identification in VARs

Posted: Tue Jul 09, 2019 11:00 am
by EViews Matt
Hello,

I believe that code is calculating the long-run shocks. To generate short-run shocks, in the last line replace "A0" with "A1", effectively ignoring the A0 calculation.

Re: Structural Shock Identification in VARs

Posted: Tue Jul 09, 2019 12:20 pm
by Jason2011
Thanks Matt. Should the lines below remain unchanged?

matrix A1 = @cholesky(qresidcov)
matrix A0 = varlagsums*A1

Re: Structural Shock Identification in VARs

Posted: Tue Jul 09, 2019 12:34 pm
by EViews Matt
Correct. Although, you could remove the A0 line since it is not used in calculating the short-run shocks.

Edit: Actually, now that I look at it again, there are calculations that cancel out. Discarding the unnecessary pieces, the short-run equivalent for that entire block of code might be just:

Code: Select all

sym residcov = (varestbar.@regobs - varestbar.@ncoefs/!m)/(varestbar.@regobs) * varest{!R}.@residcov
matrix srmat{!R} = resmat{!R} * @transpose(@inverse(@cholesky(residcov)))