Method of entering the metropolis algorithm

Hello everyone I need help I have parameters that have no initial values ​​but they are distributed according to beta and gamma laws a prior and a posterior
1I would like to know when I have to enter the codes on the Markov chains and the draws according to the metropolis algorithm
It is so what I have to enter the codes before or after the distribution of the parameters posterior
2-If possible I would like to have a very small set on the method of grasp to follow for my programming
thank you in advance

I am not sure I understand your question. In your mod-file, you have to provide the prior distribution and Dynare will return a posterior distribution. Simple examples are the fs2000.mod in the Dynare examples folder and

1 Like

Your file was very informative.

please I have another problem I have to program the price of Calvo. but in the equation there is the function sum (from 0 to Infinity) that I don’t know enter on dynare.

See and

1 Like

Thank you teacher I will follow the article you send me to rewrite my equations before programming.

excuse me professor when I launches my program on dynare here is what appears
<< ERROR: in the ‘steady_state_model’ Block, variable ‘Y’ is undefined in the declaration of variable ‘y’>>

  1. I would like to know what problematic because it no equation in my model which explains Y in my steady-state.

I would also like to know how to run my model with my database on excel.

As always, without the files it is impossible to tell.

1 Like

here is the file
programme.mod (4.1 KB)

What are the lines


in the steady_state_model-block supposed to do? In the first line, Y is not defined yet and your model does not feature a y, only a Y.

1 Like

OK Master.
Please I would also like to know how to run my model with my database on excel.