globaltest {globaltest}R Documentation

Global Test

Description

In microarray data, tests whether a given group of genes is significantly associated with a given clinical variable.

Usage

 globaltest(X, Y, test.genes = NULL, model = 'logistic', 
                            permutation = FALSE, nperm = NULL) 

Arguments

X A matrix of gene expression data, where columns correspond to samples and rows to genes. The data should be properly normalized beforehand (and log- or otherwise transformed), but missing values are allowed (coded as NA). Gene and sample names can be included as the row and column names of X.
Y A vector with the clinical outcome of interest, having one value for each sample.
test.genes Indicates the group of genes to be tested. test.genes can be given in two formats. Either it can be a vector with 1 (TRUE) or 0 (FALSE) for each gene in X, with 1 indicating that the gene belongs to the group. Or it can be a vector containing the column numbers (in X) of the genes belonging to the group. The default is to test all genes.
model Indicates the model the test uses: Use model = 'logistic' for a two-valued outcome Y (the default) or model = 'linear' for a continuous outcome.
permutation A logical flag. If TRUE permutations are used to calculate the p-value, if FALSE (the default) the formula's based on asymptotic theory are used. Choose permutation = TRUE for small sample sizes.
nperm The number of permutations to be used. The default is 10,000. If a number is specified for nperm, permutation is automatically set to TRUE.

Details

The Global Test tests whether a group of genes (of any size from one single gene to all genes on the array) is significantly associated with a clinical outcome. The group could be for example a known pathway, an area on the genome or all genes. For a significant result it is not important if the genes in the group are positively or negatively correlated with the outcome. More precisely the test investigates whether samples with similar clinical outcomes tend to have similar gene expression patterns.

Value

The function returns an object of type gt.result.

Note

If the number of rows of X does not match the length of the vector Y, but the number of columns does, the matrix X given is tacitly replaced by t(X) to make X and Y match. A warning is printed if X is square.

Author(s)

Jelle Goeman: j.j.goeman@lumc.nl.

References

J. J. Goeman, S.A. van de Geer, F. de Kort and J. C. van Houwelingen, A global test for association of a group of genes with a clinical outcome, Technical Report MI 2003-03, Mathematical Institute, Leiden University. Available from http://www.math.leidenuniv.nl/~jgoeman.

See Also

geneplot, regressionplot, checkerboard, permutations, gt.result.

Examples

    if(interactive()){
        data(exampleX)      # Expression data (40 samples; 1000 genes)
        data(exampleY)      # Clinical outcome for the 40 samples
        pathway <- 1:25     # A pathway contains genes 1 to 25
        gt <- globaltest(exampleX, exampleY, test.genes = pathway)
        gt

        # For comparison: test all genes:
        gt <- globaltest(exampleX, exampleY)
        gt
    
        # For comparison: the permutation version:
        gt <- globaltest(exampleX, exampleY, test.genes = pathway, 
                                                permutation = TRUE)
        gt
   
        permutations(gt)
    }


[Package Contents]