Using mcmc to estimation parametes in NK_model whit calvo pricing

Dear all
this is my Dynare base code for an open economics with calvo pricing, that work.
its about excess Consumption Volatility, households are 2 part (ricardian and non_ricardian) and i have uip_shock.

var c c_h c_f c_r c_nr a y L L_r L_nr int s q eps p pi pi_f pi_h psi_f  
mc_h m_f m m_h y_f ex sanc_oil sanc_imp phi_c 
z_m z_h u_y u_int u_s u_m u_pi g y_oil p_soil p_simp istar pistar ystar 
delta_q delta_s delta_ch delta_cf delta_c delta_eps delta_psi delta_y
mo mg gd fr delta_fr delta_gd e_uip;

varexo e_y e_int e_s e_m e_zm e_zh e_ystar e_istar e_pistar e_g e_oil
e_soil e_simp e_pi zeta_uip;  

parameters sigmaa alphaa thetaa betaa deltaa phii chii alphaa_b alphaa_d  
thetaa_h lambdaa_h thetaa_f lambdaa_f phii_pi phii_y rhoo_zm 
rhoo_zh rhoo_ystar rhoo_istar rhoo_pistar muu_y muu_int muu_s muu_m nu 
rhoo_g rhoo_yoil alphaa_e alphaa_f rhoo_soil rhoo_simp alphaa_g muu_pi
deltaa_pih deltaa_pif eta_c omega_r rhoo_euip k; 

sigmaa=1.2;
alphaa=0.5;
thetaa=3.2;
betaa=0.97;
deltaa=0.9;
phii=2;
chii=1;
alphaa_b=0.6;
alphaa_d=0.5;
thetaa_h =0.5;
lambdaa_h= (1-thetaa_h)*(1-(betaa*thetaa_h))/thetaa_h;
thetaa_f=0.5;
lambdaa_f= (1-thetaa_f)*(1-(betaa*thetaa_f))/thetaa_f;
phii_pi=-0.5;
phii_y=-2;
rhoo_zm=0.75;
rhoo_zh=0.75;
rhoo_ystar=0.7;
rhoo_istar=0.75;
rhoo_pistar=0.7;
muu_y=0.8;
muu_int=0.8;
muu_s=0.88;
muu_m=0.58;
nu=2;
alphaa_e=0.55;
rhoo_yoil=0.5;
rhoo_g=0.5;
alphaa_f=0.5;
rhoo_soil=0.8;
rhoo_simp=0.8;
alphaa_g=-0.01;
muu_pi=0.8;
deltaa_pih=0.7;
deltaa_pif=0.7;
k=1.2;
eta_c=0.8;
omega_r=0.45;
rhoo_euip=0.8;


model(linear);
// defined below equation
#omegaa_a=((1-alphaa_d)+alphaa_b*deltaa*phii);
// 1.Ricardian and non-ricardian Consumption Euler equation
c_r=((eta_c)*(1/(1+eta_c))*c_r(-1)+((1/(1+eta_c))*c(+1))-(1-eta_c)*((1/(sigmaa*(1+eta_c))))*(int-pi(+1)));
c_nr=(eta_c)*c(-1)-((1-eta_c)/sigmaa)*L_nr;
// 2.Uncovered interest parity condition
int=pi(+1)+istar-pistar(+1)+delta_q(+1)-chii*a-u_int-e_uip;
// 3.Real exchange rate
delta_q=delta_eps+pistar-pi;
// 4.Law of one price gap
delta_psi=delta_eps+pistar-pi_f;
// 5.Terms of trade 
delta_s=pi_f-pi_h;
// 6.Domestic consumption
c=omega_r*c_r+(1-omega_r)*c_nr;
delta_ch=delta_c+thetaa*alphaa*delta_s;
// 7.Foreign consumption
delta_cf=delta_c-thetaa*(1-alphaa)*delta_s;
// 8.Overall inflation
pi=pi_h+alphaa*delta_s;
// 9.Domestic inflation
pi_h=deltaa_pih*pi_h(-1)+betaa*(pi_h(+1)-deltaa_pih*pi_h)+lambdaa_h*mc_h+u_pi;
// 10.Firm's marginal cost
L=omega_r*L_r+(1-omega_r)*L_nr;
mc_h=(1-deltaa*alphaa_b)*(phii*L+sigmaa*c)+(deltaa*alphaa_b*(1-alphaa)+alphaa)*s-(z_h+alphaa_b*(1-deltaa)*z_m);
// 11.Production function
y=z_h+(1-alphaa_b)*(1-alphaa_d)*L+alphaa_b*m;
// 12.Import inflation
pi_f=deltaa_pif*pi_f(-1)+betaa*(pi_f(+1)-deltaa_pif*pi_f)+lambdaa_f*psi_f+sanc_imp;
// 13.Central bank's reaction function
mg=phii_pi*pi+phii_y*(y)+u_m;
// 14.Goods market clearing condition
y=(1-alphaa)*c+alphaa*ystar+(alphaa*thetaa)*psi_f+((2-alphaa)*alphaa*thetaa)*s+g;
// 15.Budget constraint flow
c_r+a+omega_r*g=(1/betaa)*a(-1)-alphaa*psi_f-alphaa*s+omega_r*y;
c_nr+(1-omega_r)*g=(1-omega_r)*y;
// 16,17,18.Intermediate good
m=alphaa_d*L+deltaa*(phii*L+sigmaa*c)+(1-deltaa)*z_m-deltaa*(1-alphaa)*s;
m_f=nu*(1-deltaa)*(phii*L+sigmaa*c)-(nu*(1-deltaa)*(1-alphaa))*s-(nu*(1-deltaa))*z_m+m;
m_h=(nu*deltaa*(1-alphaa))*s-nu*deltaa*(phii*L+sigmaa*c)+(nu*deltaa)*z_m+m;
// 19.Total Import
y_f=(1-alphaa_e)*m_f+alphaa_e*c_f+psi_f+(1-alphaa)*s;
//20.Total export
ex=thetaa*psi_f+(thetaa-alphaa)*s+ystar;
//21 to 24.money
mo=(1/k)*(sigmaa*c)-(1/k)*int;
mg=mo-mo(-1)+pi;
mo=gd+q+fr;
delta_fr+q=q+y_oil+thetaa*psi_f+(thetaa-alphaa)*s+ystar-((1-alphaa_e)*m_f+alphaa_e*c_f+psi_f+(1-alphaa)*s);
// 24 to 26.Foreign economy
ystar=rhoo_ystar*ystar(-1)+e_ystar;
istar=rhoo_istar*istar(-1)-e_istar;
pistar=rhoo_pistar*pistar(-1)+e_pistar;
// 27,28.Technology shocks
z_m=rhoo_zm*z_m(-1)+e_zm;
z_h=rhoo_zh*z_h(-1)+e_zh;
// 29 to 34.Exogenous processes
u_y=muu_y*u_y(-1)+e_y;
u_int=muu_int*u_int(-1)-e_int;
u_m=muu_m*u_m(-1)+e_m;
u_pi=muu_pi*u_pi(-1)+e_pi;
y_oil=(1-rhoo_yoil)*y_oil(-1)-rhoo_yoil*sanc_oil-e_oil;
g=rhoo_g*g(-1)+e_g;
e_uip=rhoo_euip*e_uip(-1)+zeta_uip;
// 35.Definition
delta_psi=psi_f-psi_f(-1);
delta_ch=c_h-c_h(-1);
delta_cf=c_f-c_f(-1);
delta_eps=eps-eps(-1);
delta_q=q-q(-1);
delta_s=s-s(-1);
delta_c=c-c(-1);
delta_y=y-y(-1);
pi=p-p(-1);
sanc_oil=alphaa_f*(p_simp-p_soil)+phi_c-u_s;
sanc_imp=(1-alphaa_f)*(p_soil-p_simp)+phi_c-u_s;
phi_c=alphaa_g*ex;
u_s=muu_s*u_s(-1)-e_s;
p_soil=rhoo_soil*p_soil(-1)+e_soil;
p_simp=rhoo_simp*p_simp(-1)+e_simp;
delta_fr=fr-fr(-1);
delta_gd=gd-gd(-1);
end;



steady;
resid;
check;
shocks;


var e_s; stderr 0.08;
var e_m; stderr 0.08;
var e_oil; stderr 0.08;
var zeta_uip; stderr 0.08;
end;

stoch_simul(periods=100000,order=1,irf=30)y pi mg mo c c_r c_nr c_h c_f delta_eps a;

msa_final11.mod (5.6 KB)

now i want to estimating parameters and use mcmc methods.
in this new code blow, i have an eror:

ERROR: msa_final11.mod: line 131, cols 1-37: rhoo_zh must be an endogenous or an exogenous variable
var c c_h c_f c_r c_nr a y L L_r L_nr int s q eps p pi pi_f pi_h psi_f  
mc_h m_f m m_h y_f ex sanc_oil sanc_imp phi_c 
z_m z_h u_y u_int u_s u_m u_pi g y_oil p_soil p_simp istar pistar ystar 
delta_q delta_s delta_ch delta_cf delta_c delta_eps delta_psi delta_y
mo mg gd fr delta_fr delta_gd e_uip;

varexo e_y e_int e_s e_m e_zm e_zh e_ystar e_istar e_pistar e_g e_oil
e_soil e_simp e_pi zeta_uip;  

parameters sigmaa alphaa thetaa betaa deltaa phii chii alphaa_b alphaa_d  
thetaa_h lambdaa_h thetaa_f lambdaa_f phii_pi phii_y rhoo_zm 
rhoo_zh rhoo_ystar rhoo_istar rhoo_pistar muu_y muu_int muu_s muu_m nu 
rhoo_g rhoo_yoil alphaa_e alphaa_f rhoo_soil rhoo_simp alphaa_g muu_pi
deltaa_pih deltaa_pif eta_c omega_r rhoo_euip k; 

chii=1;
alphaa_b=0.6;
alphaa_d=0.5;
lambdaa_h= (1-thetaa_h)*(1-(betaa*thetaa_h))/thetaa_h;
lambdaa_f= (1-thetaa_f)*(1-(betaa*thetaa_f))/thetaa_f;
rhoo_istar=0.75;
muu_int=0.8;
rhoo_simp=0.8;


model(linear);
// defined below equation
#omegaa_a=((1-alphaa_d)+alphaa_b*deltaa*phii);
// 1.Ricardian and non-ricardian Consumption Euler equation
c_r=((eta_c)*(1/(1+eta_c))*c_r(-1)+((1/(1+eta_c))*c(+1))-(1-eta_c)*((1/(sigmaa*(1+eta_c))))*(int-pi(+1)));
c_nr=(eta_c)*c(-1)-((1-eta_c)/sigmaa)*L_nr;
// 2.Uncovered interest parity condition
int=pi(+1)+istar-pistar(+1)+delta_q(+1)-chii*a-u_int-e_uip;
// 3.Real exchange rate
delta_q=delta_eps+pistar-pi;
// 4.Law of one price gap
delta_psi=delta_eps+pistar-pi_f;
// 5.Terms of trade 
delta_s=pi_f-pi_h;
// 6.Domestic consumption
c=omega_r*c_r+(1-omega_r)*c_nr;
delta_ch=delta_c+thetaa*alphaa*delta_s;
// 7.Foreign consumption
delta_cf=delta_c-thetaa*(1-alphaa)*delta_s;
// 8.Overall inflation
pi=pi_h+alphaa*delta_s;
// 9.Domestic inflation
pi_h=deltaa_pih*pi_h(-1)+betaa*(pi_h(+1)-deltaa_pih*pi_h)+lambdaa_h*mc_h+u_pi;
// 10.Firm's marginal cost
L=omega_r*L_r+(1-omega_r)*L_nr;
mc_h=(1-deltaa*alphaa_b)*(phii*L+sigmaa*c)+(deltaa*alphaa_b*(1-alphaa)+alphaa)*s-(z_h+alphaa_b*(1-deltaa)*z_m);
// 11.Production function
y=z_h+(1-alphaa_b)*(1-alphaa_d)*L+alphaa_b*m;
// 12.Import inflation
pi_f=deltaa_pif*pi_f(-1)+betaa*(pi_f(+1)-deltaa_pif*pi_f)+lambdaa_f*psi_f+sanc_imp;
// 13.Central bank's reaction function
mg=phii_pi*pi+phii_y*(y)+u_m;
// 14.Goods market clearing condition
y=(1-alphaa)*c+alphaa*ystar+(alphaa*thetaa)*psi_f+((2-alphaa)*alphaa*thetaa)*s+g;
// 15.Budget constraint flow
c_r+a+omega_r*g=(1/betaa)*a(-1)-alphaa*psi_f-alphaa*s+omega_r*y;
c_nr+(1-omega_r)*g=(1-omega_r)*y;
// 16,17,18.Intermediate good
m=alphaa_d*L+deltaa*(phii*L+sigmaa*c)+(1-deltaa)*z_m-deltaa*(1-alphaa)*s;
m_f=nu*(1-deltaa)*(phii*L+sigmaa*c)-(nu*(1-deltaa)*(1-alphaa))*s-(nu*(1-deltaa))*z_m+m;
m_h=(nu*deltaa*(1-alphaa))*s-nu*deltaa*(phii*L+sigmaa*c)+(nu*deltaa)*z_m+m;
// 19.Total Import
y_f=(1-alphaa_e)*m_f+alphaa_e*c_f+psi_f+(1-alphaa)*s;
//20.Total export
ex=thetaa*psi_f+(thetaa-alphaa)*s+ystar;
//21 to 24.money
mo=(1/k)*(sigmaa*c)-(1/k)*int;
mg=mo-mo(-1)+pi;
mo=gd+q+fr;
delta_fr+q=q+y_oil+thetaa*psi_f+(thetaa-alphaa)*s+ystar-((1-alphaa_e)*m_f+alphaa_e*c_f+psi_f+(1-alphaa)*s);
// 24 to 26.Foreign economy
ystar=rhoo_ystar*ystar(-1)+e_ystar;
istar=rhoo_istar*istar(-1)-e_istar;
pistar=rhoo_pistar*pistar(-1)+e_pistar;
// 27,28.Technology shocks
z_m=rhoo_zm*z_m(-1)+e_zm;
z_h=rhoo_zh*z_h(-1)+e_zh;
// 29 to 34.Exogenous processes
u_y=muu_y*u_y(-1)+e_y;
u_int=muu_int*u_int(-1)-e_int;
u_m=muu_m*u_m(-1)+e_m;
u_pi=muu_pi*u_pi(-1)+e_pi;
y_oil=(1-rhoo_yoil)*y_oil(-1)-rhoo_yoil*sanc_oil-e_oil;
g=rhoo_g*g(-1)+e_g;
e_uip=rhoo_euip*e_uip(-1)+zeta_uip;
// 35.Definition
delta_psi=psi_f-psi_f(-1);
delta_ch=c_h-c_h(-1);
delta_cf=c_f-c_f(-1);
delta_eps=eps-eps(-1);
delta_q=q-q(-1);
delta_s=s-s(-1);
delta_c=c-c(-1);
delta_y=y-y(-1);
pi=p-p(-1);
sanc_oil=alphaa_f*(p_simp-p_soil)+phi_c-u_s;
sanc_imp=(1-alphaa_f)*(p_soil-p_simp)+phi_c-u_s;
phi_c=alphaa_g*ex;
u_s=muu_s*u_s(-1)-e_s;
p_soil=rhoo_soil*p_soil(-1)+e_soil;
p_simp=rhoo_simp*p_simp(-1)+e_simp;
delta_fr=fr-fr(-1);
delta_gd=gd-gd(-1);
end;



steady;
resid;
check;
shocks;


var e_s; stderr 0.08;
var e_m; stderr 0.08;
var e_oil; stderr 0.08;
var zeta_uip; stderr 0.08;
end;

estimated_params;
// PARAM NAME, INITVAL, LB, UB, PRIOR_SHAPE, PRIOR_P1, PRIOR_P2, PRIOR_P3, PRIOR_P4, JSCALE
// PRIOR_SHAPE: BETA_PDF, GAMMA_PDF, NORMAL_PDF, INV_GAMMA_PDF

stderr rhoo_zm,INV_GAMMA_PDF,0.1,inf;
stderr rhoo_zh,INV_GAMMA_PDF,0.1,inf;
stderr muu_y,INV_GAMMA_PDF,0.1,inf;
stderr muu_int,INV_GAMMA_PDF,0.1,inf;
stderr muu_m,INV_GAMMA_PDF,0.1,inf;
stderr muu_pi,INV_GAMMA_PDF,0.1,inf;
stderr rhoo_yoil,INV_GAMMA_PDF,0.1,inf;
stderr rhoo_g,INV_GAMMA_PDF,0.1,inf;
stderr rhoo_euip,INV_GAMMA_PDF,0.1,inf;
sigmaa,1.2,GAMMA_PDF,1.2,0.01;
alphaa,0.5,BETA_PDF,0.5,0.005;
thetaa,3.2,GAMMA_PDF,3.2,0.04;
betaa,0.97,BETA_PDF,0.97,0.005;
deltaa,0.9,BETA_PDF,0.9,0.01;
phii, 2.8,GAMMA_PDF,2.8,0.04;
thetaa_h,0.7,BETA_PDF,0.7,0.005;
thetaa_f,0.5,BETA_PDF,0.5,0.005;
phii_pi,0.5,GAMMA_PDF,0.5,0.005;
phii_y,2,GAMMA_PDF,2,0.01;
rhoo_zh,0.7,BETA_PDF,0.7,0.01;
rhoo_ystar,0.8,BETA_PDF,0.8,0.01;
rhoo_pistar,0.8,BETA_PDF,0.8,0.01;
muu_y,0.8,BETA_PDF,0.8,0.01;
muu_m,0.6,BETA_PDF,0.6,0.01;
rhoo_yoil,0.8,BETA_PDF,0.8,0.01;
rhoo_g,0.5,BETA_PDF,0.5,0.01;
rhoo_soil,0.8,BETA_PDF,0.8,0.01;
muu_pi,0.8,BETA_PDF,0.8,0.01;
deltaa_pih,0.9,BETA_PDF,0.9,0.01;
deltaa_pif,0.7,BETA_PDF,0.7,0.02;
eta_c,0.8,NORMAL_PDF,0.8,0.25;
omega_r,0.8,BETA_PDF,0.8,0.25;
k,2,GAMMA_PDF,2,0.02;

end;
estimation_params_init(use_calibration);
end;

estimation(datafile=Book2,nobs=132,mode_compute=6, mode_check,mh_jscale=0.3,mh_replic=200000, mh_nblocks=2);

stoch_simul(periods=100000,order=1,irf=30)y pi mg mo c c_r c_nr c_h c_f delta_eps a;

The rhoo_zm are structural parameters. You cannot use the keyword stderr on them to estimate their values.