Page 1 of 1

Sampling from posterior

PostPosted: Thu Dec 18, 2014 12:40 pm
by brasidas1
Dear all,

I would be very grateful for some help on the following as I have struggled to find something relevant on the forum. I have estimated a model using Bayesian methods.
I am working on calculating the weights in the policy maker's loss function (call them lambdas) that I solve numerical given the parameter estimates but they are not directly estimated.

Given the posterior means I have calculated the lambdas but now I would like to calculate their distributions. Do I have to write a separate file so to carry out posterior simulation or can I use a mod file to do this? I noticed that a standard .mod file with an 'estimated_params' block followed by stoch_simul runs successfully, without the use of 'estimation' so I thought there may be a straightforward way of proceeding.
Many thanks

Re: Sampling from posterior

PostPosted: Wed Dec 31, 2014 3:27 pm
by jpfeifer
Unfortunately, there is no really straightforward way to do it. We are working on providing such a functionality, but it is not a top priority right now.

Dynare will save the posterior draws to a mat-file. What you could try to do is load those draws, write them into the parameter vector and the compute the posterior distribution yourself. A somewhat outdated first attempt was provided at https://github.com/JohannesPfeifer/dynare/commit/99c863c57f1ea5f4a49744f1e043ec58818e7a7c