Skip to content
Prev 4851 / 398506 Next

qr.solve (fwd)

On Tue, 14 Mar 2000, Torsten Hothorn wrote:

            
Well, that's because there _are_ NaNs in V (two of them). There are also
some incorrect zeros due to floating point overflow.

In computing V you calculate gamma(172), which is a really really big
number (about 10^309) and it overflows to Inf. As a result, V[1,172]=0 and
V[1,173]=NaN.  

Incidentally, for n=172 you still don't get the right answer.  The
overflow occurs only in the denominator and the [1,172] element is 0
rather than about 0.05.

Use lgamma instead of gamma and exponentiate the result. 

	-thomas
Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._