R: Algorithm variables used by borrTest.

borrControl {exact2x2} | R Documentation

## Algorithm variables used by borrTest.

### Description

Function that gives list of algorithm variables used by `borrTest`.

### Usage

    borrControl(nAlphaGrid=10000,nThetaGrid=1000, maxIter=0, digits=4, orderFunc=NULL)

### Arguments

`nAlphaGrid` | number used for defining grid for searching over the (0,1) space for significance levels. Used in `borrOrderingAlphaGrid`.
`nThetaGrid` | number of evenly spaced grid elements for searching over the (0,1) space for theta. Used in both `borrOrderingAlphaGrid` and and `borrOrderingByRR`.
`maxIter` | maximum number of searches over the alpha space. Used in `borrOrderingAlphaGrid`.
`digits` | number of digits for rounding alpha star values. Used in `borrOrderingByRR`.
`orderFunc` | character vector to determine function to do the borr ordering. `NULL` checks for precalculated values then does `borrOrderingAlphaGrid`. 'AlphaGrid' uses `borrOrderingAlphaGrid` and 'ByRR' uses `borrOrderingByRR`.

### Details

In `borrOrderingAlphaGrid` we create a grid for searching over the significance level space, for the first calculation (zeroth iteration) we use `alpha.seq` where `alpha.seq <- sort(unique(c( 10 ^ seq(log10(minAlpha), 0, length = nAlphaGrid / 2), seq(minAlpha, 10 ^ 0, length = nAlphaGrid / 2) )))`, where `minAlpha` is the one-sided p-value at the point (x1=n1, x2=0) given by `minAlpha<- dbinom(0,nT,nC/(nC+nT))*dbinom(nC,nC,nC/(nC+nT))`. If there are ties and `maxIter` is greater than 0, then replace each tied value with an equally spaced grid (with nAlphaGrid elements) between the adjacent non-tied values. If the lowest value in the grid, `minAlpha`, is tied, then set `minAlpha<-minAlpha/10` at the beginning of the iteration. Repeat this process up to `maxIter` times.

See borrOrderingInternal for more details of algorithms.

### Examples

    borrControl(nThetaGrid=10^3)

[Package exact2x2 version 1.6.3 Index]