Andrew Robinson
2003-Apr-13 21:16 UTC
[R] Peculiarity in non-central qchisq for ncp > 294.92 ...
Hello all, Here's my query: Running R 1.6.2 on FreeBSD 5.0, and on WinXP, and I find that the following hangs the process: dchisq(alpha=0.01, df=1, ncp=295) but it does work for ncp < 294.92. Is this general? Best wishes to all, Andrew Andrew Robinson Ph: 208 885 7115 Department of Forest Resources Fa: 208 885 6226 University of Idaho E : andrewr at uidaho.edu PO Box 441133 W : http://www.uidaho.edu/~andrewr Moscow ID 83843 Or: http://www.biometrics.uidaho.edu No statement above necessarily represents my employer's opinion.
Martin Maechler
2003-Apr-14 09:54 UTC
[R] Peculiarity in non-central qchisq for ncp > 294.92 ...
>>>>> "Andrew" == Andrew Robinson <andrewr at uidaho.edu> >>>>> on Sun, 13 Apr 2003 14:16:45 -0700 (PDT) writes:Andrew> Hello all, Here's my query: Andrew> Running R 1.6.2 on FreeBSD 5.0, and on WinXP, and I Andrew> find that the following hangs the process: Andrew> dchisq(alpha=0.01, df=1, ncp=295) Andrew> but it does work for ncp < 294.92. No! dchisq(alpha = *) always gives an error about the invalidly named argument `alpha'. But then, dchisq(0.01, df=1, ncp=295) and many other values of "ncp") do work here. Only when carefully reading the "Subject" line, I see that there, you are talking about qchisq() rather than dchisq(). And indeed, I can confirm the "hanging" behavior on Windows 2000(server). On Linux, the result is> qchisq(0.01, df=1, ncp=295)[1] 1.797693e+308> all.equal(.Machine$double.xmax, qchisq(0.01, df=1, ncp=295))[1] TRUE which is not really good either: plot(function(x) pchisq(x, df=1, ncp=295), from=1,to=1e4, log='x') shows the pretty bad behavior (a clear bug). So, after all, thanks for reporting! Martin Maechler <maechler at stat.math.ethz.ch> http://stat.ethz.ch/~maechler/ Seminar fuer Statistik, ETH-Zentrum LEO C16 Leonhardstr. 27 ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND phone: x-41-1-632-3408 fax: ...-1228 <><
Thomas Lumley
2003-Apr-14 13:58 UTC
[R] Peculiarity in non-central qchisq for ncp > 294.92 ...
On Sun, 13 Apr 2003, Andrew Robinson wrote:> Hello all, > > Here's my query: > > Running R 1.6.2 on FreeBSD 5.0, and on WinXP, and I find that the > following hangs the process: > > dchisq(alpha=0.01, df=1, ncp=295) > > but it does work for ncp < 294.92. >If you mean qchisq(0.01, df=1, ncp=295) then this also happens on Mac OS X. -thomas