258 1

# [DSGE讨论专题] 关于dynare求助，万分感谢！ [推广有奖]

• 0关注
• 0粉丝

90%

-

0

805 个

0

0 点

0 点

0 点

66 点

13

0

27 小时

2019-1-3

2019-6-23

50论坛币
 自己有点糊里糊涂的，不太懂loss function。写的code总是出现DYNARE: preprocessing failed。求大神赐教，非常感谢！ var x pi R r u; varexo e_r e_u; parameters sigma beta kappa omega rho_r rho_u mu1 mu2 gamma theta; sigma = 1.5;beta = 0.995;kappa = 0.02;omega = 0.5;rho_r = 0.5;rho_u = 0.5;mu1 = 1.5;mu2 = 0.13;gamma = 0.5;theta = {0, 0.5, 1}; model(linear); x = x(+1)-(1/sigma)*(R-pi(+1)-r); pi = beta*(1-theta)*pi(+1)+theta*pi(-1)+kappa*x+u; R = mu1*pi+mu2*x; r = rho_r*r(-1)+e_r; u = rho_u*u(-1)+e_u; end; shocks; var e_r; stderr 1; var e_u; stderr 1; end; stoch_simul(oder=1); Loss = (1/2)*(oo_.var(pi, pi)+omega*oo_.var(x,x)+gamma*oo_.var(R,R));

 求大神帮忙不知道theta是不是不能同时写三个数，我将theta改为0之后显示： Index in position 1 is invalid. Array indices must be positive integers or logical values. Error in work (line 163) Loss = (1/2)*(oo_.var(pi, pi)+omega*oo_.var(x,x)+gamma*oo_.var(R,R)); Error in dynare (line 235) evalin('base',fname) ;

 您需要登录后才可以回帖 登录 | 我要注册 回帖后跳转到最后一页