Displaying 20 results from an estimated 2000 matches similar to: "Round error?"
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
2008 Sep 10
1
A question about the hypergeometric distribution and phyper()
Dear All
I have a question about 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
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
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
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.:
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
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
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
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:
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
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
>
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
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
2002 Aug 05
2
options(digits) (PR#1879)
[this message needed manual improvement by the mailing list
administrator since it was `HTMLified' .. ``please do not'']
Apologies for bothering you about a fairly trivial matter. I have been
getting some inconsistencies with the display digits in R V1.5. I have been
using the hypergeometric distribution function, and have found that when
printing out the results from this
2003 Dec 26
2
OC curve in "Quality Control"
Dear all,
Can anyone please help me about any of the following questions:
--------------------------------------------
1. How can i find "factorial" of any number in R? I tried
> prod(170:1) # to find factorial of 170 or 170!
Is it the only procedure - or R has any better process / operational
character to calculate factorial? Also, is it possible to calculate
factorial of 500? Or
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,
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
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