tr00-TailRankTest-class: The TailRankTest Class

TailRankTest-classR Documentation

The TailRankTest Class

Description

This is the class representation for the results of a tail-rank test to find biomarkers in a microarray data set. It includes methods for summarizing and plotting the results of the test.

Creating objects

Although objects can be created, as usual, using new, the only reliable way to create valid objects is to use the TailRankTest function. See the description of that function for details on how the tail-rank test works.

Slots

statistic:

a numeric vector containng the tail-rank statistic for each row (gene) in a microarray data set

direction:

a character string representing the direction of the test; can be "up", "down", or "two-sided"

N1:

an integer; the numnber of samples in the "base" or "healthy" group

N2:

an integer; the number of samples in the "test" or "cancer" group

specificity:

a real number between 0 and 1; the desired specificity used in the test to estimate a quantile from the "base" group

tolerance:

a real number between 0 and 1; the upper tolerance bound used to estimate the threshold

confidence:

a real number between 0 and 1; the confidence level that there are no false positives

cutoff:

an integer; the maximum expected value of the statistic under the null hypothesis

model:

a character string describing the model (binomial or beta-binomial) used to decide on cutoffs for significance

tau:

a numeric vector or NULL; gene-by-gene upper bounds for significance

rho:

a numeric vector or NULL; gene-by-gene lower bounds for significance

Methods

summary(object, ...)

Display a summary of the TailRankTest object

hist(x, overlay, ...)

Plot a histogram of the statistic in the TailRankTest object x. The optional argument overlay is a logical flag. If overlay=TRUE, then the histogram is overlain with a curve representing the null distribution. The default value of overlay is FALSE.

as.logical(x, ...)

Convert the TailRankTest object x into a logical vector, which takes on a TRUE value whenever the tail-rank statistic exceeds the significance cutoff.

getStatistic(object, ...)

Obtain the vector of tail-rank statistics contained in object.

Author(s)

Kevin R. Coombes <krc@silicovore.com>

See Also

TailRankTest, tailRankPower, biomarkerPowerTable, matrixMean, toleranceBound

Examples

# generate some fake data to use in the example
nr <- 40000
nc <- 110
fake.data <- matrix(rnorm(nr*nc), ncol=nc)
fake.class <- rep(c(TRUE, FALSE), c(40, 70))

# perform the tail-rank test
null.tr <- TailRankTest(fake.data, fake.class)

# get a summary of the results
summary(null.tr)

# plot a histogram of the statistics
hist(null.tr, overlay=TRUE)

# get the actual statistics
stats <- getStatistic(null.tr)

# get a vector that selects the "positive" calls for the test
is.marker <- as.logical(null.tr)

# the following line should evaluate to the number of rows, nr = 40000
sum( is.marker == (stats > null.tr@cutoff) )

TailRank documentation built on Jan. 13, 2023, 3:02 a.m.