From Jerry.Lewis at biogenidec.com  Wed Dec  2 17:55:12 2009
From: Jerry.Lewis at biogenidec.com (Jerry.Lewis at biogenidec.com)
Date: Wed,  2 Dec 2009 17:55:12 +0100 (CET)
Subject: [Rd] dchisq tail accuracy (PR#14105)
Message-ID: <20091202165512.E0EB12832002@mail.pubhealth.ku.dk>

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.



[Rd] dchisq tail accuracy (PR#14105)
Jerry.Lewis at biogenidec.com