In rw1050, I found that> pweibull(3:10, 2)[1] 0.9998766 0.9999999 1.0000000 1.0000000 NaN NaN [7] NaN NaN Warning message: NaNs produced in: pweibull(q, shape, scale, lower.tail, log.p) more surprisingly,> pweibull(3:10, 2.1)[1] 0.9999566 1.0000000 1.0000000 -Inf NaN NaN [7] NaN NaN Warning message: NaNs produced in: pweibull(q, shape, scale, lower.tail, log.p) Is this a bug of pweibull() in rw1050?> version_ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 1 minor 5.0 year 2002 month 04 day 29 language R Best regards, Joseph Lu -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>>>>> "Lu" == Lu Chi-Hsien Joseph <cjlu at ibm.stat.ncku.edu.tw> writes:Lu> In rw1050, I found that >> pweibull(3:10, 2) Lu> [1] 0.9998766 0.9999999 1.0000000 1.0000000 NaN NaN Lu> [7] NaN NaN Lu> Warning message: Lu> NaNs produced in: pweibull(q, shape, scale, lower.tail, log.p) Lu> more surprisingly, >> pweibull(3:10, 2.1) Lu> [1] 0.9999566 1.0000000 1.0000000 -Inf NaN NaN Lu> [7] NaN NaN Lu> Warning message: Lu> NaNs produced in: pweibull(q, shape, scale, lower.tail, log.p) Lu> Is this a bug of pweibull() in rw1050? Probably a problem with Windows / Math library behavior. The above example works fine in three different Unix versions I have access to (on Saturday morning). Can others, particularly Windows users, check this? Thanks, Martin Maechler >> version Lu> _ Lu> platform i386-pc-mingw32 Lu> arch i386 Lu> os mingw32 Lu> system i386, mingw32 Lu> status Lu> major 1 Lu> minor 5.0 Lu> year 2002 Lu> month 04 Lu> day 29 Lu> language R -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> > In rw1050, I found that > > pweibull(3:10, 2) > [1] 0.9998766 0.9999999 1.0000000 1.0000000 NaN NaN > [7] NaN NaN > Warning message: > NaNs produced in: pweibull(q, shape, scale, lower.tail, log.p) > > more surprisingly, > > pweibull(3:10, 2.1) > [1] 0.9999566 1.0000000 1.0000000 -Inf NaN NaN > [7] NaN NaN > Warning message: > NaNs produced in: pweibull(q, shape, scale, lower.tail, log.p) > > Is this a bug of pweibull() in rw1050?Looks like a bug in the expm1() C-function.> expm1(-100)[1] NaN Warning message: NaNs produced in: expm1(x)> exp(-100)-1[1] -1>One workaround would be to use the lower.tail option:> 1-pweibull(3:10,2,lower.tail=F)[1] 0.9998766 0.9999999 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [8] 1.0000000> 1-pweibull(3:10,2.1,lower.tail=F)[1] 0.9999566 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [8] 1.0000000>BTW, this is not a problem in splus6R2. Sundar -- Sundar Dorai-Raj, Ph.D. Statistical Methods Engineer PDF Solutions, Inc. Richardson TX (972) 889-3085 x216 (214) 392-7619 cell sundar.dorai-raj at pdf.com -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Dear Martin, I get the same output as Joseph: > pweibull(3:10, 2) [1] 0.9998766 0.9999999 1.0000000 1.0000000 NaN NaN NaN [8] NaN Warning message: NaNs produced in: pweibull(q, shape, scale, lower.tail, log.p) > pweibull(3:10, 2.1) [1] 0.9999566 1.0000000 1.0000000 NaN NaN NaN NaN [8] NaN Warning message: NaNs produced in: pweibull(q, shape, scale, lower.tail, log.p) Verison information (using Windows 2000): platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 1 minor 5.0 year 2002 month 04 day 29 language R John At 11:22 AM 5/11/2002 +0200, Martin Maechler wrote:> >>>>> "Lu" == Lu Chi-Hsien Joseph <cjlu at ibm.stat.ncku.edu.tw> writes: > > Lu> In rw1050, I found that > >> pweibull(3:10, 2) > Lu> [1] 0.9998766 0.9999999 1.0000000 1.0000000 NaN NaN > Lu> [7] NaN NaN > Lu> Warning message: > Lu> NaNs produced in: pweibull(q, shape, scale, lower.tail, log.p) > > Lu> more surprisingly, > >> pweibull(3:10, 2.1) > Lu> [1] 0.9999566 1.0000000 1.0000000 -Inf NaN NaN > Lu> [7] NaN NaN > Lu> Warning message: > Lu> NaNs produced in: pweibull(q, shape, scale, lower.tail, log.p) > > Lu> Is this a bug of pweibull() in rw1050? > >Probably a problem with Windows / Math library behavior. >The above example works fine in three different Unix versions I >have access to (on Saturday morning). > >Can others, particularly Windows users, check this? > >Thanks, >Martin Maechler > > >> version > Lu> _ > Lu> platform i386-pc-mingw32 > Lu> arch i386 > Lu> os mingw32 > Lu> system i386, mingw32 > Lu> status > Lu> major 1 > Lu> minor 5.0 > Lu> year 2002 > Lu> month 04 > Lu> day 29 > Lu> language R > >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- >r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html >Send "info", "help", or "[un]subscribe" >(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch >_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._----------------------------------------------------- John Fox Department of Sociology McMaster University Hamilton, Ontario, Canada L8S 4M4 email: jfox at mcmaster.ca phone: 905-525-9140x23604 web: www.socsci.mcmaster.ca/jfox ----------------------------------------------------- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
I checked this on win98 (R1.4.1, still):> pweibull(3:10, 2)[1] 0.9998766 0.9999999 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [8] 1.0000000> pweibull(3:10, 2.1)[1] 0.9999566 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [8] 1.0000000>Kjetil Halvorsen Martin Maechler wrote:> > >>>>> "Lu" == Lu Chi-Hsien Joseph <cjlu at ibm.stat.ncku.edu.tw> writes: > > Lu> In rw1050, I found that > >> pweibull(3:10, 2) > Lu> [1] 0.9998766 0.9999999 1.0000000 1.0000000 NaN NaN > Lu> [7] NaN NaN > Lu> Warning message: > Lu> NaNs produced in: pweibull(q, shape, scale, lower.tail, log.p) > > Lu> more surprisingly, > >> pweibull(3:10, 2.1) > Lu> [1] 0.9999566 1.0000000 1.0000000 -Inf NaN NaN > Lu> [7] NaN NaN > Lu> Warning message: > Lu> NaNs produced in: pweibull(q, shape, scale, lower.tail, log.p) > > Lu> Is this a bug of pweibull() in rw1050? > > Probably a problem with Windows / Math library behavior. > The above example works fine in three different Unix versions I > have access to (on Saturday morning). > > Can others, particularly Windows users, check this? > > Thanks, > Martin Maechler > > >> version > Lu> _ > Lu> platform i386-pc-mingw32 > Lu> arch i386 > Lu> os mingw32 > Lu> system i386, mingw32 > Lu> status > Lu> major 1 > Lu> minor 5.0 > Lu> year 2002 > Lu> month 04 > Lu> day 29 > Lu> language R > > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- > r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html > Send "info", "help", or "[un]subscribe" > (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._