carnellr at battelle.org
2006-Jun-11 04:03 UTC
[Rd] qunif() behavior with Inf arguments (PR#8958)
Full_Name: Rob Carnell Version: 2.3.0 OS: Windows XP sp 2 Submission from: (NULL) (131.167.72.220) Thank you for all you work on R project! I noticed the following behavior today. It is what I believe to be an inconsistency.> qunif(.5, 0, Inf)[1] Inf> qunif(.5, -Inf, 1)[1] NaN Warning message: NaNs produced in: qunif(p, min, max, lower.tail, log.p) I believe they should yield the same result, which is whatever you feel most appropriate. I think that arguments can be made for either. The lower.tail parameter does not change the result.> qunif(.5, 0, Inf, lower.tail=FALSE)[1] Inf> qunif(.5, -Inf, 1, lower.tail=FALSE)[1] NaN Warning message: NaNs produced in: qunif(p, min, max, lower.tail, log.p) As a side note..> qunif(.5, -Inf, Inf)[1] NaN Warning message: NaNs produced in: qunif(p, min, max, lower.tail, log.p) which seems to be an appropriate result. Of course, it is possible that I don't understand the reasons for this behavior, but I can't find anyone who can explain it or any documentation for it. S-Plus 7.0 does the following as well:> qunif(0.5, 0, Inf)[1] Inf> qunif(0.5, - Inf, 1)[1] NA> qunif(0.5, - Inf, Inf)[1] NA Rob
Seemingly Similar Threads
- The boot Package with bca Intervals and Inf and NaN Values in an Automated Function [mediation()]
- hist( ) fails with 'Inf' values unlike plot( ) (PR#7220)
- dweibull retuns NaN instead of Inf (PR#9080)
- results of pnorm as either NaN or Inf
- NIST StRD linear regression