Bayesian Estimation Help

Dear Johannes,
I am trying to learn how to do Bayesian estimation and to replicatie a prototypical NK model as found in Lubic and Schorfeide (2004) for the determinate version of their model. I have been able to successfully replicate the estimation for the determinate model in DYNARE. Now I am trying to do the same thing by writing up the codes in MATLAB and do the estimation manually myself in MATLAB without using DYNARE.
I have got stuck at some point while doing the posterior kernel optimization for finding the mode.
Will you be willing to have a look at my codes and perhaps suggest me what I am doing wrong? If you agree to have a look at my MATLAB codes at your convenience, I will post them.
Looking forward to your reply.
Thanks.
Regards,
Qazi.
I am trying to learn how to do Bayesian estimation and to replicatie a prototypical NK model as found in Lubic and Schorfeide (2004) for the determinate version of their model. I have been able to successfully replicate the estimation for the determinate model in DYNARE. Now I am trying to do the same thing by writing up the codes in MATLAB and do the estimation manually myself in MATLAB without using DYNARE.
I have got stuck at some point while doing the posterior kernel optimization for finding the mode.
Will you be willing to have a look at my codes and perhaps suggest me what I am doing wrong? If you agree to have a look at my MATLAB codes at your convenience, I will post them.
Looking forward to your reply.
Thanks.
Regards,
Qazi.