Simulation, Dynare versions, declaration of parameters

Hello all,
I have maybe stupid questions but I am not able to find satisfactory answers:

1/
If I estimate two identical mod files, I obtain the same results (I use for all mode_compute=4). If I change only one parameter declaration (above the model declaration), of course without changing the rest of the mod file, I obtain different results. Why ? Is there an optimal strategy, or a good practice, like for instance, **declaring the same value above and below (estimation block) the model declaration **?

What is the most correct strategy for bayesian estimation ?

1 bis/
This question is also applicable to the std error of shocks: should we declare the same shock std error value above and into the estimation block ?

Why is it possible to do this distiction ?

2/
What is the difference between estimated_params_init; and/or the **parameter declaration above the model declaration **and/or initval; and/or **INITIAL_VALUE in the estimation command **? I, and others I know, really need a good explanation.

3/
Last but not least, why estimating two identical mod files, with Dynare 4.3.1 provide the same results; estimating two identical mod files, with Dynare 4.1.2, provide also the same results; but estimating the same mod file with these two different Dynare versions does not provide the same results ? (I use for all mode_compute=4)

4/
How to use previous estimation results (particularly, posterior mean) that can be used for stoch simul, forecast, shock decomposition etc. ?

I am very grateful in advance for all your answers

Best,
jonathan

Let me try to answer some of your questions. Estimation is always stochastic. Both the MH-algorithm and mode_compute=4 use pseudorandom numbers. Hence, all results will always depend on the set of random numbers used.

  1. The parameter and variable declaration before the model block defines the internal ordering Dynare uses. Consider two variables ordered [a b]’ and two random numbers drawn [eps1 eps2]. If you change the order of the declaration, you might get a + eps2 in the estimation process instead of the previous a +eps1. This is why the ordering matters. I am not aware of a best practice. Moreover, all declaration orders are correct as the MCMC asymptotically converges to the ergodic distribution so that the summary statistics should become really close. Otherwise, your estimation has not converged yet.
    Or did I misunderstand you and you mean stating
    beta=0.98; instead of beta=0.99; changes the estimation results?
    If this is the case, the reason might be steady state computation which also uses random numbers. Try using set_dynare_seed immediately before the estimation command.

1 bis. The same problem applies due to random numbers.

  1. The parameter declaration above the model declaration is only used for stoch_simul or simul. In contrast, estimation by default uses the prior mean unless specified otherwise. To change this behavior of estimation, you can either use the estimated_params_init-block or INITIAL_VALUE in the estimated_params-block. Those two are perfectly equivalent. You should be careful with the ordering as to not overwrite previous declarations. That is, use do not use an additional estimated_params-block after estimated_params_init.
    initval is completely different as it relates not to parameters but to endogenous variables.

  2. This is again due to changes in the random number generation and usage, which are consistent within a Dynare version but not between versions (also because Matlab has changed its algorithms for RNG and Dynare had to adapt)

  3. You should work with save_params_and_steady_state and load_params_and_steady_state

Thank you very much for all !!!