#225: inverse_gamma_specification ------------------------+--------------------------------------------------- Reporter: stepan | Owner: stepan Type: bug | Status: new Priority: critical | Milestone: Component: Estimation | Version: Keywords: | ------------------------+--------------------------------------------------- The secant method used to convert the prior mean and std to s and nu is buggy in some cases. A check on the size of the error should be added.
An example is reported on the forum. For (mean 0.75, sd 0.1), the result of inverse_gamma_specification(0.75,0.1,1) is
s = 11.2136 nu = 21.5870
But the correct answer is
s = 16.2409 nu = 30.3684
Before entering in the while loop the error is 84.9627 and on exit the (monotically growing) error is 4.4287e+10.
#225: inverse_gamma_specification ------------------------+--------------------------------------------------- Reporter: stepan | Owner: stepan Type: bug | Status: new Priority: critical | Milestone: Component: Estimation | Version: Keywords: | ------------------------+---------------------------------------------------
Comment(by stepan):
The problem is that we do not check that the error (err) evaluated at nu1 and nu2 are of opposite sign.
#225: inverse_gamma_specification -------------------------+-------------------------------------------------- Reporter: stepan | Owner: stepan Type: bug | Status: closed Priority: critical | Milestone: Component: Estimation | Version: Resolution: fixed | Keywords: -------------------------+-------------------------------------------------- Changes (by stepan):
* status: new => closed * resolution: => fixed
Comment:
Fixed in git:418382b364922f15f1c5a1d27a5295e03a731582