Help for bayesian estimation

Hi everyone, I’m experimenting with a new feature of dynare, Bayesian estimation. I’m trying to estimate this model, but I have some doubts. First of all, I don’t understand why matlab can’t read the file where the data is located and I can’t interpret the error message.
Thanks everyone for the help in advance.

stimaB.mod (4.3 KB)
P_GDP.xlsx (11.7 KB)

You need to provide the correct file extension (xlsx, not xls) and the name of the variables in the file must coincide with the ones in varobs. Moreover

  1. Your data still has a trend.
  2. You are not correctly handling parameter dependence.
  3. You should use an analytical steady state file for estimation.

See Pfeifer(2013): “A Guide to Specifying Observation Equations for the Estimation of DSGE Models”

Dear professor, thank you very much for your clarifications and guidance. I made the suggested changes, but I have a doubt about the data trends. This conversion table is shown in the appendix, but to insert it into the code should I write the variables to be observed as “y_hat”, as reported in the guide?

Also by analytical steady state is it meant to be defined with the “#” parameter first?
Thank you very much in advance
Best

stimaB.mod (4.4 KB)

  1. Your observation equation most probably should be something like
y_obs=100*y;

as your y in the linearized model is already a y_hat.
2. Your model does not feature a shocks-block and there are no estimated shock standard deviations. That will not work.
3. The objects in

Skss=1;
Ass=1;
Sss=0.47; //media dei prezzi dell'olio
markup=((eps-1)/eps);
rkss=1/beta-1+delta;
//X=-1/alpha*(a-alphae*se-alphal*w-alphak*(rkss+sk));
QCratio=1/(1-omega-(alphae*markup)-((alphae*markup)*(delta*(alphak/alpha*rkss))));
Lss=((markup*alphal)*(QCratio))^(1/(phi+1));   %manca L^phi
Qss=(Ass*(Lss^alphal)*(((markup*alphal)^alphae)*(((eps-a)/eps)*(alphak/rkss))^alphak))^1/(1-alphae-alphak);
//Qss=(Ass*(Lss^alphal)*((markup*alphae/Sss)^(alphak+alphae))*(((Sss*alphak)/(Skss*alphae*rkss))^(alphak)))^(1/(1-alphak-alphae));
Ess=((alphae*(eps-1))/eps)*Qss;
Css=(1/Sss^x)*Qss*(1-omega-alphae*((eps-1)/eps)-(alphae*((eps-1)/eps))*(delta*(alphak/alpha*rkss)));
Iss=delta*(alphak/(Skss*rkss))*(eps-1)/eps*Qss;
Gss=omega*Qss;
Yss=Sss^(-x)*(Qss-Sss*Ess);

should be model-local variables with #.