binomControl: Tuning parameters for binom.exact function

View source: R/binomControl.R

binomControlR Documentation

Tuning parameters for binom.exact function

Description

This function produces a list of tuning parameters used in the calculations done by binom.exact and poisson.exact. These will not need to be changed by most ordinary users.

Usage

binomControl(relErr=1+1e-07,tol=.00001,
    pRange=c(1e-10,1-1e-10),
    minn=1, maxn=10^4, 
    PRINT.STEPS=FALSE)

Arguments

relErr

value very close to 1, used in calculation of two-sided p-values

tol

value very close to 0, used in calculation of two-sided confidence intervals

pRange

range close to [0,1], but excluding the endpoints, used in calculation of two-sided confidence intervals

minn

minimum n used by powerBinom. The search for the lowest n that gives power is crude and goes from minn to maxn by ones.

maxn

maximum n used by powerBinom

PRINT.STEPS

logical, print steps of uniroot.integer used to find the n when type='cilength' in powerBinom?

Details

See the code for fisher.test, where the term relErr is hard-coded into the function. The purpose is to avoid problems with ties. It serves the same purpose in this package and probably need not be changed. The value tol indicates the tolerance for the precision of the confidence limits. The value pRange is input into uniroot to give bounds when searching for confidence limits. For poisson limits pRange is transformed using the qgamma function (see code in exactpoissonCI).

Value

A list with containing the following components:

relErr

a number larger than 1

tol

a number greater than 0

pRange

a vector with 2 elements between 0 and 1, exclusive


exactci documentation built on Aug. 24, 2023, 5:11 p.m.