[R] how to calculate this natural logarithm

(Ted Harding) ted.harding at wlandres.net
Fri Jan 7 18:42:52 CET 2011


On 07-Jan-11 16:20:59, zhaoxing731 wrote:
> Hello
> I want to calculate natural logarithm of sum of combinations
> as follow: (R code)

{com_sum=choose(2000000,482)*choose(1000000,118)+
 choose(2000000,483)*choose(1000000,117)+...+
 choose(2000000,i)*choose(1000000,600-i)+...+
 choose(2000000,600)*choose(1000000,0) #calculate the sum
 result=log(com_sum) #calculate the log of the sum
}

> But every element of the com_sum is Inf, so I can't get the
> result. Thank you in advance
> Yours sincerely
> ZhaoXing

You may find you can usefully adapt the technique I have
described in:

http://www.zen89632.zen.co.uk/R/FisherTest/extreme_fisher.pdf

A somewhat different but closely related problem.
Ted.

--------------------------------------------------------------------
E-Mail: (Ted Harding) <ted.harding at wlandres.net>
Fax-to-email: +44 (0)870 094 0861
Date: 07-Jan-11                                       Time: 17:42:48
------------------------------ XFMail ------------------------------



More information about the R-help mailing list