[Rd] dchisq tail accuracy (PR#14105)

From: <Jerry.Lewis_at_biogenidec.com>
Date: Wed, 02 Dec 2009 17:55:12 +0100 (CET)


Full_Name: Jerry W. Lewis
Version: 2.10.0
OS: Windows XP Professional
Submission from: (NULL) (198.180.131.16)

dchisq is inaccurate in the extreme tails. For instance, dchisq(1510,2,952) returns 4.871004e-18 which is almost 15 times smaller than the correct value of 7.053889e-17. A better approach for ncp>0 would be   besselI(sxn,d2,TRUE) * (x/ncp)^(d2/2) * exp(sxn-(x+ncp)/2)/2 where logs may prevent over/underflow in extreme calculations.



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu 03 Dec 2009 - 10:47:06 GMT

This archive was generated by hypermail 2.2.0 : Thu 03 Dec 2009 - 11:20:57 GMT