casadoj@ecc.es
2004-Dec-14 12:44 UTC
[Rd] Bug on log.p argument with all stat function (PR#7420)
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, returns a extrange value. Accoding to the manual, when set to true, it should return log(p) probability. 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 Student 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 instead 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]]
ligges@statistik.uni-dortmund.de
2004-Dec-14 14:06 UTC
[Rd] Bug on log.p argument with all stat function (PR#7420)
casadoj@ecc.es wrote:> 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?Please NEVER submit bug reports twice, in particular not an unsensible one! One time ncp = 1, one time ncp = 0, so what's that surprising? Uwe Ligges> 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]] > > ______________________________________________ > R-devel@stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel