Displaying 20 results from an estimated 4000 matches similar to: "pnbinom.c qnorm.c"
2020 Aug 10
2
qnbinom with small size is slow
Thanks Ben for verifying the issue. It is always reassuring to hear
when others can reproduce the problem.
I wrote a small patch that fixes the issue
(https://github.com/r-devel/r-svn/pull/11):
diff --git a/src/nmath/qnbinom.c b/src/nmath/qnbinom.c
index b313ce56b2..d2e8d98759 100644
--- a/src/nmath/qnbinom.c
+++ b/src/nmath/qnbinom.c
@@ -104,6 +104,7 @@ double qnbinom(double p, double size,
2020 Aug 07
2
qnbinom with small size is slow
Hi all,
I recently noticed that `qnbinom()` can take a long time to calculate
a result if the `size` argument is very small.
For example
qnbinom(0.5, mu = 3, size = 1e-10)
takes ~30 seconds on my computer.
I used gdb to step through the qnbinom.c implementation and noticed
that in line 106
(https://github.com/wch/r-source/blob/f8d4d7d48051860cc695b99db9be9cf439aee743/src/nmath/qnbinom.c#L106)
2001 Feb 08
2
dnbinom(,size<1,)=0 (PR#842)
This came up on r-help but indicates a bug.
dnbinom(x,n,p) calls dbinom_raw(n-1,...)
which returns 0 for n<1.
-thomas
---------- Forwarded message ----------
Date: Thu, 08 Feb 2001 17:10:23 +0000
From: Yudi Pawitan <yudi@stat.ucc.ie>
To: Mark Myatt <mark@myatt.demon.co.uk>
Cc: R-Help <r-help@stat.math.ethz.ch>
Subject: Re: [R] Goodness of fit to Poisson / NegBinomial
2013 May 20
4
Código del algoritmo de qnorm
Cordial saludo para cada uno.
De manera amable les pido ayuda para acceder al código R usado para el
algoritmo de la función qnorm.
Gracias por su ayuda.
César Escalante C.
[[alternative HTML version deleted]]
2004 Mar 05
6
qnorm(2) ends with segmentation fault (PR#6648)
Full_Name: Xiong Guanglei
Version: 1.8.1
OS: Linux
Submission from: (NULL) (202.38.103.50)
qnorm(x)
when x>1.0
2012 Oct 17
1
how R implement qnorm()
how R implement qnorm()
I wonder anyone knows the mathematical process that R calculated the
quantile?
The reason I asked is soly by curiosity. I know the probability of a normal
distribution is calculated through integrate the Gaussian function, which
can be implemented easily (see code), while the calculation of quantile
(or Zα) in R is a bit confusing as it requires inverse error function (X
2010 Feb 10
1
Copyright on src/nmath/qnorm.c
At the top of src/nmath/qnorm.c it is stated:
* Copyright (C) 1998 Ross Ihaka
* Copyright (C) 2000--2005 The R Development Core Team
* based on AS 111 (C) 1977 Royal Statistical Society
* and on AS 241 (C) 1988 Royal Statistical Society
The routine is in fact an f2c'd version of AS241 from StatLib:
http://lib.stat.cmu.edu/apstat/241 and http://lib.stat.cmu.edu/apstat/
It
2008 Aug 21
1
pnmath compilation failure; dylib issue?
(1) ...need to speed up a monte-carlo sampling...any suggestions about
how I can get R to use all 8 cores of a mac pro would be most useful
and very appreciated...
(2) spent the last few hours trying to get pnmath to compile under os-
x 10.5.4...
using gcc version 4.2.1 (Apple Inc. build 5553) as downloaded from
CRAN, xcode 3.0...
...xcode 3.1 installed over top of above after
2020 Aug 21
1
qnbinom with small size is slow
Hi Martin,
thanks for verifying. I agree that the Cornish-Fisher seems to struggle
with the small size parameters, but I also don't have a good idea how to
replace it.
But I think fixing do_search() is possible:
I think the problem is that when searching to the left y is decremented
only if `pnbinom(y - incr, n, pr, /*l._t.*/TRUE, /*log_p*/FALSE)) < p` is
FALSE. I think the solution is
2020 Aug 20
0
qnbinom with small size is slow
>>>>> Constantin Ahlmann-Eltze via R-devel
>>>>> on Mon, 10 Aug 2020 10:05:36 +0200 writes:
> Thanks Ben for verifying the issue. It is always reassuring to hear
> when others can reproduce the problem.
> I wrote a small patch that fixes the issue
> (https://github.com/r-devel/r-svn/pull/11):
> diff --git
2005 Jan 05
3
strange behaviour of negative binomial
Dear list,
I ran into a strange behaviour of the pnbinom function - or maybe I
just made a stupid mistake.
First thing is that pnbinom seems to be very slow. The other - more
interesting one - is that I get two different curves when I plot the
estimated density and the density given by pnbinom. Shouldn't it be the
same?
This is only the case, I think, if I use the parameter size = 1. I
2008 Feb 10
1
Error while using fitdistr() function or goodfit() function
Try changing your method to "ML" and try again. I tried the run the
first example from the documentation and it failed with the same error.
Changing the estimation method to ML worked.
@List: Can anyone else verify the error I got? I literally ran the
following two lines interactively from the example for goodfit:
dummy <- rnbinom(200, size = 1.5, prob = 0.8)
gf <- goodfit(dummy,
2004 Aug 06
3
Bug in qnorm or pnorm?
I found the following strange behavior using qnorm() and pnorm():
> x<-8.21;x-qnorm(pnorm(x))
[1] 0.0004638484
> x<-8.22;x-qnorm(pnorm(x))
[1] 0.01046385
> x<-8.23;x-qnorm(pnorm(x))
[1] 0.02046385
> x<-8.24;x-qnorm(pnorm(x))
[1] 0.03046385
> x<-8.25;x-qnorm(pnorm(x))
[1] 0.04046385
> x<-8.26;x-qnorm(pnorm(x))
[1] 0.05046385
> x<-8.27;x-qnorm(pnorm(x))
2011 Aug 23
2
qnorm?
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]]
2009 Mar 17
3
R does not compile any more on FreeBSD 8.0-CURRENT
On a recent FreeBSD 8.0-CURRENT (i386) building R (any version) breaks
with the following messages:
----------------------------------------------------------------------
[...snip...]
gcc -std=gnu99 -I. -I../../src/include -I../../src/include
-I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c wilcox.c -o wilcox.o
gcc -std=gnu99 -I. -I../../src/include -I../../src/include
-I/usr/local/include
2017 Apr 16
1
Getting high precision values from qnorm in the tail
Hello All
I am looking for high precision values for the normal distribution in the
tail,(1e-10 and 1 - 1e-10) as the R package that I am using sets any number
which is out of this range to these values and then calls the qnorm and qt
function.
What I have noticed is that the qnorm implementation in R is not symmetric
when looking at the tails. This is quite surprising to me, as it is well
known
2010 Nov 12
4
dnorm and qnorm
Hello all,
I have a question about basic statistics. Given a PDF value of 0.328161,
how can I find out the value of -0.625 in R? It is like reversing the dnorm
function but I do not know how to do it in R.
> pdf.xb <- dnorm(-0.625)
> pdf.xb
[1] 0.328161
> qnorm(pdf.xb)
[1] -0.444997
> pnorm(pdf.xb)
[1] 0.628605
Many thanks,
Edwin
--
View this message in context:
2012 May 25
1
difference between qnorm and qqnorm
dear all,
it will just take you a minute to tell me the difference
between qnorm and qqnorm. are they same or is there any
difference between them??
regards
1998 Sep 10
2
R-beta: trouble compiling 0.62.3 on SunOS 4.1.4: lgamma conflicts
I've recently tried to get 0.62.3 up on our Suns (4.1.4, using gcc; I'm
also having trouble with a Solaris 2.6 compile but I haven't given up hope
on that one yet) -- the last compile I did was 0.61.1, which worked
smoothly.
Running
./configure --prefix=/usr/local/apps/R/R-0.62.3 [--with-g77]
(tried both with and without g77, eventually get to the same place),
I get a conflict
2006 Jan 31
1
approximation to ln \Phi(x)
I am using pnorm() with the log.p=T argument to get approximations to ln \Phi(x) and qnorm with the log.p=T argument to get estimates of \Phi^{-1}(exp(x)). What approximations are used in these two functions (I noticed in the source pnorm.c it doesn't look like Abramowitz and Stegen) and where can I find the citation?
Thanks,
Richard Morey