[R] ncp > 37.62 in pt

From: Deepayan Sarkar <deepayan.sarkar_at_gmail.com>
Date: Fri 16 Dec 2005 - 04:47:00 EST


Hi,

?qt says:

     ncp: non-centrality parameter delta; currently for 'pt()' and
          'dt()', only for 'ncp <= 37.62'.

'pt' doesn't complain when I give ncp > 37.62 (pnt.c seems to have a workaround), but there is a discontinuity:

> cbind(30:40, dt(10, df = 10, ncp = 30:40, log = T))

      [,1] [,2]
[1,] 30 -27.74986
[2,] 31 -30.98710
[3,] 32 -35.62105
[4,] 33 -41.85932
[5,] 34 -49.76884
[6,] 35 -59.35573
[7,] 36 -70.60410
[8,] 37 -83.48987
[9,] 38 -65.33569

[10,] 39 -69.99854
[11,] 40 -74.82708

In my usage there are many values of 'ncp', a small but positive fraction of which are greater than 37.62. Any suggestions about how I should handle it?

Deepayan

--
http://www.stat.wisc.edu/~deepayan/

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri Dec 16 05:21:00 2005

This archive was generated by hypermail 2.1.8 : Fri 16 Dec 2005 - 09:45:38 EST