Help: DSGE model of solving

Dear all professor,
I am a Chinese student at school. I encountered difficult technical problems in the process of solving the DSGE model. The specific issues are as follows:

Incorrect use of print_info (line 90)
The steady state contains NaN or Inf
Error check (line 76)
print_info (info, 0, options);
Error shocks (line 455)
oo_.dr.eigval = check (M_, options_, oo_);
Error dynare (line 235)
evalin (‘base’, fname);

I attached my mod file below, thank you very much for taking the time to help me. Thank you very much!
My_Model.mod (7.2 KB)

In your initval computations, you are using omega, but it has not been defined.

Thanks a lot, professor jpfeifer. Next I try to declare omega in the initial value.Could you please help me to see if there is any problem with the closure of my model?I always have a hard time figuring it out.

Please always provide the newest version where you fixed the previous issue(s).

Thank you for your reply all the time, professor jpfeifer. Now I submit my latest version and you can help me check it. Now there are still the following problems:
Oo_. Steady_state (1) =
Oo_. Steady_state (16) - oo_. Steady_state (11) - oo_. Steady_state (16) * oo_ exo_steady_state (7);ceyan1.mod (7.4 KB)

  1. You must not have a clear all in your file.
  2. Your initval block is not correct. You are using Y_F to set C, although you did not set it yet.

Thank you for your reply all the time, professor jpfeifer. Now I submit my latest version and you can help me check it. Now there are still the following problems:
Equation number 1 : NaN : 方程1:对家庭实际消费的一阶导数
Equation number 2 : NaN : 方程2:对家庭工作时间禀赋的一阶导数
Equation number 3 : NaN : 方程3:对家庭持有实际现金余额的一阶导数
Equation number 4 : NaN : 方程4:关于家庭存款的一阶导数
Equation number 5 : NaN : 方程5:关于家庭拥有政府债券的一阶导数
Equation number 6 : NaN : 方程6:关于家庭房产实际价值的一阶导数
Equation number 7 : NaN : 方程7:家庭消费的欧拉方程
Equation number 8 : NaN : 方程8:资本演化方程
Equation number 9 : NaN : 方程10:中间产品厂商生产函数
Equation number 10 : NaN : 方程11:关于中间产品厂商劳动需求的一阶导数
Equation number 11 : NaN : 方程14:中间产品厂商的边际成本
Equation number 12 : NaN : 方程16:中间产品厂商的二次价格调整成本
Equation number 13 : NaN : 方程17:x1
Equation number 14 : NaN : 方程18:x2
Equation number 15 : NaN : 方程19:中间产品厂商的最优定价方程
Equation number 16 : NaN : 方程19:CPI通货膨胀递归方程
Equation number 17 : NaN : 方程20:银行持有准备金的凸成本
Equation number 18 : NaN : 方程21:关于TRR的一阶导数
Equation number 19 : NaN : 方程22:RRR的表示
Equation number 20 : NaN : 方程23:家庭部门存款利息
Equation number 21 : NaN : 方程24:总资源约束
Equation number 22 : NaN : 方程25:混合货币政策规则
Equation number 23 : 0 : 方程26:政府消费支出冲击
Equation number 24 : 0 : 方程27:混合货币政策冲击
Equation number 25 : 0 : 方程23:流动性冲击冲击
Equation number 26 : 0 : 方程23:生产率(连续不相关技术)冲击
Equation number 27 : 0 : 方程24:投资边际效率冲击
Equation number 28 : 0 : 方程25:房产偏好冲击

错误使用 print_info (line 90)
The steady state contains NaN or Inf

出错 check (line 76)
print_info(info, 0, options);

出错 ceyan1 (line 494)
oo_.dr.eigval = check(M_,options_,oo_);

出错 dynare (line 235)
evalin(‘base’,fname) ;ceyan1.mod (7.4 KB)

Now I am getting

Error: Y_F not used in the model block

Thank you for your reply all the time, professor jpfeifer. I submit the latest version now, and there is still such a problem.
Equation number 1 : NaN : 方程1:对家庭实际消费的一阶导数
Equation number 2 : NaN : 方程2:对家庭工作时间禀赋的一阶导数
Equation number 3 : NaN : 方程3:对家庭持有实际现金余额的一阶导数
Equation number 4 : NaN : 方程4:关于家庭存款的一阶导数
Equation number 5 : NaN : 方程5:关于家庭拥有政府债券的一阶导数
Equation number 6 : NaN : 方程6:关于家庭房产实际价值的一阶导数
Equation number 7 : NaN : 方程7:家庭消费的欧拉方程
Equation number 8 : NaN : 方程8:资本演化方程
Equation number 9 : NaN : 方程10:中间产品厂商生产函数
Equation number 10 : NaN : 方程11:关于中间产品厂商劳动需求的一阶导数
Equation number 11 : NaN : 方程14:中间产品厂商的边际成本
Equation number 12 : NaN : 方程16:中间产品厂商的二次价格调整成本
Equation number 13 : NaN : 方程17:x1
Equation number 14 : NaN : 方程18:x2
Equation number 15 : NaN : 方程19:中间产品厂商的最优定价方程
Equation number 16 : NaN : 方程20:银行持有准备金的凸成本
Equation number 17 : NaN : 方程21:关于TRR的一阶导数
Equation number 18 : NaN : 方程22:RRR的表示
Equation number 19 : NaN : 方程23:家庭部门存款利息
Equation number 20 : NaN : 方程24:总资源约束
Equation number 21 : NaN : 方程25:混合货币政策规则
Equation number 22 : 0 : 方程26:政府消费支出冲击
Equation number 23 : 0 : 方程27:混合货币政策冲击
Equation number 24 : 0 : 方程23:流动性冲击冲击
Equation number 25 : 0 : 方程23:生产率(连续不相关技术)冲击
Equation number 26 : 0 : 方程24:投资边际效率冲击
Equation number 27 : 0 : 方程25:房产偏好冲击

错误使用 print_info (line 90)
The steady state contains NaN or Inf

出错 check (line 76)
print_info(info, 0, options);

出错 ceyan1 (line 490)
oo_.dr.eigval = check(M_,options_,oo_);

出错 dynare (line 235)
evalin(‘base’,fname) ;ceyan1.mod (7.4 KB)

Again, your initval block is not correct. You are using Y to set C , although you did not set it yet.

Professor jpfeifer, I now set Y to cobb Douglas function form, and then use Y to set C, but now there is still the following problem, is there something wrong with my model establishment or the steady-state initial value module?
Now I am writing my graduation thesis. The solution of this problem is very important for my graduation. Thank you very much for helping me get through this difficult time.
Equation number 1 : NaN : 方程1:对家庭实际消费的一阶导数
Equation number 2 : NaN : 方程2:对家庭工作时间禀赋的一阶导数
Equation number 3 : NaN : 方程3:对家庭持有实际现金余额的一阶导数
Equation number 4 : NaN : 方程4:关于家庭存款的一阶导数
Equation number 5 : NaN : 方程5:关于家庭拥有政府债券的一阶导数
Equation number 6 : NaN : 方程6:关于家庭房产实际价值的一阶导数
Equation number 7 : NaN : 方程7:家庭消费的欧拉方程
Equation number 8 : NaN : 方程8:资本演化方程
Equation number 9 : NaN : 方程10:中间产品厂商生产函数
Equation number 10 : NaN : 方程11:关于中间产品厂商劳动需求的一阶导数
Equation number 11 : NaN : 方程14:中间产品厂商的边际成本
Equation number 12 : 0 : 方程16:中间产品厂商的二次价格调整成本
Equation number 13 : NaN : 方程17:x1
Equation number 14 : NaN : 方程18:x2
Equation number 15 : NaN : 方程19:中间产品厂商的最优定价方程
Equation number 16 : NaN : 方程20:银行持有准备金的凸成本
Equation number 17 : NaN : 方程21:关于TRR的一阶导数
Equation number 18 : NaN : 方程22:RRR的表示
Equation number 19 : NaN : 方程23:家庭部门存款利息
Equation number 20 : NaN : 方程24:总资源约束
Equation number 21 : NaN : 方程25:混合货币政策规则
Equation number 22 : 0 : 方程26:政府消费支出冲击
Equation number 23 : 0 : 方程27:混合货币政策冲击
Equation number 24 : 0 : 方程23:流动性冲击冲击
Equation number 25 : 0 : 方程23:生产率(连续不相关技术)冲击
Equation number 26 : 0 : 方程24:投资边际效率冲击
Equation number 27 : 0 : 方程25:房产偏好冲击

错误使用 print_info (line 90)
The steady state contains NaN or Inf

出错 check (line 76)
print_info(info, 0, options);

出错 ceyan1 (line 489)
oo_.dr.eigval = check(M_,options_,oo_);

出错 dynare (line 235)
evalin(‘base’,fname) ;ceyan1.mod (7.4 KB)

You are always doing the same mistake. Now you use K to compute Y before you computed it.

Thank you, Professor jpfeifer. Maybe I need to optimize the model again to avoid the above problems. I will calculate the steady state of the model well so that I can get the result I want.
I’ll sort it out and see if there are any more questions.

You don’t need to change the model, but you need to approach the steady state computation systematically, i.e. in a recursive way.

Thank you, Professor jpfeifer. I have calculated the steady state as much as possible, and expressed the endogenous variables as exogenous variables or related parameters, but whether there is a problem in my steady state calculation and I cannot get the simulation results I want.
At the same time, I’ve optimized the program code for monetary policy so you can take a look at it for me.
ceyan2.mod (8.6 KB)

Please use F9 in Matlab to execute the parameter definitions and the steady state computation in sequence. You will see that
r_K has not been set when you use it.