Galí 2015 chap 8

Hello.
I have been using the code in:

to simulate the SOE in Galí (2015) chapter 8.

Now I am trying to simulate the model with the versions of the IS curve and NKPC which are dependent on the output level instead of the outputgap. See my mod file.

chap8.mod (3.3 KB) .

However this gives me the errorcode:

Warning: Matrix is singular to working precision.

In evaluate_steady_state (line 261)
In steady_ (line 55)
In steady (line 80)
In sim.driver (line 299)
In dynare (line 293)

Residuals of the static equations:

Equation number 1 : NaN : y
Equation number 2 : NaN : pi_h
Equation number 3 : NaN : 3
Equation number 4 : NaN : pi
Equation number 5 : NaN : r_real
Equation number 6 : NaN : s
Equation number 7 : NaN : a
Equation number 8 : NaN : z
Equation number 9 : NaN : 9
Equation number 10 : NaN : nx
Equation number 11 : NaN : 11
Equation number 12 : NaN : y_star
Equation number 13 : NaN : yhat
Equation number 14 : NaN : p_h
Equation number 15 : NaN : p
Equation number 16 : NaN : p_f
Equation number 17 : NaN : q
Equation number 18 : NaN : er
Equation number 19 : NaN : i

Error using print_info (line 32)
The steady state has NaNs or Inf.

Error in steady (line 102)
print_info(info,options_.noprint, options_);

Error in sim.driver (line 299)
steady;

Error in dynare (line 293)
evalin(‘base’,[fname ‘.driver’]) ;

What am I doing wrong?
Kind regards

Your first equation has a constant term rho that should not be there. All variables are mean 0.

Thank you for your answer! I have removed rho but a new problem arises.
Now i get the error:

Error using print_info (line 32)
One of the eigenvalues is close to 0/0 (the absolute value of numerator and denominator is smaller than 0.0000!
If you believe that the model has a unique solution you can try to reduce the value of qz_zero_threshold.

Error in check (line 48)
print_info(info, 0, options);

Error in chap8.driver (line 300)
oo_.dr.eigval = check(M_,options_,oo_);

Error in dynare (line 293)
evalin(‘base’,[fname ‘.driver’]) ;

Do you have a suggestion on how to fix this?
I have a program which solves the original chapter 8 and makes nice irfs so i don’t understand why this wouldn’t work.

Kind regards.

Then you need to check your modifications for the source of the troubles.