'stoch_simul ' is good ,but 'bayes estimation' was wrong

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

'stoch_simul ' is good ,but 'bayes estimation' was wrong

Postby ekun1979 » Tue Sep 03, 2013 7:34 am

RRSIGE.mod
RRSIGE.mod
hi everyone
i run a code( Written by: Fabio Verona,paper name:#11: Fabio Verona and Maik H. Wolters (2012), “Sticky Information Models in Dynare” (source code)).you could download at "http://www.dynare.org/wp/contents".

this code run " stoch_simul "very well,
but if i want to add "varobs ....;estimated_params......;estimation(datafile=QQQ,....)" to do some bayes estimation,
MATLAB always say :


Error using print_info (line 40)
Blanchard Kahn conditions are not satisfied: no stable equilibrium

Error in initial_estimation_checks (line 69)
print_info(info, DynareOptions.noprint)

Error in dynare_estimation_1 (line 169)
oo_ =
initial_estimation_checks(objective_function,xparam1,dataset_,M_,estim_params_,options_,bayestopt_,oo_);

Error in dynare_estimation (line 70)
dynare_estimation_1(var_list,dname);

Error in RRSIGE (line 4269)
dynare_estimation(var_list_);

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


i am a new one in dynare .could anyone help me?
thank you. :lol:
RRSIGE.mod
ekun1979
 
Posts: 3
Joined: Thu Jul 25, 2013 8:58 am

Re: 'stoch_simul ' is good ,but 'bayes estimation' was wrong

Postby jpfeifer » Tue Sep 03, 2013 8:21 am

You should provide the calibration values of the parameters as initial values for estimation.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: 'stoch_simul ' is good ,but 'bayes estimation' was wrong

Postby ekun1979 » Wed Sep 04, 2013 2:53 pm

jpfeifer wrote:You should provide the calibration values of the parameters as initial values for estimation.

Thank you for your help.
But, I would still not completely clear how to do.i try several times ,but it still doesn't work.
here is the code,how can i do to Modify the program? Thank you very much,


@#define lags = [1:16]

var y a l p w yinfn i R pi outputgap yclas deltaa g nuu gam eps z zwage zoutput;

varexo e_deltaa e_g e_nuu e_gam e_eps;

parameters beta nu lambda theta delta omega gamma psi phi_pi phi_y rho_deltaa rho_eps rho_g rho_nuu rho_gam T;

// POSTERIOR MEAN, see Table 2 in paper
theta = 1.00000000000000;
psi = 5.15202697986071;
nu = 10.0866927574090;
gamma = 9.09210945073590;
beta = 0.666666666666667;
rho_deltaa = 0.0285825345078334;
rho_eps = 0.294610252638720;
rho_g = 0.996989047437769;
rho_nuu = 0.280541889680312;
rho_gam = 0.855785136269719;
phi_pi = 1.17350494813421;
phi_y = 0.0625290108287302;
delta = 0.0822178065824585;
omega = 0.744214139325477;
lambda = 0.516437987152365;
T=32;


model(linear);
//production function
y = a + beta*l;

// Phillips Curve
z = p + (beta*(w-p)+(1-beta)*y-a)/(beta+nu*(1-beta))-(beta*nuu)/((nu-1)*(beta+nu*(1-beta)));

p = lambda*( + z +
@#for lag in lags
+EXPECTATION(-@{lag})(z)*((1-lambda)^(@{lag}))
@#endfor
);

// Recursive long real interest rate
R = i - (p(+1)-p) + R(+1);

// IS Curve
yinfn = y(100);
zoutput = yinfn - theta*R;

y = g + delta*( + zoutput +
@#for lag in lags
+EXPECTATION(-@{lag})(zoutput)*((1-delta)^(@{lag}))
@#endfor
);

// Wage Curve
zwage = p + gamma*(w-p)/(gamma+psi) + l/(gamma+psi) + psi*(yinfn - theta*R)/(theta*(gamma+psi)) - psi*gam/((gamma+psi)*(gamma-1));

w = omega*( + zwage +
@#for lag in lags
+EXPECTATION(-@{lag})(zwage)*((1-omega)^(@{lag}))
@#endfor
);

// definition of inflation
pi = p - p(-1);

// Taylor rule
i = phi_y*(y-yclas) + phi_pi*pi - eps;

// Classical equilibrium
yclas = a + beta*psi/(1+psi)*(g+gam/(gamma-1)+nuu/(nu-1));

// other variables
deltaa = a-a(-1);
outputgap = y-yclas;

// shock processes
eps = rho_eps*eps(-1) + e_eps;
deltaa = rho_deltaa *deltaa(-1) + e_deltaa;
g = rho_g *g(-1) + e_g;
nuu = rho_nuu *nuu(-1) + e_nuu;
gam = rho_gam *gam(-1) + e_gam;

end;

//check;
//steady;

initval;
y=0;a=0;l=0; p=0; w=0; yinfn=0; i=0; R=0; pi=0; outputgap=0; yclas=0; deltaa=0; g=0; nuu=0; gam=0; eps=0; z=0; zwage=0; zoutput=0;
e_deltaa=0; e_g=0; e_nuu=0; e_gam=0; e_eps=0;
end;

shocks;
var e_deltaa; stderr 0.660134106707378;
var e_g; stderr 0.833976978078512;
var e_nuu; stderr 10.5679076888563;
var e_gam; stderr 12.3169555240614;
var e_eps; stderr 0.437308817102200;
end;

estimated_params;
theta , 1.000,1,1.5;
psi , 5.15202697986071,5,5.5;
nu , 10.0866927574090,10,10.1;
gamma , 9.09210945073590,9,9.5;
beta , 0.666666666666667,.6,.7;
rho_deltaa , 0.0285825345078334,.02,.03;
rho_eps , 0.294610252638720,.29,.3;
rho_g , 0.996989047437769,.9,1;
rho_nuu , 0.280541889680312,.28,.3;
rho_gam , 0.855785136269719,.8,.9;
phi_pi , 1.17350494813421,1,1.5;
phi_y , 0.0625290108287302,.06,.07;
delta , 0.0822178065824585,.08,.09;
omega , 0.744214139325477,.7,.8;
lambda , 0.516437987152365,.5,.6;

end;
varobs pi ;
estimation(datafile=Csige,mh_replic=32,mh_jscale=.5);
ekun1979
 
Posts: 3
Joined: Thu Jul 25, 2013 8:58 am

Re: 'stoch_simul ' is good ,but 'bayes estimation' was wrong

Postby jpfeifer » Thu Sep 05, 2013 5:00 am

Your model has a unit root. You need to use the diffuse_filter option of estimation.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: 'stoch_simul ' is good ,but 'bayes estimation' was wrong

Postby ekun1979 » Mon Sep 09, 2013 1:29 am

:lol:

yes ,you are right.it can run.

thank you。 :P
ekun1979
 
Posts: 3
Joined: Thu Jul 25, 2013 8:58 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 7 guests