Hi, I am currently trying to implement the natural rate estimation of Holston, Laubach and Williams (2003) in Dynare to get Bayesian Parameter estimates. My parametrization is pretty much according to my own ML estimates of the System.

I am not very experienced with Dynare, so I do not fully understand why the program gives me NaNs for my first two equations, so if someone could give me a hint what I should be looking for, that would be great. Thank you! My code is below. I could also provide the data if needed.

var y pi ypot g z str;

varexo e1 e2 e3 e4 e5 e6;

parameters root1 root2 a_r bpi by;

model (linear);

#ay1 = (root1+root2);

#ay2 = -root1*root2;
y = ypot+ay1*(y(-1)-ypot(-1))+ay2*(y(-2)-ypot(-2))+a_r/2*((-str(-1)-str(-2))+4

*g(-1)+4*g(-2)+z(-1)+z(-2))+e1;

pi = bpi

*pi(-1)+(1-bpi)*(pi(-2)+pi(-3)+pi(-4))/3+by*(y(-1)-ypot(-1))+e2;

ypot = ypot(-1)+g(-1)+e3;

str = e6;

g = g(-1)+e4;

z = z(-1)+e5;

end;

varobs y pi str;

initval;

y= 1351;

pi= 2;

ypot= 1361;

str = -4;

g= 0;

z= 0;

e1= 0;

e2= 0;

e3= 0;

e4= 0;

e5= 0;

e6= 0;

end;

estimated_params;

root1, 0.95, -0.9999, 0.9999, uniform_pdf, 0, sqrt(3)^(-1)*1.9998;

root2, 0.55, -0.9999, 0.9999, uniform_pdf, 0, sqrt(3)^(-1)*1.9998;

a_r,gamma_pdf,-0.03,0.1,0;

bpi, gamma_pdf,0.4,0.2,0;

by, gamma_pdf, 0.05,0.2,0;

stderr e1, inv_gamma_pdf,0.01,inf;

stderr e2, inv_gamma_pdf,0.01,inf;

stderr e3, inv_gamma_pdf,0.01,inf;

stderr e4, inv_gamma_pdf,0.01,inf;

stderr e5, inv_gamma_pdf,0.01,inf;

end;

steady;

estimation(datafile=lw_obs,nobs=200,first_obs=5,mh_replic=2000,mh_nblocks=2,mh_drop=0.45,mh_jscale=0.8,mode_compute=1) ypot g z ;lw_rstar.mod (1.1 KB)