finding inverse gamma distribution in bayesian analysis
4 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
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.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!