Skip to content
Prev 176864 / 398506 Next

"taking the log then later exponentiate the result" query

I think when someone  told you to take the log of the calculation, they
meant for you to simplify the logarithmic calculation algebraically so that
you are not exponentiating large numbers.  Try changing your calculation of
M to (I think this right)

M <- (alpha-1)*log(alpha-1) + (beta-1)*log(beta-1) -
(alpha+beta-2)*log(alpha+beta-2)

Hope this is helpful,

Dan

Daniel Nordlund
Bothell, WA USA