I am trying to write a DSGE model to run on my data. 
in the following code: p = pi_t, y = y and r = i_t
(For example, I am using usmacro2 data . The issue that I am facing is that the model is not running even though I have clearly defined that 'a' is an unobserved variable like 'v' . but I keep getting invalid 'a' as the result of running it from my do-file editor. (To be clear a is supposed to be the tech. Shock and v is supposed to be the monetary shock))
(Block of code I am working with)
(Where I am facing this issue ^)
Example of a code that does work:
in the following code: p = pi_t, y = y and r = i_t
(For example, I am using usmacro2 data . The issue that I am facing is that the model is not running even though I have clearly defined that 'a' is an unobserved variable like 'v' . but I keep getting invalid 'a' as the result of running it from my do-file editor. (To be clear a is supposed to be the tech. Shock and v is supposed to be the monetary shock))
(Block of code I am working with)
Code:
clear webuse usmacro2 constraint 1 _b[beta]=0.96 dsge (p = {beta}*E(F.p) + {kappa}*y) /// 1. Phillips curve (y = F.y - (1/{sigma})*(r - E(F.p) - ((1/{beta} - 1) + {psi}*{phi_y}*(E(f.a) - a))), unobserved) /// 2. DIS (r = {rho} + {phi_pi}*p + {phi_y}*y + v) /// 3. Interest Rate Rule (F.v = {rho_v}*v, state) /// 4. Monetary Shock (F.a = {rho_a}*a, state), from(y=0, p=0, a=0, v=0, r={rho}, psi = 1.5) constraint(1) /// 5. Tech shock
Example of a code that does work:
Code:
clear webuse usmacro2 constraint 1 _b[beta]=0.96 dsge (p = {beta}*E(F.p) + {kappa}*y) /// 1. Phillips curve (y = F.y - (1/{sigma})*(r - E(F.p) - ((1/{beta} - 1) + {psi}*{phi_y}*(E(f.a) - a))), unobserved) /// 2. DIS (r = {rho} + {phi_pi}*p + {phi_y}*y + v) /// 3. Interest Rate Rule (F.v = {rho_v}*v, state) /// 4. Monetary Shock (F.a = {rho_a}*a, state), from(y=0, p=0, a=0, v=0, r={rho}, psi = 1.5) constraint(1) /// 5. Tech shock