### Structural Shock Identification in VARs

Posted:

**Tue Jul 09, 2019 9:37 am**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}))

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}))