From Jerry.Lewis at biogenidec.com  Thu Feb 18 23:00:12 2010
From: Jerry.Lewis at biogenidec.com (Jerry.Lewis at biogenidec.com)
Date: Thu, 18 Feb 2010 23:00:12 +0100 (CET)
Subject: [Rd] pchisq accuracy (PR#14216)
Message-ID: <20100218220012.4207C282EFCB@mail.pubhealth.ku.dk>

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))



[Rd] pchisq accuracy (PR#14216)
Jerry.Lewis at biogenidec.com