[Rd] Bug on log.p argument with all stat function (PR#7420)

casadoj at ecc.es casadoj at ecc.es
Tue Dec 14 12:44:18 CET 2004


Dear R Developers:

I have been playing with R, release 2.0.1 for a week now and have detected =
that all stat functions related to distribution probabilities have the same=
 problem:

1.- The log.p parameter of all distribution functions, when set to TRUE, re=
turns a extrange value.

Accoding to the manual, when set to true, it should return log(p) probabili=
ty. So to my understanding, setting to true this parameters is the same as =
getting the LOG of the same function with this parameter set to false.

> pt (1.1, 5, F, T)
[1] 0.8392746
> pt (1.1, 5, T, T)
[1] 0.5168608
> log(pt (1.1, 5, F, T))
[1] -0.1752173

1.- The first line is the lower tail cumulative probability of a 1.1 on a S=
tudent T distribution with 5 degrees of freedom.
2.- The second line is the lower tail cumulative probability of a 1.1 on a =
Student T distribution with 5 degrees of freedom on a log scale
3.- The third line is the same as the second, but calculated mannually inst=
ead of using the log.p parameters

Why line 2 and 3 do not return the same result?

Reciba un cordial saludo,
=0D
Jos=E9 Luis Casado Mart=EDnez
------------------------------------------------------------------
European Computing Consultants
C/ Hermanos Garc=EDa Noblejas, N=BA 39, 5=AA, N 1
28037 Madrid
Telf.: 34-91-406 19 15. Fax: 34-91-406 19 16
Movil: 34-607-750 316
------------------------------------------------------------------


_____________________________________________________________________
Mensaje analizado y protegido, tecnologia antivirus www.trendmicro.es
	[[alternative HTML version deleted]]



More information about the R-devel mailing list