Skip to content

"taking the log then later exponentiate the result" query

3 messages · Mary Winter, Daniel Nordlund, Michael Lawrence

#
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
#
Your problem is that with the alpha & beta you've specified

(((alpha-1)^(alpha-1))*((beta-1)^(beta-1)))/((beta+alpha-2)^(alpha+beta-2))

is

Inf/Inf

which is NaN.
On Sun, Apr 12, 2009 at 5:39 PM, Mary Winter <statsstudent at hotmail.com> wrote: