The justification for inverse_gamma type 1, is that traditionaly, one takes inverse_gamma type 2 for the prior of variance. As we are settting priors for standard deviation, it seems more coherent to take inverse_gamma type 1 that is related to the previous one by a square root.
Best
Michel
Stéphane Adjemian wrote:
Salut Sébastien,
I think we wrote gamma_draw(), so you can use this one. But I am not sure that the code is the most efficient...
The parser should handle the inverse-gamma type 2.
For the inverse gammas you may look at something I wrote a couple of years ago:
http://www.cepremap.cnrs.fr/~adjemian/r/dynare/pdf/Distributions.pdf
It's an unfinished document (I have to find the tex source ;-) the definition of the beta is still missing. The informations given by wikipédia are incomplete. The definitions of the inv-gammas are standard (for bayesian statisticians ;-), we follow Zellner (1971) and also Bauwens, Lubrano and Richard (199?).
Best, Stéphane.
Le Monday 04 August 2008 17:03:55 Sébastien Villemot, vous avez écrit :
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:
- 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.
- 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.
- 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.
- 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
Dev mailing list Dev@dynare.org http://www.dynare.org/cgi-bin/mailman/listinfo/dev
Dev mailing list Dev@dynare.org http://www.dynare.org/cgi-bin/mailman/listinfo/dev