"The steady state contains NaN or Inf“的错误如何解决?-经管之家官网!

人大经济论坛-经管之家 收藏本站
您当前的位置> 考研考博>>

考研

>>

"The steady state contains NaN or Inf“的错误如何解决?

"The steady state contains NaN or Inf“的错误如何解决?

发布:swufe40716071 | 分类:考研

关于本站

人大经济论坛-经管之家:分享大学、考研、论文、会计、留学、数据、经济学、金融学、管理学、统计学、博弈论、统计年鉴、行业分析包括等相关资源。
经管之家是国内活跃的在线教育咨询平台!

经管之家新媒体交易平台

提供"微信号、微博、抖音、快手、头条、小红书、百家号、企鹅号、UC号、一点资讯"等虚拟账号交易,真正实现买卖双方的共赢。【请点击这里访问】

提供微信号、微博、抖音、快手、头条、小红书、百家号、企鹅号、UC号、一点资讯等虚拟账号交易,真正实现买卖双方的共赢。【请点击这里访问】

varWQRNIYCKBmMPGammaG_GammaG_Z//---13EndogenousstatevariablesPsiPhibbALamdaaLamdazZKsiTheta//---9variablesappearinginshockpricessesDLogGDPDLogCDLogIDLogPDLogM//---5Observeddata;varexoEps_psiEps_phiEps ...
坛友互助群


扫码加入各岗位、行业、专业交流群


var
W Q R N I Y C K B m M P Gamma G_Gamma G_Z//--- 13 Endogenous state variables
Psi Phi bb A Lamdaa Lamdaz Z Ksi Theta //--- 9 variables appearing in shock pricesses
DLogGDPDLogCDLogIDLogPDLogM //--- 5 Observed data
;
varexo Eps_psi Eps_phi Eps_b Eps_a Eps_lamdaa Eps_lamdaz Eps_z Eps_ksi Eps_theta;
parameters
h omega//---estimated parameters
alpha betag_gamma g_z deta r theta_bar iy//---calibrated parameters
rho_psi rho_phi rho_brho_a rho_lamdaa rho_lamdaz rho_z rho_ksi rho_theta;//---parameters related to shock processes
rho_psi = 0;
rho_phi = 0;
rho_b = 0;
rho_a = 0;
rho_lamdaa = 0;
rho_lamdaz = 0;
rho_z = 0;
rho_ksi = 0;
rho_theta = 0;
h = 0;
omega = 2;
alpha = 0.41;
beta = 0.9702;
deta = 0.025;
g_gamma = 1.02477375;
g_z = 1.73261;
theta_bar = 1;
r = 1.01626;
iy = 0.352347;
model(linear);
# phiMgamma = 1-beta/g_gamma;
# Q_bar = 1/beta;
# ksi_bar = ((g_gamma*g_z*Q_bar)/beta-r-(1-deta)*Q_bar-(Q_bar-1)*r)/Q_bar;
# yk = r/(alpha*g_gamma*g_z);
# ik = iy*yk;
# cy = 1- iy;
# bi = 1-r/ik-ksi_bar*Q_bar/ik;
Gamma =(g_gamma/(g_gamma-beta*h))*((h*(C(-1) - G_Gamma)/(g_gamma - h)) -
g_gamma*C/g_gamma - h) - beta*h/(g_gamma - beta*h)*(h*C/(g_gamma - h) - g_gamma*(C(+1) + G_Gamma(+1))/g_gamma - h);
Psi = Gamma + Y - N;
Gamma + G_Gamma(+1)/g_gamma = phiMgamma*(Phi - M) + beta*(Gamma(+1)) ;
Q_bar*g_gamma*g_z*(Q + Gamma + G_Gamma(+1) + G_Z(+1)) = beta*(r*R(+1) + (1 - deta)*Q_bar*Q(+1) +
(Q_bar - 1)*(r*R(+1) + ksi_bar*Q_bar*(Ksi(+1) + Q(+1))) + Gamma(+1)*(r + (1 - deta)*Q_bar + (Q_bar - 1)*(r + ksi_bar*Q_bar)));
B = beta*Q_bar*theta_bar*(Gamma(+1) + Q(+1) - Gamma - P(+1) + B(+1) + m - m(-1) + Theta);
P = (1 + beta)*omega*g_gamma^2*g_z^2*I + omega*g_gamma^2*g_z^2*(G_Gamma + G_Z) -
omega*g_gamma^2*g_z^2*I(-1) - beta*omega*g_gamma^2*g_z^2*(I(+1) + G_Gamma(+1) + G_Z(+1));
W = Y - N;
Y = alpha*K + (1 - alpha)*N;
K(+1) = (1 - deta)*(K - G_Gamma(+1) - G_Z(+1))/g_gamma*g_z + ik*(I - G_Gamma(+1) - G_Z(+1))/g_gamma*g_z;
Y = cy*C + iy*I;
P + I = r*(R + K)/yk + ksi_bar*Q_bar*(Ksi + Q + K)/yk + bi*B;
m = theta_bar*(Theta(-1) + m(-1));
bb = M - M(-1);
G_Gamma = (alpha/(1 - alpha))*(Lamdaz + Z - Z(-1))+(1/(1-alpha))*(A + Lamdaa - Lamdaa(-1));
G_Z = Lamdaz + Z - Z(-1);
Psi = rho_psi*Psi(-1) + Eps_psi;
Phi = rho_phi*Phi(-1) + Eps_phi;
bb = rho_b*bb(-1) + Eps_b;
A = rho_a*A(-1) + Eps_a;
Lamdaa = rho_lamdaa*Lamdaa(-1) + Eps_lamdaa;
Lamdaz = rho_lamdaz*Lamdaz(-1) + Eps_lamdaz;
Z = rho_z*Z(-1) + Eps_z;
Ksi = rho_ksi*Ksi(-1) + Eps_ksi;
Theta = rho_theta*Theta(-1) + Eps_theta;
DLogP =(P -P(-1)+ log(g_z)+G_Z);
DLogI = (I - I(-1) + log(g_gamma) + G_Gamma);
DLogC = (C-C(-1) + log(g_gamma) + G_Gamma);
DLogM = (M - M(-1) + log(g_gamma) + G_Gamma);
DLogGDP = iy*DLogI + (1-iy)*DLogC;
end;
shocks;
var Eps_psi; stderr 0;
var Eps_phi; stderr 0;
var Eps_b; stderr 0;
var Eps_a; stderr 0;
var Eps_lamdaa; stderr 0;
var Eps_lamdaz; stderr 0;
var Eps_z; stderr 0;
var Eps_ksi; stderr 0;
var Eps_theta; stderr 0;
end;
check;
estimated_params;
stderr Eps_psi,INV_GAMMA2_PDF,0.01,inf;
stderr Eps_phi,INV_GAMMA2_PDF,0.01,inf;
stderr Eps_b,INV_GAMMA2_PDF,0.01,inf;
stderr Eps_a,INV_GAMMA2_PDF,0.01,inf;
stderr Eps_lamdaa,INV_GAMMA2_PDF,0.01,inf;
stderr Eps_lamdaz,INV_GAMMA2_PDF,0.01,inf;
stderr Eps_z,INV_GAMMA2_PDF,0.01,inf;
stderr Eps_ksi,INV_GAMMA2_PDF,0.01,inf;
stderr Eps_theta,INV_GAMMA2_PDF,0.01,inf;
h,BETA_PDF,0.333333333333333,0.235702260395516;
omega,GAMMA_PDF,2,2;
rho_psi,BETA_PDF,0.85,0.1;
rho_phi,BETA_PDF,0.85,0.1;
rho_b,BETA_PDF,0.85,0.1;
rho_a,BETA_PDF,0.85,0.1;
rho_lamdaa,BETA_PDF,0.85,0.1;
rho_lamdaz,BETA_PDF,0.85,0.1;
rho_z,BETA_PDF,0.85,0.1;
rho_ksi,BETA_PDF,0.85,0.1;
rho_theta,BETA_PDF,0.85,0.1;
end;
varobs DLogP DLogI DLogC DLogM DLogGDP ;
estimation(bayesian_irf,irf=40,datafile=data_hyy,first_obs=1,nobs=83,mh_replic=2000,mh_nblocks=4,mh_jscale=1);
error('The steady state contains NaN or Inf')
扫码或添加微信号:坛友素质互助


「经管之家」APP:经管人学习、答疑、交友,就上经管之家!
免流量费下载资料----在经管之家app可以下载论坛上的所有资源,并且不额外收取下载高峰期的论坛币。
涵盖所有经管领域的优秀内容----覆盖经济、管理、金融投资、计量统计、数据分析、国贸、财会等专业的学习宝库,各类资料应有尽有。
来自五湖四海的经管达人----已经有上千万的经管人来到这里,你可以找到任何学科方向、有共同话题的朋友。
经管之家(原人大经济论坛),跨越高校的围墙,带你走进经管知识的新世界。
扫描下方二维码下载并注册APP
本文关键词:

本文论坛网址:https://bbs.pinggu.org/thread-2850236-1-1.html

人气文章

1.凡人大经济论坛-经管之家转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
数据分析师 人大经济论坛 大学 专业 手机版