search for: dhyperx

Displaying 1 result from an estimated 1 matches for "dhyperx".

Did you mean: dhyper
2004 Nov 24
1
(PR#7393) Re: dhyper() does not allow non-integer values for
...5,90,10) > > # OK > phyper(1,10,90,10) > phyper(1,10.5,90,10) > > # OK > qhyper(0.71,10,90,10) > qhyper(0.71,10.5,90,10) > > # OK > rhyper(1,10,90,10) > rhyper(1,10.5,90,10) > > > > # this "naive" version of dhyper() works > > dhyperx<-function(x,m,n,k,log=3DFALSE){ > lp<-lchoose(m, x) + lchoose(n, k-x) - lchoose( m+n, k) > if (log) {lp} else {exp(lp)} > } > > # OK > dhyperx(1,10,90,10) > dhyperx(1,10.5,90,10) > > > > Erik J=F8rgensen > Danish Institute of Agricultur...