Learn R Programming

MAMA (version 1.0.2)

test.group.shuffle: Function to do compute test statistic iterativelly

Description

Function computes test statistic with random assignment of group labels to samples in each iteration. It binds results to one matrix. Finaly it multiplies values of test statistics by -1. It saves a file necessary in MAP-Matches method.

Usage

test.group.shuffle(data, dataname, var=1, minSampleNum = 3, method = "t",B=1000)

Arguments

data
Gene expresion data of class ExpressionSet
dataname
Name of the data set
var
Number specifying column of pData definig groups
minSampleNum
Minimal number of samples required for test statistic
method
Type of test as in mt.teststat
B
Number of iterations

Value

  • matrix of test statistics (with random group assignment and multiplied by -1)

References

Yang, X., Bentink, S. a Spang, R. 2005, Detecting Common Gene Expression Patterns in Multiple Cancer Outcome Entities, Biomedical Microdevices, vol.7:3

See Also

entitybuild2

Examples

Run this code
require(multtest)
data(Singhdata)
exprs<-as.matrix(Singhdata$esets[[1]])
rownames(exprs)<-Singhdata$geneNames
metadata=data.frame(labelDescription=c("Normal/Tumour"), row.names=c("group"))
pData<-data.frame(group=as.factor(Singhdata$classes[[1]]+1))
rownames(pData)<-colnames(exprs)
phenoData<-new("AnnotatedDataFrame", data=pData,varMetadata=metadata)
data<-new("ExpressionSet", exprs=exprs, phenoData=phenoData)

dat.shuf<-test.group.shuffle(data=data, dataname="sample", B=10)

Run the code above in your browser using DataLab