I added a command in mod file after the estimation for trace plot of random draws. And I found a problem.

There is no problem when I added the command for a deep parameter “tau”: trace_plot(options_,M_,estim_params_,‘DeepParameter’,1,‘tau’). I got the plot in this case.

But, when I added a command for the standard deviation “sigma_z”: trace_plot(options_,M_,estim_params_,‘StructuralShock’,1,‘sigma_z’), there is no trace plot produced and I got an error message “The standard deviation of sigma_z is not an estimated parameter!”.

I used Dynare unstable version 2014-08-26. And I referred to dynare.org/DynareWiki/TracePlots for the plot. I am wondering if there is anything wrong in my command or if there is a bug in Dynare. Anybody has any idea?

I am a little confused. You said that “sigma_d is a constant you defined, which has no meaning for Dynare”. I looked up the manual and some examples. I also tried the code by commenting out the lines for defining sigma_d. It seems that the shocks-end block is not necessary for estimation. And sigma_d in my code is totally redundant and has no meaning at all. In my case, does Dynare assign any value to sigma_d during estimation? Also, does it mean that the shocks-end block is only required for stochastic simulation?

I meant to say " has no meaning for Dynare during estimation of this standard deviation". The reason is the following:
You cannot use parameters assigned in the shocks-block for estimation purposes. If you would try to estimate the sigma_d, it would fail. This is a safeguard in newer Dynare versions against erroneously thinking parameters within the shocks-block can be used for estimation. The reason is that the contents of the shocks block are executed exactly once and not iteratively during estimation. The shocks-block and all parameters used in it are only used for calibration and simulation purposes!

When you start estimation of the standard deviation of eps_d, Dynare will estimate it, but the respective estimate will have nothing to with sigma_d (which you did not estimate as I pointed out). This also implies that after estimation, the value of sigma_d will be unchanged compared to the value before estimation, because it was not estimated. Rather the standard deviation will be for example be directly saved into M_.Sigma_e.

If you did not estimate standard deviation of eps_d, Dynare would keep this standard deviation at the value assigned during calibration of the model, which is the constant value of sigma_d. This is the case where sigma_d has a meaning for Dynare.

The reason you can comment this line out without consequences is that during estimation, Dynare estimates the standard deviation and no calibrated model is necessary for estimation (but it is recommended).