finding inverse gamma distribution in bayesian analysis

4 views (last 30 days)
hello, I have been working with hyperspectral images.Actually i am trying to make use of hierarchical bayesian model to perform unmixing of the image.In the process i need to find the noise variance.this variance is the inverse gamma distribution of 2 parameters. one of them is a constant having a value of about 77 and the other parameter has a quite high value,in the range of 10^14.i have been trying to use the gaminv function of matlab, but it has not been of any use.I am getting NaN as my answer,dont knw why..?Plz help me out....
thanks, Ekta

Answers (1)

Roger Stafford
Roger Stafford on 19 Jun 2013
It looks as though the definition of gamma distribution parameters you are using does not coincide with that used by the matlab 'gaminv'. I suggest you carefully read the definition given at:
http://www.mathworks.com/help/stats/gaminv.html
and adjust your own parameters accordingly if you wish to use 'gaminv'. You can read about three different kinds of parameter definitions in common use in the Wikipedia website
http://en.wikipedia.org/wiki/Gamma_distribution.
The parameters used by matlab are those referred to in this latter article as "shape k" and "scale theta". In Bayesian statistics you are more likely to be using the reciprocal of the scale parameter and be calling it the rate parameter.
  1 Comment
Ekta Shah
Ekta Shah on 20 Jun 2013
Thank you for the suggestion.I shall try it out and get you know...Thank You....

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!