Please help me fix my problems

Dear Prof.Johannes Pfeifer
Please help me fix my problems with dynare code.
Firstly, I constructed my model and It works.
In order to make it better, I continue to consider another member society (banking sector) and introduce the money growth rule in my model. And then the error appears like
Warning: Matrix is singular to working precision.

In evaluate_steady_state at 85
In resol at 104
In check at 73
In ha_r4 at 655
In dynare at 180
Error using print_info (line 80)
The steady state contains NaN or Inf

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

Error in ha_r4 (line 655)
oo_.dr.eigval = check(M_,options_,oo_);

Error in dynare (line 180)
evalin(‘base’,fname) ;

Please tell me how to fix this problem.
Thank Professor so much
Best Regard
newdata_taylor.m (8.45 KB)




check; model_diagnostics;
to see that

[quote]Residuals of the static equations:

Equation number 48 : 0.005[/quote]

This means your model is not correctly linearized. In particular, equation 48 is

mcspread=r_b - R_b;
with mcspread being a parameter equal to 0.005. This equation cannot be correct.

A few other things:

  1. If you want to estimate your model, you need to fix the parameter dependence. You are not taking parameter dependence into account. That’s why you should use model-local variables (the ones with the pound operator) or a steady state file. See Remark 4 (Parameter dependence and the use of model-local variables) in Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models”

  2. Your observation equation is wrong. You are trying to match trending data to stationary model variables. See again the referenced guide on how to correct this.

  3. sigma_r is not set in your file, but used later.