similar to: A question about the hypergeometric distribution and phyper()

Displaying 20 results from an estimated 1000 matches similar to: "A question about the hypergeometric distribution and phyper()"

2008 Feb 27
1
dhyper, phyper (PR#10853)
Aloha all, I know too little about what I'm about to write and hope I'm not wasting your time. For a class I'm teaching in archaeological data analysis, I'm trying to put together a routine that calculates the so-called Petersen index and, especially, confidence intervals for the index. This was introduced to archaeologists by N.R.J. Fieller and A. Turner in an article
2008 Dec 03
1
hypergeometric
Hi, I hope somebody can help me on how to use the hypergeometric function. I did read through the R documentation on hypergeometric but not really sure what it means. I would like to evaluate the hypergeometric function as follows: F((2*alpha+1)/2, (2*alpha+2)/2 , alpha+1/2, betasq/etasq). I'm not sure which function should be used- either phyper or qhyper or dhyper Where
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 Multivariate hypergeometric distribution to achieve this. eg.:
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
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
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 (called
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 context:
2000 Mar 24
3
quantiles of the hypergeometric distribution (PR#502)
Hello! I use R-version 1.0.0 To get the 0.95 quantile of the hypergeometric distribution 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 >
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.p=F) [1] 0 If I plug in some different values I get a p-value but
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,
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 of this as a bug since it breaks the
2012 Oct 01
1
Retrieve hypergeometric results in large scale
I'm going to use dhyper(x, m, n, k) to get a 95% coverage. Let me use an example to explain my problem: Suppose I have a urn containing 90 red and 10 black balls. Now I wanna remove 3 from the urn. By the following codes: m<-90;n<-10;k<-3; x<-0:3 dhyper(x,m,n,k) I can obtain the probability that 0,1,2,3 red balls will be removed. 0.000742115 0.025046382 0.247680891
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 3121
2004 Nov 24
1
(PR#7393) Re: dhyper() does not allow non-integer values for
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---1936847065-1111238301-1101309010=:193006 Content-Type: TEXT/PLAIN; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Wed, 24 Nov 2004 Erik.Jorgensen@agrsci.dk wrote: > > dhyper() does not allow non-integer
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
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
2003 Oct 01
1
hypergeometric & population estimates
"help" We want to estimate the number of caribou in Jasper. We recently conducted an aerial survey and saw 70 uncollared caribou and 8 of 11 collared caribou. We want to estimate the number of caribou in this population with 95% confidence limits. Gary White uses the hypergeometric distribution and determines the population estimates using maximum likelihood and 95%CL as
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