# Bayesian Estimation: how to see the value of the argument while estimating

Dear All

I am doing Bayesian estimation with estimation command and call Sims’ maximiser.
Ultimately, I want to see on the screen (or in the file) the value of parameters at each step of the maximiser. If you can help me how to see it with any other maximiser - the question will be resolved.

My own take on it is the following: we define bounded domain for each parameter, so there must be a matlab file which transforms this range to R^n to make the optimization unconstrained. There should also be a matlab file with inverse transformation. In principle, if you give me names of these two files, I can open csminwelf1.m and add a couple of lines which take the current x, apply the inverse transformation and print it.

Could you help me with this problem and show the way to get these values either on the screen or in the file. If you tell me that dynare stores them somewhere (if I kill it half way), it will also be fine, but they should be transformed to the original domain.

Many many thanks
Tanya

1. Dynare does not do internal parameter transformations. Rather, a penalty-function approach is used. If the defined domain is violated, Dynare returns an penalty.
2. In Dynare 4.6.3 in `csminwel1.m` you will find line 123 to read
``````    %   disp_verbose([sprintf('x = ') sprintf('%15.8g %15.8g %15.8g %15.8g\n',x)]);
``````

Replace it with

``````      disp_verbose([sprintf('x = ') sprintf('%15.8g %15.8g %15.8g %15.8g\n',x)],Verbose);
``````

and you will see output like
``
f at the beginning of new iteration, -1228.6995613003
x = 0.015833981 0.0050488413 0.35712729 0.99338285
0.002776918 1.0115784 0.65634866 0.69088661
0.0057183785

``where x is the parameter values.``

This is excellent! Thank you very much!