Bug 14195 - poisson.test from stats package does not pass the conf.levelparameter for the two-sample test
poisson.test from stats package does not pass the conf.levelparameter for th...
Status: CLOSED FIXED
Product: R
Classification: Unclassified
Component: Analyses
old
ix86 (32-bit) Windows 32-bit
: P5 normal
Assigned To: Jitterbug compatibility account
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-01-27 00:49 UTC by Jitterbug compatibility account
Modified: 2010-01-27 00:49 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jitterbug compatibility account 2010-01-27 00:49:49 UTC
From: "Fay, Michael (NIH/NIAID) [E]" <mfay@niaid.nih.gov>
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=.95)$conf.int
poisson.test(c(2,4),c(20,14),conf.level=.9)$conf.int


Here is the solution, change:

        RVAL <- binom.test(x, sum(x), r * T[1]/(r * T[1] + T[2]),
            alternative = alternative)

to:

        RVAL <- binom.test(x, sum(x), r * T[1]/(r * T[1] + T[2]),
            alternative = alternative, conf.level=conf.level)



Mike

--please do not edit the information below--

Version:
 platform = i386-pc-mingw32
 arch = i386
 os = mingw32
 system = i386, mingw32
 status =
 major = 2
 minor = 10.1
 year = 2009
 month = 12
 day = 14
 svn rev = 50720
 language = R
 version.string = R version 2.10.1 (2009-12-14)

Windows XP (build 2600) Service Pack 2

Locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_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:11}}

Comment 1 Jitterbug compatibility account 2010-01-28 13:29:33 UTC
Audit (from Jitterbug):
Thu Jan 28 07:29:33 2010	ripley	moved from incoming to Analyses-fixed