Hi everyone, I have the following problem. I have some small p-values but when I use qnorm(1-4e-30) I get an error. Is there anyway to get around this? -- Thanks, Jim. [[alternative HTML version deleted]]
How about qnorm(4e-30, lower.tail = FALSE) ? You cannot subtract 4e-30 from 1 and expect to get something else than 1 (exactly). Peter On Tue, Aug 23, 2011 at 10:21 AM, Jim Silverton <jim.silverton at gmail.com> wrote:> Hi everyone, > I have the following problem. I have some small p-values but when I use > > qnorm(1-4e-30) > I get an error. > Is there anyway to get around this? > > > > -- > Thanks, > Jim. > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Sent from my Linux computer. Way better than iPad :)
On Aug 23, 2011, at 12:21 PM, Jim Silverton wrote:> Hi everyone, > I have the following problem. I have some small p-values but when I use > > qnorm(1-4e-30) > I get an error. > Is there anyway to get around this?Here is a hint:> qnorm(1 - 4e-30)[1] Inf> qnorm(1)[1] Inf # See ?all.equal> all.equal(1 - 4e-30, 1)[1] TRUE # See ?.Machine for more information> .Machine$double.eps[1] 2.220446e-16 Since 4e-30 is smaller than the above, you are essentially passing 1 to qnorm(). Try this:> qnorm(4e-30, lower.tail = FALSE)[1] 11.34337 See ?qnorm and avoid using the '1 - x' approach. HTH, Marc Schwartz