Comparative proportions {globaltest} | R Documentation

## Comparative proportions for the Global Test

### Description

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

### Usage

    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

        # 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)

[Package globaltest version 5.46.0 Index]