initial values in Bayesian estimation

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

initial values in Bayesian estimation

Postby tanya » Tue Dec 19, 2006 8:48 pm

Dear Michel

I am doing Bayesian estimation of some model. The structure of the code is standard:
...

alpha = 0.5; // * for example, all parameters are assigned some values

model (linear);
...
end;

alpha, 0.7, 0.,1., beta_pdf, 0.5, 0.1;//** defining the prior distribution and initial draw
...
estimate ....


I have noticed that if I change values of alpha in line *, but do not change anything in line **, the results for modes are different (slightly different, but different. In particular the log data density can be noticeably different). Is it OK? I have thought that line * only applies to the the model: the model is solved with these coefficients and we check that there is a steady state and it is stable. I thought that definition * has nothing to do with estimations. Am I wrong?

Many thanks

Tanya
tanya
 
Posts: 37
Joined: Tue Sep 12, 2006 6:41 pm

Postby MichelJuillard » Tue Dec 19, 2006 8:57 pm

You are right and this is very puzzling. It may be something else, because the optimizer has a random restart in some circumstances and it isn't surprising that two successive computations give different results, but it shouldn't have anything to do which changing or not the first definition of alpah (line *).

To control the random restart, you can put the following line before estimation
rand('state',3)

in order to use the same seed for the uniform random generator before optimization. The exact number that you use doesn't matter.

If, doing that, you still obtain different results when changing the initial definition of alpha (line *), please send the *.mod file and the data.

Kind regards

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Postby tanya » Tue Dec 19, 2006 9:07 pm

Dear Michel

Many thanks, I will try. I only wanted to add that if I do NOT chanhe alpha in lines * AND in **, then two consequent estimations produce identical results, so ** is not randomizing by default. Since the model is linearised so the steady state is zero (and it is of course confirmed) then * should have absolutely no impact...

Tanya
tanya
 
Posts: 37
Joined: Tue Sep 12, 2006 6:41 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 10 guests