Learn R Programming

dualKS (version 1.32.0)

dksPerm: Estimate significance of signature scores.

Description

The distribution of Kolmogorov Rank Sum scores generated by this package depends on a variety of factors including the size of the signature and the total number of genes measured in each sample. For a given classifier, this function bootstraps an approximate distribution for the scores and then identifies optimum parameters for the gamma distribution that best fits the bootstrap distribution. The corresponding gamma probability function is then returned, allowing p-values for one or more scores to be readily computed.

Usage

dksPerm(eset, class, n=100, samples=100, type="up", rescale=FALSE, verbose=FALSE, method="kort")

Arguments

eset
An ExpressionSet or matrix containing the gene expression data to be used for bootstrapping.
class
A factor with two or more levels indicating which class each sample in the expression set belongs OR an integer indicating which column of pData(eset) contains this information.
n
The number of genes per class to use in the bootstrap signature.
samples
The number of bootstrap samples to generate. A value of at least 1000 give good results, but may take a a while.
type
One of "up", "down", or "both". See dksTrain.
rescale
Logical indicating whether scores should be rescaled to range c(0,1).
verbose
Set to TRUE if you want more evidence of progress while data is being processed. Set to FALSE if you want your CPU cycles to be used on analysis and not printing messages.
method
One of either 'kort' or 'yang'. Should match that used for dksTrain.

Value

A function (1-pgamma(x, ...)) with the appropriate parameters preset based on log likelihood maximization relative to the bootstrapped distribution.

See Also

dksTrain, dksSelectGenes, dksClassify, DKSGeneScores, DKSPredicted, DKSClassifier

Examples

Run this code

	data("dks")
	p.value <- dksPerm(eset, 1, samples=25)
	# this is not nearly enough samples, but will suffice for 
	# the demonstration.  See the vignette for more informative 
	# example.
	p.value(250)
	p.value(1500)

Run the code above in your browser using DataLab