Structural VAR (EV 6)
Posted: Wed Apr 28, 2010 2:57 pm
Hi there,
I'm getting an error message when running the code. Checking out help, I probably misunderstand the SVAR estimation command... The code builds up on VAR model estimated and saved in this workfile in a previous session. Could that be a problem, that one needs to estimate the VAR model and continue with the structural factorization immediately in one and the same session?
Many thanks for helping!!!
I'm getting an error message when running the code. Checking out help, I probably misunderstand the SVAR estimation command... The code builds up on VAR model estimated and saved in this workfile in a previous session. Could that be a problem, that one needs to estimate the VAR model and continue with the structural factorization immediately in one and the same session?
Many thanks for helping!!!
Code: Select all
var02.makeresids rev_var02res xpe_var02res gdp_var02res
':: compute cyclically adjusted fiscal policy
series ca_rev
ca_rev = rev_var02res - a1(2) * gdp_var02res
series ca_xpe
ca_xpe = xpe_var02res - a1(2) * gdp_var02res
':: declare coefficient vectors
coef(2) c1
coef(2) c2
coef(2) b2
':: estimate set of least squares equations
equation eq_c1_rev.ls gdp_var02res = c1(1) + c1( 2) * ca_rev
equation eq_c2_xpe.ls gdp_var02res = c2(1) + c2( 2) * ca_xpe
equation eq_b2_xpe.ls ca_xpe = b2(1) + b2(2) * ca_rev
':: put together the left and right hand side matrix as in B&P (2002)
matrix(3,3) left
left.fill(b=r) 1, 0, -a1(2), 0, 1, -b1(2), -c1(2), -c2(2), 1
matrix(3,3) right
right.fill(b=r) 1, 0, 0, b2(2), 1, 0, 0, 0, 1
':: estimate structural factorization using the short run matrices left, right
var02.svar(rtype=patsr,namea=left,nameb=right)