p.dalgaard at biostat.ku.dk
2010-Jan-27 22:50 UTC
[Rd] poisson.test from stats package does not pass the conf.level (PR#14197)
mfay at niaid.nih.gov wrote:> Hi, > > The poisson.test function from stats package does not pass the conf.level p> arameter for the two-sample test. Here is an example: > > poisson.test(c(2,4),c(20,14),conf.level=3D.95)$conf.int > poisson.test(c(2,4),c(20,14),conf.level=3D.9)$conf.int > > > Here is the solution, change: > > RVAL <- binom.test(x, sum(x), r * T[1]/(r * T[1] + T[2]), > alternative =3D alternative) > > to: > > RVAL <- binom.test(x, sum(x), r * T[1]/(r * T[1] + T[2]), > alternative =3D alternative, conf.level=3Dconf.level)Now fixed in 2.10.1 patched and R-devel. Thanks. -- O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907