# Inverse gamma

Dear all,

Does anyone know how to transform inverse gamma distribution with a particular degree of freedom into its equivalent in dynare, i.e. in dynare, inverse gamma distribution only requires the specification of mean and the standard deviation is infinity, but in many other papers, degree of freedom is used instead…

Many thanks…

[quote=“twlxv”]Dear all,

Does anyone know how to transform inverse gamma distribution with a particular degree of freedom into its equivalent in dynare, i.e. in dynare, inverse gamma distribution only requires the specification of mean and the standard deviation is infinity, but in many other papers, degree of freedom is used instead…

Many thanks…[/quote]

Hi,

There is a function in the matlab directory of dynare that computes what you want from the expectation and the standard deviation :

[s,nu] = inverse_gamma_specification(mu,sigma,type)

I guess you can play with this function if you want to compare with the other papers. Arnold Zellner (An Introduction to Bayesian Inference in Econometrics, pages 371-373) shows how the moments are related to the degree of freedom.

Best Regards,
St

Hi,

Thanks Stephane. Can I ask a few more questions to make sure that I understand this correctly though: First, what’s the difference between inv_gamma_pdf, inv_gamma1_pdf, inv_gamma2_pdf? Is inv_gamma_pdf equivalent to inv_gamma1_pdf? Second, in estimated_params, the two parameters that we input, are they still s and nu, or are they mean and standard deviation?

Thanks a lot.

Regards,

Wing

Hi Wing,

Here is a link to a pdf file where you will find some informations about the inverse gamma distribution (and others):

There is no difference between inv_gamma_pdf and inv_gamma1_pdf. All is explained in the pdf file.

No you have to define the mean and standard deviation of the inverse gamma distribution and dynare computes \nu and s. If you prefer to specify \nu and s rather than \mu and \sigma, you can use the formulas given in the pdf file.

Best regards,
St

Dear Stephane,

Could you post the link to the file that talks about inverse gamma distribution again. The link has become inactive.

Thanks,

Abhishek.

Dear Abhishek,

You will find the pdf at:

Best,
Stéphane.

Thanks Stephane.

Dear Stephane,

Could you post the link to the file that talks about inverse gamma distribution again. The link has become inactive.

Thanks.

You will find the pdf at: