[Rd] qt(p,df) discontinuous in p for df in 1.01->1.7 (PR#2991)

jens.lund at nordea.com jens.lund at nordea.com
Tue May 13 14:29:15 MEST 2003


Full_Name: Jens Lund
Version: Version 1.7.0  (2003-04-16)
OS: Win NT 4.0 SP 6
Submission from: (NULL) (193.3.225.210)



As the T distribution is symmetrical around 0 qt(0.5,df) should return 0 for any
df.

However for df close to 1 it seems to have problems as seen by:
qt(0.5,seq(1,1.1,by=0.0001))

For example:
> qt(0.5,1.01)
[1] -0.2300470

Higher df as df=1.1 (and up to approx df=1.7) seem to have problems as it also
gives discontinuities (the plural form!):
plot(seq(0.1,0.9,by=0.001),qt(seq(0.1,0.9,by=0.001),1.1),pch=".")

When df is close to 1 it appears as one discontinuity at p=0.5, and as df
increases there are two discountinuities symmetrical around 0.5 and moving away
from 0.5.

Keep up your outstanding work on R ;-)

Jens



More information about the R-devel mailing list