Structural Shock Identification in VARs

For technical questions regarding estimation of single equations, systems, VARs, Factor analysis and State Space Models in EViews. General econometric questions and advice should go in the Econometric Discussions forum.

Moderators: EViews Gareth, EViews Moderator

Jason2011
Posts: 2
Joined: Tue May 28, 2019 4:42 pm

Structural Shock Identification in VARs

Postby Jason2011 » 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}))

EViews Matt
EViews Developer
Posts: 400
Joined: Thu Apr 25, 2013 7:48 pm

Re: Structural Shock Identification in VARs

Postby EViews Matt » Tue Jul 09, 2019 11:00 am

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.

Jason2011
Posts: 2
Joined: Tue May 28, 2019 4:42 pm

Re: Structural Shock Identification in VARs

Postby Jason2011 » Tue Jul 09, 2019 12:20 pm

Thanks Matt. Should the lines below remain unchanged?

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

EViews Matt
EViews Developer
Posts: 400
Joined: Thu Apr 25, 2013 7:48 pm

Re: Structural Shock Identification in VARs

Postby EViews Matt » Tue Jul 09, 2019 12:34 pm

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


Return to “Estimation”

Who is online

Users browsing this forum: No registered users and 4 guests