Error Message after adding OSR in EHL 2000

I am trying to replicate the dynare code for the model of Erceg, Henderson and Levin (2000) with the calibration from the textbook of Gali “Monetary Policy, Inflation and the Business Cycle” 2008

If i try to compute the parameter for an optimal monetary policy by inserting this passage

pip ep/lambdap;
piw ew
x sigma+(phi+alpha)/(1-alpha);

osr_params phip;
phip = 1.5;

osr(irf=20) pip pip x;**

I always get the error message:


??? Reference to non-existent field ‘ys’.

Error in ==> osr1 at 67
[dr.ys,check1] = dynare_solve(fh,dr.ys,options_.jacobian_flag,…

Error in ==> osr at 47

Error in ==> stickywages3osr at 199

Error in ==> dynare at 132
evalin(‘base’,fname) ;**

I think, there is something wrong with my original model (not the osr-part i added). I attached the original model file too. This mod.file can be calculated with dynare without problems, but i still think there is something wrong with it, because it depicts a negative output gap and in Gali (2008) the output gap is positive.

I hope someone can help me.
Best regard
stickywages3.mod (1.26 KB)
stickywages3osr.mod (1.42 KB)


in both mod-files you forgot to associate in the simple rule the inertial degree “rho” with the interest rate at time t-1 “i(-1)”.
To see this, you need to check the residuals. Even though Dynare is able to compute the steady steate, the command “resid(1)” show
you that equation 10 doesnt hold (the residual is =100).

Im attaching the corrected file, and now dynare can compute the optimal simple rule

Also, note that since your model is linear, it is more convenient to specify this in the block model as follows “model(linear)”

stickywages3.mod (1.29 KB)
stickywages3osr.mod (1.47 KB)