I have two questions regarding the HBayesian estimation (which I could not figured out by reading the dynare.pdf)
I know after running the estimation(mode_compute=4, …mh_replic=3000, … ) command I can run the stoch_simul(…) command.

What is the difference between plugging the option [moments_varendo] inside the estimation command
(which computes the theoretical moments of the posterior distribution) , and
NOt plugging this option but running the stoch_simul(…) command instead of it (which as I know computes theoretical moments
using posterior means (as I know it) .

my second question is :

following question (1) is there a way I can run the stoch_simul not with the posterior mean but rather with the posterior_median.

these two I could not figure out from the dynare.pdf (though the second question might be very simple)

Estimation will provide the posterior mean of the objects while stoch_simul will provide the objects at the posterior mean. Due to Jensen’s Inequality, these are two conceptually very different things.

Add

xparam1 = get_posterior_parameters('median');
M_ = set_all_parameters(xparam1,estim_params_,M_);
between estimation and stoch_simul.

I got the second question. Thank you very much Professor. Very helpful.

I am not quite clear about the first issue Professor.

1.a) When we talk about the theoretical moments following an estimation
which one is commonly used - the option [moments_varendo] or [stoch_simul] Professor ?

If the [stoch_simul] is used commonly, then when is [moments_varendo] used and vice versa ???

Thank you very much for your time in this learning process Professor.

As I obtained the moments with estimation(…,moments_varendo,…) I checked the results. But what I get for the correlations for example is:

a cell arrray of the form ‘‘oo_.PosteriorTheoreticalMoments.dsge.correlation.Mean.y.y’’

A quick observation is that:
[1]. there are 5 values within that , and
[2]. none of them is = 1 (as I would expect the correlation(y,y) = 1 no matter whether is average at th mean or mean of the average )

Regarding [1] Could it be due to the default option of [ar=5] ??
I do not understand [2] though .