View source: R/borrFunctions.R
borrControl | R Documentation |
Function that gives list of algorithm variables used by
borrTest
.
borrControl(nAlphaGrid=10000,nThetaGrid=1000, maxIter=0, digits=4, orderFunc=NULL)
nAlphaGrid |
number used for defining grid for searching over the (0,1) space for significance levels.
Used in |
nThetaGrid |
number of evenly spaced grid elements for searching over the (0,1) space for theta.
Used in both |
maxIter |
maximum number of searches over the alpha space. Used in |
digits |
number of digits for rounding alpha star values. Used in |
orderFunc |
character vector to determine function to do the borr ordering. |
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.
borrControl(nThetaGrid=10^3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.