comparative: Comparative proportions for the Global Test

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/comparative.R

Description

Comparing the result of a global test performed on a subset to the test results of random subsets of the same size.

Usage

1
comparative(object, N = 1e3, z.scores = TRUE, trace)

Arguments

object

A gt.object, usually one in which one or more subsets of a large number of covariates were tested.

N

The number of random subsets to generate.

z.scores

If set to TRUE, compares the subset to random subsets on the basis of the z-scores of the test. If FALSE, uses the p-values instead.

trace

If set to TRUE, reports progress information. The default is to set trace to TRUE if R is in interactive mode and more than one comparative proportion is to be calculated.

Details

In a situation when many covariates out of a large set are associated with the response, it is sometimes interesting to know p-value of the tested subset compares to random subsets of the same size. The comparative function calculates the proportion of random subsets of the covariates of the same size as the tested subset that have a better score than the tested subset. This proportion is a diagnostic tool to help interpret the test result; it should not be interpreted as a p-value.

Value

An object of class gt.object with an appropriate column added to the test results matrix.

Author(s)

Jelle Goeman: j.j.goeman@lumc.nl; Jan Oosting

References

The comparative proportion is an enrichment type analysis. For the pros and cons of such an analysis, see

Goeman and Buhlmann (2007) Analyzing gene expression data in terms of gene sets: methodological issues. Bioinformatics 23 (8) 980-987.

See Also

The gt function. The gt.object function and useful functions associated with that object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
    # Simple examples with random data here
    # Real data examples in the Vignette

    # Random data: covariates A,B,C are correlated with Y
    set.seed(1)
    Y <- rnorm(20)
    X <- matrix(rnorm(200), 20, 10)
    X[,1:3] <- X[,1:3] + Y
    colnames(X) <- LETTERS[1:10]

    # Some subsets of interest
    my.sets <- list(c("A", "B"), c("C","D"), c("D", "E"))

    # Comparative proportions
    res <- gt(Y, X, subsets = my.sets)
    comparative(res)
    comparative(res, z.scores=FALSE)

globaltest documentation built on Nov. 8, 2020, 8:18 p.m.