Displaying 20 results from an estimated 53 matches for "qbinom".
Did you mean:
dbinom
2009 May 20
3
qbinom (PR#13711)
Full_Name: Wolfgang Resch
Version: R 2.8.1 GUI 1.27
OS: OS X 10.4.11
Submission from: (NULL) (137.187.89.14)
Strange behavior of qbinom:
> qbinom(0.01, 5016279, 1e-07)
[1] 0
> qbinom(0.01, 5016279, 2e-07)
[1] 16
> qbinom(0.01, 5016279, 3e-07)
[1] 16
> qbinom(0.01, 5016279, 4e-07)
[1] 16
> qbinom(0.01, 5016279, 5e-07)
[1] 0
2012 Nov 30
4
qbinom
a=c(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9)
b=c(0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1)
cor(a,b)= -1
a'=qbinom(a, 1, 0.5)
b'=qbinom(b, 1, 0.5)
why cor(a',b') becomes -0.5 ?
--
View this message in context: http://r.789695.n4.nabble.com/qbinom-tp4651460.html
Sent from the R help mailing list archive at Nabble.com.
2007 Jun 28
2
inaccuracy in qbinom with partial argument matching
Hi,
I found the following strange effect with
qbinom & partial argument matching
p0 <- pbinom(0, size = 3, prob = 0.25)
qbinom(p0, size = 3, prob = 0.25) ## 0 o.k.
qbinom(p0-0.05, size = 3, prob = 0.25) ## 0 o.k.
## positional matching:
qbinom(p0, 3, 0.25) ## 0 o.k.
## partial argument matching:
qbinom(p0 , s...
2005 Nov 23
1
qbinom returns NaN
Hi, All:
For most but not all cases, qbinom is the inverse of pbinom.
Consider the following example, which generates an exception:
> (pb01 <- pbinom(0:1, 1, .5, log=T, lower.tail=FALSE))
[1] -0.6931472 -Inf
Since "lower.tail=FALSE", Pr{X>1} = 0 in this context, and log(0) =
-Inf, consistent with the document...
2000 Apr 07
4
Bug in qbinom? (PR#511)
n_10;p_0.5;jjx_0:n;qbinom(pbinom(jjx,n,p),n,p) # This one works as
expected
n_100;p_0.5;jjx_0:n;qbinom(pbinom(jjx,n,p),n,p) # This one causes
severe problems
I cannot interrupt using ESC and I finally have to resort to the Windows
Task manager to kill the R session.
A friend of mine told me that he faced similar problem...
2003 Dec 18
1
qbinom when probability is 1 (PR#5900)
Full_Name: Jonathan Swinton
Version: 1.8.0
OS: Windows 2000
Submission from: (NULL) (193.132.159.34)
Calling qbinom with a sample probability of 1 returns NaN
> qbinom(p=0.95,size=10,prob=1)
[1] NaN
I believe that this is wrong and that qbinom(p,size,prob=1) should always be
size for 0<p<=1.
The documentation says that
The quantile is defined as the smallest value x such that F(x) >=
p, whe...
2004 Jun 11
1
qbinom(p, size, prob = 0, lower.tail = FALSE) hangs (PR#6972)
Full_Name: Jon McAuliffe
Version: 1.9.0
OS: Mac OS X 10.3.4
Submission from: (NULL) (64.166.16.252)
a call like qbinom(0.3, 10, prob = 0, lower.tail = FALSE) hangs R. prob = 0 does
not
look interesting, but it can be useful for completeness when qbinom is part of
other general routines.
please see PR#5900 (Accuracy-fixed).
jon.
--please do not edit the information below--
Version:
platform = powerpc-apple-dar...
2003 Sep 27
2
CI on median
Dear friends, I'm probably wrong but is there anything better than
bootstrap to get a confidence interval of the median from a population with
unspecified distribution ?
Best wishes
Troels Ring, Aalborg, Denmark
2008 Aug 21
1
pnmath compilation failure; dylib issue?
...o
gamma_cody.o i1mach.o imax2.o imin2.o lbeta.o lgamma.o lgammacor.o
mlutils.o pbeta.o pbinom.o pcauchy.o pchisq.o pexp.o pf.o pgamma.o
pgeom.o phyper.o plnorm.o plogis.o pnbeta.o pnbinom.o pnchisq.o pnf.o
pnmath.o pnorm.o pnt.o polygamma.o ppois.o pt.o ptukey.o punif.o
pweibull.o qbeta.o qbinom.o qcauchy.o qchisq.o qexp.o qf.o qgamma.o
qgeom.o qhyper.o qlnorm.o qlogis.o qnbeta.o qnbinom.o qnchisq.o qnf.o
qnorm.o qnt.o qpois.o qt.o qtukey.o qunif.o qweibull.o sign.o
stirlerr.o toms708.o -lgomp -F/Library/Frameworks/R.framework/.. -
framework R -Wl,-framework -Wl,CoreFoundation
ld:...
1997 Jul 09
1
R-beta: Problem with `rpois'
There is a problem with `rpois'. It does seem to take care about the
order of the arguments. This is an example:
> rpois(n=1,lambda=2)
[1] 3
> rpois(lambda=2,n=1)
[1] 2 0
It obviously uses the first argument as the number of samples to be
drawn, which is wrong.
I used Version 0.49 Beta (April 23, 1997).
Fredrik
1997 Jul 09
1
R-beta: Problem with `rpois'
There is a problem with `rpois'. It does seem to take care about the
order of the arguments. This is an example:
> rpois(n=1,lambda=2)
[1] 3
> rpois(lambda=2,n=1)
[1] 2 0
It obviously uses the first argument as the number of samples to be
drawn, which is wrong.
I used Version 0.49 Beta (April 23, 1997).
Fredrik
2012 Sep 27
2
Generating an autocorrelated binary variable
...onal matrix in rmvnorm even if it produces no correlated sample):
"sampleCop" <- function(n = 1000, rho = 0.2) {
require(splus2R)
mvrs <- rmvnorm(n + 1, mean = rep(0, 3), cov = diag(3))
pmvrs <- pnorm(mvrs, 0, 1)
var1 <- matrix(0, nrow = n + 1, ncol = 1)
var1[1] <- qbinom(pmvrs[1, 1], 1, 0.5)
if(var1[1] == 0) var1[nrow(mvrs)] <- -1
for(i in 1:(nrow(pmvrs) - 1)) {
if(pmvrs[i + 1, 1] <= rho) var1[i + 1] <- var1[i]
else var1[i + 1] <- var1[i] * (-1)
}
sample <- matrix(0, nrow = n, ncol = 4)
sample[, 1] <- var1[1:nrow(var1) - 1]
sample[, 2]...
2012 May 31
1
inverse binomial in R
...on one trial such
that the probability of observing floor(k) or fewer
successes in floor(n) trials is p.
I've found some hints on the web like
http://rwiki.sciviews.org/doku.php?id=guides:tutorials:regression:table
I tried to replicate using qbinom
the results obtained in
> invbinomial(10,5, 0.5)
>.54830584
but with no success.
Thank you
Cheers
Anna
Anna Freni Sterrantino
Department of Statistics
University of Bologna, Italy
via Belle Arti 41, 40124 BO.
[[alternative HTML version deleted]]
2012 Nov 30
1
Choleski decomposition
m <- matrix(nrow=5, ncol=5)
m <- ifelse(row(m)==col(m), 1, 0.2)
c <- chol(m) # Choleski decomposition
u <- matrix(rnorm(2000*5), ncol=5)
uc <- u %*% c
cr <- pnorm(uc)
cr <- qbinom(cr,1,0.5)
cor(cr)
I expected that the cor(cr) to be 0.2 as i set in m, but the result is
around 0.1.
Why is that? Thanks
--
View this message in context: http://r.789695.n4.nabble.com/Choleski-decomposition-tp4651475.html
Sent from the R help mailing list archive at Nabble.com.
2009 Mar 17
3
R does not compile any more on FreeBSD 8.0-CURRENT
...snorm.o sexp.o dgamma.o pgamma.o qgamma.o rgamma.o
dbeta.o pbeta.o qbeta.o rbeta.o dunif.o punif.o qunif.o runif.o dnorm.o
pnorm.o qnorm.o rnorm.o dlnorm.o plnorm.o qlnorm.o rlnorm.o df.o pf.o
qf.o rf.o dnf.o dt.o pt.o qt.o rt.o dnt.o dchisq.o pchisq.o qchisq.o
rchisq.o rnchisq.o dbinom.o pbinom.o qbinom.o rbinom.o rmultinom.o
dcauchy.o pcauchy.o qcauchy.o rcauchy.o dexp.o pexp.o qexp.o rexp.o
dgeom.o pgeom.o qgeom.o rgeom.o dhyper.o phyper.o qhyper.o rhyper.o
dnbinom.o pnbinom.o qnbinom.o rnbinom.o dpois.o ppois.o qpois.o rpois.o
dweibull.o pweibull.o qweibull.o rweibull.o dlogis.o plogis.o qlog...
2003 Jan 22
2
small bug in binom.test?
Hi all,
I am wondering whether there is a small bug in the binom.test function of
the ctest library (I'm using R 1.6.0 on windows 2000, but Splus 2000 seems
to have the same behaviour). Or perhaps I've misunderstood something.
the command binom.test(11,100,p=0.1) and binom.test(9,100,p=0.1) give
different p-values (see below). As 9 and 11 are equidistant from 10, the
mean of the
2005 Aug 09
0
qpois minor bug (PR#8058)
...return p + lambda;
#endif
if(!R_FINITE(lambda))
ML_ERR_return_NAN;
R_Q_P01_boundaries(p, 0, ML_POSINF);
if(lambda < 0) ML_ERR_return_NAN;
if(lambda == 0) return 0;
mu = lambda;
sigma = sqrt(lambda);
gamma = sigma;
/* Note : "same" code in qpois.c, qbinom.c, qnbinom.c --
* FIXME: This is far from optimal [cancellation for p ~= 1, etc]: */
if(!lower_tail || log_p) {
p = R_DT_qIv(p); /* need check again (cancellation!): */
if (p == 0.) return 0;
if (p == 1.) return ML_POSINF;
}
/* temporary hack --- FIXME --- */
if (p + 1.01*DB...
2002 Mar 12
1
rbinom silently rounds size argument (PR#1377)
rbinom (in R-1.4.1) silently rounds its "size" argument.
The C code contains
n = floor(nin + 0.5);
I would argue that this should this either be documented or changed (to
return NA). (The behavior is inconsistent with dbinom).
I sent this in to the devel list a couple of weeks ago to
provoke discussion; no disagreement (or agreement) so I'm
submitting it as a bug.
2000 Nov 16
2
newbee question
Dear All
Where can I lookup good methods to compute
p from q=bin(m,n)p^n*(1-p)^(m-n) such that
q<=alfa, alfa small. Are there such libs,
code and source in R?
Best Regards
--
Jan Burse SIAM, EAWAG
Scheuchzerstr. 67 ?berlandstr. 133
8006 Z?rich 8600 D?bendorf
tel: +41-1-364 17 66 tel: +41-1-823 55 34
1997 Dec 13
1
R-beta: Compile error; R-0.60.1, Solaris 2.6, gcc 2.7.2.1
...unif.o
gcc -g -I../include -c dbeta.c -o dbeta.o
gcc -g -I../include -c pbeta.c -o pbeta.o
gcc -g -I../include -c qbeta.c -o qbeta.o
gcc -g -I../include -c rbeta.c -o rbeta.o
gcc -g -I../include -c dbinom.c -o dbinom.o
gcc -g -I../include -c pbinom.c -o pbinom.o
gcc -g -I../include -c qbinom.c -o qbinom.o
gcc -g -I../include -c rbinom.c -o rbinom.o
gcc -g -I../include -c dcauchy.c -o dcauchy.o
gcc -g -I../include -c pcauchy.c -o pcauchy.o
gcc -g -I../include -c qcauchy.c -o qcauchy.o
gcc -g -I../include -c rcauchy.c -o rcauchy.o
gcc -g -I../include -c dchisq.c -o dchisq.o
g...