Function that gives list of algorithm variables used by
borrTest
.
borrControl(nAlphaGrid=10000,nThetaGrid=1000, maxIter=0, digits=4, orderFunc=NULL)
number used for defining grid for searching over the (0,1) space for significance levels.
Used in borrOrderingAlphaGrid
.
number of evenly spaced grid elements for searching over the (0,1) space for theta.
Used in both borrOrderingAlphaGrid
and and borrOrderingByRR
.
maximum number of searches over the alpha space. Used in borrOrderingAlphaGrid
.
number of digits for rounding alpha star values. Used in borrOrderingByRR
.
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
.
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.
# NOT RUN {
borrControl(nThetaGrid=10^3)
# }
Run the code above in your browser using DataLab