楼主: ⊕o怀恋o
4611 6

[经济学模型] 做的DSGE模型老师报错,不知道为什么,请大神指教啊 [推广有奖]

  • 1关注
  • 2粉丝

本科生

65%

还不是VIP/贵宾

-

威望
0
论坛币
2152 个
通用积分
1.6300
学术水平
0 点
热心指数
0 点
信用等级
3 点
经验
1471 点
帖子
64
精华
0
在线时间
75 小时
注册时间
2012-1-26
最后登录
2024-1-19

相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.

Starting Dynare (version 4.4.3).
Starting preprocessing of the model file ...
Found 21 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.

Warning: Some of the parameters have no value (omiga_r, ep_o, ro_z, ro_v, sigma_v) when
using steady. If these parameters are not initialized in a steadystate file, Dynare may
not be able to solve the model...
> In test_for_deep_parameters_calibration at 46
  In steady at 33
  In miao2 at 373
  In dynare at 180
STEADY:  numerical initial values or parameters incompatible with the following equations
    13    14    17    21

Check whether your model in truly linear




Residuals of the static equations:

Equation number 1 : 0
Equation number 2 : 0
Equation number 3 : 0
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : NaN
Equation number 7 : NaN
Equation number 8 : NaN
Equation number 9 : 0
Equation number 10 : NaN
Equation number 11 : NaN
Equation number 12 : NaN
Equation number 13 : NaN
Equation number 14 : NaN
Equation number 15 : 0
Equation number 16 : 0
Equation number 17 : NaN
Equation number 18 : 0
Equation number 19 : 0
Equation number 20 : 0
Equation number 21 : NaN


Error using print_info (line 80)
The steady state contains NaN or Inf

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

Error in miao2 (line 373)
steady;

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

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:dsge模型 DSGE 不知道 Perturbation derivatives products equation sequence solution version

已有 1 人评分经验 论坛币 收起 理由
linmengmiki + 20 + 20 鼓励积极发帖讨论

总评分: 经验 + 20  论坛币 + 20   查看全部评分

沙发
⊕o怀恋o 发表于 2014-11-27 23:06:46 |只看作者 |坛友微信交流群
var y pi m r i oh c q of h w rk k u x a z p gama_w gama_p v;
varexo e_z e_x e_a e_p e_gama_w e_gama_p e_v;
parameters sigma_m sigma_c kesi beta sigma fy xi_w sigma_L alpha_1 alpha_2
alpha_3 delta xi_p omiga_r omiga_pi omiga_y omiga_u ep_c ep_i ep_o ro_a ro_x
ro_z ro_p ro_gama_p ro_gama_w ro_v sigma_a sigma_x sigma_gama_w sigma_p sigma_z
sigma_gama_p sigma_v ;

sigma_m=1.4;
sigma_c=2;
kesi=0.98;
beta=0.992;
sigma=0.03;
fy=4;
xi_w=0.5;
sigma_L=1;
alpha_1=0.6;
alpha_2=0.21;
alpha_3=0.19;
delta=0.5;
xi_p=0.5;
omiga_u=1;
omiga_pi=2;
omiga_y=2;
omiga_u=1;
ep_c=0.3649;
ep_i=0.4729;
ep_m=0.1622;
ro_a=0.5;
ro_x=0.5;
ro_p=0.5;
ro_gama_w=0.5;
ro_gama_p=0.5;
sigma_a=0.1;
sigma_x=0.1;
sigma_gama_w=0.1;
sigma_p=0.1;
sigma_z=0.1;
sigma_gama_p=0.1;
sigma_y=0.1;

model(linear);
sigma_m*m=(sigma_c-sigma_c*kesi)*oh+(sigma_c*kesi-kesi+1)*c-beta/(1-beta)*r+beta/(1-beta)*pi(+1);
p=(1-kesi)*c-kesi*oh(-1);
r=pi(+1)+a-a(+1)+(sigma_c*kesi-sigma_c)*(oh-oh(-1))+(kesi-sigma_c*kesi-1)*(c-c(-1));
q=beta*(1-sigma)*q(+1)-r+pi(+1)+(1-beta*(1-sigma))*rk(+1);
i=beta/(1+beta)*i(+1)+1/(1+beta)*i+fy/(1+beta)*q+1/(1+beta)*(beta*x(+1)-x);
k=(1-sigma)*k(-1)+sigma*i;
w=k(-1)+rk-h;
rk=of+p-k(-1);
w=1/(1+beta)*(pi(-1)+w(-1))-pi+beta/(1+beta)*(pi(+1)+w(+1))+(1-beta*xi_w)*(1-xi_w)*(-w+sigma_L*h+(sigma_c-sigma_c*kesi)*oh+(sigma_c*kesi-kesi+1)*c+gama_w);
y=z+alpha_1*h+alpha_2*k(-1)+alpha_3*of;
pi=(1-delta)*pi(-1)+beta*(pi(+1)-(1-delta)*pi)+(1-beta*xi_p)*(1-xi_p)/xi_p*(-z+alpha_1*w+alpha_2*rk+alpha_3*p+gama_p);
u=m-m(-1)+pi;
r=omiga_r*r(-1)+(1-omiga_r)*(omiga_pi*pi+omiga_y*y+omiga_u*u)+v;
y=ep_c*c+ep_i*i+ep_o*(oh+of+p);
a=sigma_a*e_a+ro_a*a(-1);
x=sigma_x*e_x+ro_x*x(-1);
z=sigma_z*e_z+ro_z*z(-1);
p=sigma_p*e_p+ro_p*p(-1);
gama_p=sigma_gama_p*e_gama_p+ro_gama_p*gama_p(-1);
gama_w=sigma_gama_w*e_gama_w+ro_gama_w*gama_w(-1);
v=sigma_v*e_v+ro_v*v(-1);
end;

initval;
y=0.0;
pi=0.0;
m=0.0;
r=0.0;
i=0.0;
oh=0.0;
c=0.0;
q=0.0;
of=0.0;
h=0.0;
w=0.0;
rk=0.0;
k=0.0;
u=0.0;
x=0.0;
a=0.0;
z=0.0;
p=0.0;
v=0.0;
gama_w=0.0;
gama_p=0.0;
end;

steady;
check;

shocks;
var e_p;
stderr 1;
var e_z;
stderr 1;
var e_a;
stderr 1;
var e_x;
stderr 1;
var e_gama_p;
stderr 1;
Var e_gama_w;
stderr 1;
var e_v;
stderr 1;
end;

estimated_params;
sigma_c,normal_pdf,2,0.25;
kesi,normal_pdf,0.98,0.01;
fy,normal_pdf,4,1.5;
xi_p,beta_pdf,0.5,0.1;
xi_w,beta_pdf,0.5,0.1;
delta,beta_pdf,0.5,0.015;
omiga_pi,normal_pdf,-0.5,0.1;
omiga_y,normal_pdf,-0.5,0.1;
omiga_u,normal_pdf,-0.5,0.1;
ro_a,beta_pdf,0.5,0.2;
ro_x,beta_pdf,0.5,0.2;
ro_z,beta_pdf,0.5,0.2;
ro_p,beta_pdf,0.5,0.2;
ro_gama_p,beta_pdf,0.5,0.2;
ro_gama_w,beta_pdf,0.5,0.2;
ro_v,beta_pdf,0.5,0.2;
sigma_a,inv_gamma_pdf,0.1,2;
sigma_x,inv_gamma_pdf,0.1,2;
sigma_z,inv_gamma_pdf,0.1,2;
sigma_p,inv_gamma_pdf,0.1,2;
sigma_v,inv_gamma_pdf,0.1,2;
sigma_gama_p,inv_gamma_pdf,0.1,2;
sigma_gama_w,inv_gamma_pdf,0.1,2;
end;
varobs y pi m r i oh c q of h w ;
estimation(datafile=datass,mh_replic=10000);
stoch_simul(periods=2100);

miao2.zip

1.15 KB

本附件包括:

  • miao2.mod

使用道具

藤椅
⊕o怀恋o 发表于 2014-11-27 23:07:24 |只看作者 |坛友微信交流群
2楼附有代码还有mod文件,跪求各位大神指教啊

使用道具

板凳
zcs376569 学生认证  发表于 2017-10-5 00:16:23 |只看作者 |坛友微信交流群
找到高人了么,我的mod也跑不出来

使用道具

报纸
人生若只如初见~ 发表于 2017-10-6 19:35:58 来自手机 |只看作者 |坛友微信交流群
zcs376569 发表于 2017-10-5 00:16
找到高人了么,我的mod也跑不出来
你们dsge都用什么软件跑的啊

使用道具

地板
Clandy17 发表于 2017-10-8 19:46:16 来自手机 |只看作者 |坛友微信交流群
啊坟贴勿回

使用道具

7
Clandy17 发表于 2017-10-8 19:49:44 来自手机 |只看作者 |坛友微信交流群
啊抱歉没看清是坟贴

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加JingGuanBbs
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-11-6 05:07