[Rd] pchisq accuracy (PR#14216)
Jerry.Lewis at biogenidec.com
Jerry.Lewis at biogenidec.com
Thu Feb 18 23:00:12 CET 2010
Full_Name: Jerry W. Lewis
Version: 2.10.1
OS: Windows XP Professional
Submission from: (NULL) (166.186.168.21)
Since
pchisq(x,df,ncp,lower.tail,TRUE)
is calculated as
log(pchisq(x,df,ncp,lower.tail))
it looses accuracy when pchisq(x,df,ncp,lower.tail) is near 1. Accuracy can be
maintained in that case by replacing the existing calculation with
log1p(-pchisq(x,df,ncp,!lower.tail))
More information about the R-devel
mailing list