Displaying 20 results from an estimated 57 matches for "phyper".
Did you mean:
hyper
2013 Mar 15
2
phyper returning zero
Hi,
I am attempting to use phyper to test the significance of two overlapping lists. I keep getting a zero and wondered if that was determining non-significance of my overlap or a p-value too small to calculate?
overlap = 524
lista = 2784
totalpop = 54675
listb = 1296
phyper(overlap, lista, totalpop, listb,lower.tail = FALSE, log...
2008 Sep 10
1
A question about the hypergeometric distribution and phyper()
...out the hypergeomteric distribution.
Example 1: I have a universe of 6187 objects, and 164 have a particular
attribute, therefore 6187-164 do not have that attribute. I sample 249
of those objects, and find that 19 have that attribute. I get a p-value
here (looking at just over-representation):
phyper(19, 164, 6187-164, 249, lower.tail=FALSE)
[1] 7.816235e-06
Example 2: I have a universe of 6187 objects, and 12 have a particular
attribute, therefore 6187-12 do not have that attribute. I sample 249
of those objects, and find that 4 have that attribute. I get a p-value
here (looking at just ove...
2007 Oct 02
1
phyper returns negative results
Dear R-users,
In R 2.5.1 on Windows XP, SP2 the call to phyper(0,0,74,3,lower.tail=FALSE) returns -4.195862e-17. This does not happen with R2.5.1 on Linux, 0 is returned. Is this a bug (and should be reported as such), since phyper should not return negative values, or is this considered as one of the annoyances of finite precision arithmetic.
I tend to think...
2004 Apr 15
0
phyper accuracy and efficiency (PR#6772)
Full_Name: Morten Welinder
Version: snapshot
OS:
Submission from: (NULL) (65.213.85.218)
Time to kick phyper's tires...
The current version has very serious cancellation issues. For example, if you
ask
for a small right-tail you are likely to get total cancellation. For example
phyper(59, 150, 150, 60, FALSE, FALSE) gives 6.372680161e-14. The right answer
is
dhyper(0, 150, 150, 60, FALSE) which is...
2008 Feb 27
1
dhyper, phyper (PR#10853)
...ulative
hypergeometric probabilities (i.e. the summation of probabilities
given by equation 3.1 of Seber, 1973)." The reference is to G.A.F.
Seber's book, The Estimation of Animal Abundance.
I went to equation 3.1 and wrote a small function to sum its
probabilities, modeled after phyper() and taking the arguments in the
same order (the names have changed to suit the archaeological
situation):
> seber <- function(p,l,n,r)
> {
> y <- 0
> for (x in 0:p)
> y <- y + exp(lchoose(l,x) + lchoose(n-l,r-x) - lchoose(n,r))
> y
> }
Whe...
2006 Jan 18
1
phyper returns 1 if x==k (PR#8499)
Full_Name: Utz J. Pape
Version: 2.2.0
OS: linux
Submission from: (NULL) (141.14.23.12)
If I use phyper and set parameter x equal to k (meaning that all balls I draw
are white) phyper returns 1 which is not (always) correct:
pape at xxx:~> R2.2.0 --vanilla
R : Copyright 2005, The R Foundation for Statistical Computing
Version 2.2.0 (2005-10-06 r35749)
ISBN 3-900051-07-0
R is free software and...
2004 Feb 04
3
number point under-flow
Hello,
I've come across the following situation in R-1.8.1 (compile + running under
RedHat 7.1):
> phyper(24, 514, 5961-514, 53, lower.tail=T)
[1] 1
> phyper(24, 514, 5961-514, 53, lower.tail=F)
[1] -1.037310e-11
I'd expect the later to be 0 or some very small positive number. Is this a
number under-flow of the calculation? Do you think I'm safe if I just set the
result to 0 in these cases?...
2010 Mar 30
1
Multivariate hypergeometric distribution version of phyper()
Dear R Users,
I employed the phyper() function to estimate the likelihood that the
number of genes overlapping between 2 different lists of genes is due to
chance. This appears to work appropriately.
Now i want to try this with 3 lists of genes which phyper() does not
appear to support.
Some googling suggests i can utilize the M...
2008 Jan 15
0
FDR for hypergeometric tests
Dear list,
I have performed several tests for the hypergeometric distribution
using phyper() for some gene annotation categories as follows
>phyper(26,830,31042,337, lower.tail=F)
>phyper(16,387,31042,337, lower.tail=F)
.
.
.
I am only running some selected categories but I would like to correct
this value for multiple testing since I
have 3121 possible tests according to 31...
1998 Apr 03
1
R-beta: Bug in dhyper (and phyper) (fwd)
Last night I sent the bug report below to r-help. I have since then looked
at dhyper.c and found:
if (NR < 0 || NB < 0 || n <= 0 || n > N)
DOMAIN_ERROR;
I changed 'n <= 0' to 'n < 0' and then dhyper worked as I wanted. Am I
introducing some potentially dangerous behaviour by this change?
Goran
1998 Feb 23
0
R-beta: Hypergeometric Probabilities
In both versions of R to which I currently have access (R-0.16.1 and
R-0.61.1), "phyper" stops returning correct cumulative probabilities as the
parameters of the hypergeometric distribution get large. For example, when
N1=1345, N2=1055, and n=1330, phyper returns either 0 or 1, and nothing in
between.
Looking at phyper.c, it's clear what's happening. First a term (calle...
2003 Nov 14
2
Round error?
Hi all,
I have tried to compute a p-value for a hypergeometric distribution as:
dhyper(x,k,l,n) + phyper(x,k,l,n,lower.tail=FALSE)
and sometimes obtained negative values. Do you know if it is because a
round error or am I doing something wrong?
Thanks in advance,
Aurora
2010 Aug 13
1
hypergeometric vs fisher.test
Dear R team,
I have a simple question.
I tried this command:
phyper(17,449,19551,181, FALSE)
[1] 1.47295e-07
and then I tried this command:
(fisher.test(matrix(c(17,449,181,19551),2,2),
alternative='greater'))$p.value
[1] 3.693347e-06
Shouldn't be identical the results of the two commands ?
What is the difference ?
Thx a lot
--
View this message in...
2000 Mar 24
3
quantiles of the hypergeometric distribution (PR#502)
...with the parameters m=45000,n=5000 and
k=600 I use the R-command
> qhyper(0.95,45000,5000,600).
The value obtained is 600. However, the true value
is 552. The latter can be obtained for example by
calling the corresponding distribution function
with the R commands
> x<-540:580
> phyper(x,45000,5000,600)
The value 552 is obtained also by the usual normal
approximation.
Overall, it seems that R produces errors when calling
qhyper(p,m,n,k) for large values of the parametes
m,n or k.
Sincerely
L. Baringhaus
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-....
2005 Nov 18
2
(no subject)
Hi,
I need to run a Fisher's exact test on thousands of 2x2 contingency tables, and
repeat this process several thousand times (this is a part of the permutation
test for a genome-wide association study).
How can I run this process most efficiently? Is there any way to optimize R code?
I have my data in a 2x2xN array (N ~ 5 K; eventually N will be ~ 500 K), and use
apply inside the loop:
2000 Jun 15
1
proportions - finite population correction
> Dear R-users!
>
> I am using R 1.0.0 and Windows NT 4.0.
>
Suppose I have a population of N=100 subjects, a binomial variable and a
random sample of n=20 subjects from my population, giving 15 "successes". I
am interested in obtaining a confidence interval for the proportion of
"successes" in my population.
In R, I can use
> library(ctest)
>
2004 Jul 07
1
negative p-value from fisher.test() (PR#7064)
Full_Name: Anja von Heydebreck
Version: 1.9.1
OS: Linux
Submission from: (NULL) (155.250.128.25)
I obtained a negative p-value from the fisher.test() function:
> fisher.test(matrix(c(14576,3023,89,68),2), alternative="g")$p.value
[1] -8.426593e-13
With R 1.8.1, I got a p-value of -6.239231e-12 for this example.
Anja von Heydebreck
2006 Mar 28
2
R 2.3.0 (alpha) on FreeBSD 6.1 fails make check-all
Hi Developers,
The alpha, compiles successfully, but it is failing make check-all (on
two seperate machines, both FreeBSD 6.1).
Here is the version string:
platform i386-unknown-freebsd6.1
arch i386
os freebsd6.1
system i386, freebsd6.1
status alpha
major 2
minor 3.0
year 2006
month 03
day 27
svn rev
2008 Aug 21
1
pnmath compilation failure; dylib issue?
...geom.o dhyper.o
dlnorm.o dlogis.o dnbeta.o dnbinom.o dnchisq.o dnf.o dnorm.o dnt.o
dpois.o dt.o dunif.o dweibull.o fmax2.o fmin2.o ftrunc.o gamma.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...
2013 Mar 21
2
Displaying median value over the horizontal(median)line in the boxplot
Hi,
set.seed(45)
test1<-data.frame(columnA=rnorm(7,45),columnB=rnorm(7,10)) #used an example probably similar to your actual data
apply(test1,2,function(x) sprintf("%.1f",median(x)))
#columnA columnB
# "44.5"? "10.2"
par(mfrow=c(1,2))
lapply(test1,function(x) {b<-