jmaih / RISE_toolbox

Solution and estimation of Markov Switching Rational Expectations / DSGE Models
BSD 3-Clause "New" or "Revised" License
105 stars 77 forks source link

Different posterior mode while re-estimating same model #153

Closed narmindavoudi closed 3 years ago

narmindavoudi commented 3 years ago

Hi dear Mr. Maih I really appreciate giving your time to solve our problems. I run the estimation code with "bee_gate optimizer, model estimates posterior and impulse- response are plotted, but if I re-estimate the model with any changes, exactly the same model, the estimated posterior and plot of impulse- responses are different and change surprisingly. Would you please help me know why it happens, and how I can have a fixed estimation and plots to rely on it? sincerely Narmin

jmaih commented 3 years ago

Hi Narmin,

Bee_gate is a stochastic optimizer and it may land on different peaks of the objective function if it is not run long enough. This would explain why running it multiple times gives different results. This is probably a sign that your objective function has multiple modes.

Another possibility is that some parameters are not well identified. And so you may well identify some parameters that matter for the likelihood and not identify others that matter for impulse responses.

I talked about running bee_gate. There are two other possibilities. One is that after running bee_gate you can run fmincon to finish up the job in case bee_gate was not run long enough.

The third possibility is that you use a deterministic optimizer such as fmincon or something else. The advantage is that you will always get the same peak but that peak is going to be close to where you started. You will not be able to explore the objective function in a way that bee_gate would.

Cheers,

J

On Thu, Dec 17, 2020, 18:19 Narmin davoudi notifications@github.com wrote:

Hi dear Mr. Maih I really appreciate giving your time to solve our problems. I run the estimation code with "bee_gate optimizer, model estimates posterior and impulse- response are plotted, but if I re-estimate the model with any changes, exactly the same model, the estimated posterior and plot of impulse- responses are different and change surprisingly. Would you please help me know why it happens, and how I can have a fixed estimation and plots to rely on it? sincerely Narmin

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jmaih/RISE_toolbox/issues/153, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATKBT4ZDCTPX3SLQMRACZDSVI4RPANCNFSM4U77G5JQ .

narmindavoudi commented 3 years ago

Thank you so much for your answer, but what is the reason of being multiple mode of objective function, and what can I do about that? Sorry for bothering you again

jmaih commented 3 years ago

There is no fundamental reason. If there was only one peak, optimization would be easy.

narmindavoudi commented 3 years ago

Dear Junior Some other questions: 1.running bee_gate finished after 1000 iteration. Is it long enough for decision( which you mentioned it)? 2.you suggested that after running bee_gate, fmincon should be run, would you please help about writing its code?

jmaih commented 3 years ago

You can change the default settings bee_gate. They follow the basic settings of matlab. Increase the maximum number of iterations by changing MaxIter

m=estimate(m,'optimizer','bee_gate')

m=estimate(m,'optimizer','fmincon', 'estim_start_from_mode',true)

On Thu, Dec 17, 2020, 21:42 Narmin davoudi notifications@github.com wrote:

Dear Junior Some other questions: 1.running bee_gate finished after 1000 iteration. Is it long enough for decision( which you mentioned it)? 2.you suggested that after running bee_gate, fmincon should be run, would you please help about writing its code?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/jmaih/RISE_toolbox/issues/153#issuecomment-747690167, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATKBT5LSJMU3TNWG3M2ABDSVJUL7ANCNFSM4U77G5JQ .