Hi all,
I have started the work of rewriting distribution-related functions, beginning by the easiest one (the normal).
Concerning the others, a few points:
1) I discovered that prior_draw.m contains at the bottom a function which draws samples from a gamma. This would solve our copyright problem with gamm_rnd.m, if you confirm to me that you wrote it.
2) In some files, there is code for an inverse gamma of type 2 (represented by integer 6 in Dynare). This distribution is not handled by the preprocessor at this time. Should I add it ? Note that rndprior.m doesn't handle it, while prior_draw.m and draw_prior_density.m do.
3) Just for your information, note that the wikipedia page on the inverse gamma (http://en.wikipedia.org/wiki/Inverse-gamma_distribution) documents a distribution similar to your type-2-inv-gamma (up to a parameter rescaling). I could not find any page on your type-1-inv-gamma (represented by integer 4 in Dynare). This took me some time to understand, until I looked at the headers of lpdfig1.m and lpdfig2.m. Therefore it seems that the definition of what is inverse gamma is not really standardized.
4) There are some factorization opportunities which I would like to take advantage of: * in prior_draw.m: currently does not take advantage of beta_rnd.m (while rndprior.m does) * in draw_prior_density.m: we could use the new PDF functions instead of rewriting the PDF in an inline fashion * factorize code for the two inverse gammas
Best
Sébastien