[R] Why does qt() return Inf with certain negative ncp values?

Stephen Berman @tephen@berm@n @end|ng |rom gmx@net
Tue Jun 14 09:30:08 CEST 2022


On Mon, 13 Jun 2022 19:28:43 -0700 Bert Gunter <bgunter.4567 using gmail.com> wrote:

> Well, this will likely require close numerical analysis of the algorithm
> used for the calculation, which I can't help with, but I do note for the
> first case (I didn't bother checking the second) it may be useful to note
> that besides returning Inf, I also got with -7 as ncp:
>
> "There were 50 or more warnings"
> all of which were:
> "In qt(1 - 1 * (10^(-11)), 35, -7) :
>   full precision may not have been achieved in 'pnt{final}' "
>
> I got this warning for all the other values of ncp also.

Hm, I don't get this warning with ncp = -1 through -4; I get it once
with each of -5 and -8 through -10, 32 times with -6, 50 times with -7.
In the range -6.9:-7.9 I get the warning twice with each of -6.9 and
-7.3 through -7.7, once with -7.8 and -7.9, and 50 times with each of
-7.0 through -7.2.

> So it looks like: Congratulations, you seem to have defeated the algorithm.

Then I think I'll report it on r-devel.

> Bert Gunter

Thanks.
Steve Berman



More information about the R-help mailing list