mfay at niaid.nih.gov
2010-Jan-26 18:55 UTC
[Rd] poisson.test from stats package does not pass the conf.level (PR#14195)
Hi, The poisson.test function from stats package does not pass the conf.level parameter 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) Mike --please do not edit the information below-- Version: platform =3D i386-pc-mingw32 arch =3D i386 os =3D mingw32 system =3D i386, mingw32 status =3D major =3D 2 minor =3D 10.1 year =3D 2009 month =3D 12 day =3D 14 svn rev =3D 50720 language =3D R version.string =3D R version 2.10.1 (2009-12-14) Windows XP (build 2600) Service Pack 2 Locale: LC_COLLATE=3DEnglish_United States.1252;LC_CTYPE=3DEnglish_United States.1252;LC_MONETARY=3DEnglish_United States.1252;LC_NUMERIC=3DC;LC_TIME=3DEnglish_United States.1252 Search Path: .GlobalEnv, package:stats, package:graphics, package:grDevices, package:utils, package:datasets, package:methods, Autoloads, package:base ****************************************************************** Michael P. Fay, PhD Mathematical Statistician National Institute of Allergy and Infectious Diseases Tel: 301-451-5124 Fax:301-480-0912 (U.S. postal mail address) 6700B Rockledge Drive MSC 7609 Bethesda, MD 20892-7609 (Overnight mail address) 6700-A Rockledge Drive, Room 5133 Bethesda, MD 20817 http://www3.niaid.nih.gov/about/organization/dcr/BRB/staff/michael.htm ********************************************************************** Disclaimer: The information in this e-mail and any of its attachment...{{dropped:3}}
Peter Dalgaard
2010-Jan-27 22:45 UTC
[Rd] poisson.test from stats package does not pass the conf.level (PR#14195)
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
Seemingly Similar Threads
- exactci package gives exact binomial and poisson tests and matching CI
- exactci package gives exact binomial and poisson tests and matching CI
- New Package: rateratio.test
- New Package: rateratio.test
- [R-pkgs] bpcp package for pointwise confidence intervals for a survival distribution