[Rd] Accuracy of qt for df=1 (PR#9804)

From: <mwelinder_at_gmail.com>
Date: Tue, 24 Jul 2007 17:18:09 +0200 (CEST)

Full_Name: Morten Welinder
Version: 2.2.0
OS: Linux
Submission from: (NULL) (

The qt function for df=1 is implemented as...

    q = - tan((P+1) * M_PI_2);

Adding 1 kills accuracy for P near 0. A better way is to use

   q = cot(P * M_PI_2);

   q = 1/tan(P * M_PI_2);

R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue 24 Jul 2007 - 17:54:45 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 25 Jul 2007 - 13:36:58 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.