Sampling from the prior


I want to generate and save draws from the prior distribution. How can I do that?


The easiest way to do this is just to simulate draws using your favorite random number generator. I usually use Jim LeSage’s toolbox functions for this: norm_rnd, gamm_rnd, etc. You could then use these draws in a standard .mod file if you like (ie, set up a loop that assigns parameter values from the prior simulations, solve the model, etc.)

You might also want to have a look at the attached in order to see how various distributions are parameterized in Dynare (this was written by Stephane Adjemian, and is available online somewhere, but I don’t remember where).

Hop this helps!

Distributions.pdf (172 KB)

thanks PS, I just thought Dynare can do that for me in the same way it samples from the posterior.