tail.rank.power {TailRank} | R Documentation |
Compute the significance level and the power of a tail-rank test.
tail.rank.power(G, N, psi, phi, conf = 0.95) tail.rank.cutoff(G, N, psi, conf, method = "approx")
G |
An integer; the number of genes being assessed as potnetial biomarkers. Statistically, the number of hypotheses being tested. |
N |
An integer; the number of "test" or "cancer" samples used. |
psi |
A real number between 0 and 1; the desired specificity of the test. |
phi |
A real number between 0 and 1; the sensitivity that one would like to be able to detect, conditional on the specificity. |
conf |
A real number between 0 and 1; the confidence level of the results. Can be obtained by subtracting the family-wise Type I error from 1. |
method |
A character string; either "exact" or "approx". The deafult is to use a Bonferroni approximation. |
A power estimate for the tail-rank test can be obtained as follows. First, let X ~ Binom(N,p) denote a binomial random variable. Under the null hypotheis that cancer is not different from normal, we let p = 1 - psi be the expected proportion of successes in a test of whether the value exceeds the psi-th quantile. Now let
α = P(X > x,| N, p)
be one such binomial measurement. When we make G independent binomial measurements, we take
conf = P(all G of the X's <= x | N, p).
(In our paper on the tail-rank statistic, we write everything in terms of gamma = 1 - conf.) Then we have
conf = P(X <= x | N, p)^G = (1 - alpha)^G.
Using a Bonferroni-like approximation, we can take
conf ~= 1 - α*G.
Solving for α, we find that
α ~= (1-conf)/G.
So, the cutoff that ensures that in multiple experiments, each looking
at G genes in N samples, we have confidence level conf
(or significance level gamma = 1 - conf) of no false positives is
computed by the function tail.rank.cutoff
.
The final point to note is that the quantiles are also defined in terms of q = 1 - α, so there are lots of disfiguring "1's" in the implementation.
Now we set M to be the significance cutoff using the procedure
detailed above. A gene with sensitivity phi gets detected if the
observed number of cases above the threshold is greater than or equal to
M. The tail.rank.power
function implements formula (1.3) of
our paper on the tail-rank test.
tail.rank.cutoff
returns an integer that is the
maximum expected value of the tail rank statistic under the null
hypothesis.
tail.rank.power
returns a real numbe between 0 and 1
that is the power of the tail-rank test to detect a marker with
true sensitivity equal to phi.
Kevin R. Coombes <kcoombes@mdanderson.org>
tail.rank.test
,
tail.rank.power
,
biomarker.power.table
,
matrix.mean
,
tol.bound
psi.0 <- 0.99 confide <- rev(c(0.8, 0.95, 0.99)) ng <- c(100, 1000, 10000, 100000) ns <- c(10, 20, 50, 100, 250, 500) formal.cut <- array(0, c(length(ns), length(ng), length(confide))) for (i in 1:length(ng)) { for (j in 1:length(ns)) { formal.cut[j, i, ] <- tail.rank.cutoff(ng[i], ns[j], psi.0, confide) } } dimnames(formal.cut) <- list(ns, ng, confide) formal.cut phi <- seq(0.1, 0.7, by=0.1) N <- c(10, 20, 50, 100, 250, 500) pows <- matrix(0, ncol=length(phi), nrow=length(N)) for (ph in 1:length(phi)) { pows[, ph] <- tail.rank.power(10000, N, 0.95, phi[ph], 0.9) } pows <- data.frame(pows) dimnames(pows) <- list(as.character(N), as.character(round(100*phi))) pows