[R] Round error?
Bob Wheeler
bwheeler at echip.com
Fri Nov 14 16:26:13 CET 2003
You might try pghyper() in the SuppDists package. It should give the
same values for integer arguments.
Peter Dalgaard wrote:
> Aurora Torrente <aurora at ebi.ac.uk> writes:
>
>
>>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?
>
>
> Could you give us specific x,k,l,n where this happens, please. It
> sounds like it shouldn't happen.
>
--
Bob Wheeler --- http://www.bobwheeler.com/
ECHIP, Inc. ---
Randomness comes in bunches.
More information about the R-help
mailing list