Thanks again;
But if u check my inital values I am using the same K
my problem is with the estimation part - the last line of my code. My steady state code is working properly.
I am sharing the code here to ease the discussion.
[code]var y, c, k, s, i, l, m, pi, w, ir, zeta, theta;
varexo tfp, nu;
parameters alpha, beta, rho, delta, gamma, barl, mi, eta, csi, hatzeta;
beta=0.96;
alpha=.33;
delta=0.1;
rho=0.994022170958;
gamma=1.030231005;
barl=1/3;
mi=0.5;
eta=0.180016;
csi=0.00001;
hatzeta=0.006331062557318192;
model;
gamma*(1/c)=beta*(1/c(+1))(1-delta+alphaexp(s(+1))(k/l(+1))^(alpha-1));
gammak=(1-delta+alphaexp(s)(k(-1)/l)^(alpha-1))k(-1)+wl-c;
(1-mi)/m=(mi/c)(ir/1+ir);
1-delta+alphaexp(s(+1))*k^(alpha-1)l(+1)^(1-alpha)=(1+ir)/(1+pi(+1));
s=rhos(-1)+tfp;
y=exp(s)k(-1)^alphal^(1-alpha);
i=y-c;
log(w)=(1/2)*log(w(+1))+(1/2)log(1+pi(+1))+(1/2)log(w(-1))-(1/2)log(1+pi)+(csi/2)(2log(l/barl)+log(l(+1)/l)+log(l(-1)/l));
w=(1-alpha)exp(s)(k(-1)/l)^(alpha);
m=exp(zeta)m(-1)/(gamma(1+pi));
zeta-hatzeta=theta;
theta=etatheta(-1)+nu;
end;
initval;
c=0.346541;
i=0.115944;
ir=0.04828;
k=0.890299;
l=0.333;
m=3.56;
pi=-0.02318;
s=0;
theta=0;
w=0.92497;
y=0.458;
zeta=0.006331062557318192;
nu=0;
tfp=0;
end;
steady;
estimated_params;
beta, normal_pdf, 0.96, 0.1;
alpha, beta_pdf, 0.3, 0.1;
delta, normal_pdf, 0.1, 0.05;
rho, beta_pdf, 0.99, 0.05;
mi, normal_pdf, 0.5, 0.3;
gamma, normal_pdf, 1.03023, 0.3;
eta , beta_pdf, 0.18, 0.15;
hatzeta, beta_pdf,0.00633,0.05;
csi, beta_pdf, 0.5, 0.05;
stderr nu, inv_gamma_pdf, 0.02, inf;
stderr tfp, inv_gamma_pdf, 0.02, inf;
end;
shocks;
var nu; stderr 0.0046;
var tfp; stderr 0.0140;
end;
stoch_simul(irf=50, order=1, nomoments);
varobs y, k;
estimated_params_init;
stderr tfp, 0.0140;
%stderr nu, 0.0046;
beta, 0.96;
alpha, 0.33;
delta, 0.1;
rho, 0.994022170958;
gamma, 1.030231005;
barl, 0.333;
mi, 0.5;
eta, 0.180016;
csi, 0.5;
hatzeta, 0.006331062557318192;
end;
estimation(datafile = Dataformatlabmoney, first_obs=1, plot_priors=1, mh_nblocks = 2, nobs=100, mode_compute=10, mode_check, forecast=40)y, c, k, s, i, l, m, pi, w, ir, zeta, theta;
[/code]
My aim is just considering some parameters as stochastic distribution and find an estimation of DSGE (Bayesian /montecarlo/Simulated annealing).