Learn R Programming

EMA (version 1.4.3)

runTtest: Computing Multiple Student Tests

Description

This function provides a convenient way to compute test statistics, e.g., two-sample Welch t-statistics, t-statistics, paired t-statistics, for each row of a data frame using the multtest package. It returns the raw and adjusted pvalues for each genes as well as the significance of the genes and a quantile-quantile plot.

Usage

runTtest(data,labels,typeFDR="FDR-BH",algo="t", q=0.05, plot=TRUE)

Arguments

data
A matrix, a data frame, or an ExpressionSet object. Each row of 'data' (or 'exprs(data)', respectively) must correspond to a gene, and each column to a sample.
labels
A vector of integers corresponding to observation (column) class labels. For 2 classes, the labels must be 0 and 1.
typeFDR
The method to apply fo the multiple testing correction.
algo
A character string specifying the statistic to be used to test the null hypothesis of no association between the variables and the class labels. If 'test="t"', the tests are based on two-sample Welch t-statistics (unequal variances). The number of d
q
A numeric value specifying the pvalue threshold.
plot
A logical value specifying if drawing plots or not.

Value

  • A matrix with the probes ID, the statistics, the raw p-value and the adjust p-value

See Also

mt.teststat,multiple.correction

Examples

Run this code
## load data
data(marty)

## filtering data
marty <- expFilter(marty, threshold=3.5, graph=FALSE)
##Class label 0/1
marty.type.num <- ifelse(marty.type.cl=="Her2+",0,1)

## run differential analysis on example set
example.subset <- marty[1:100,]
out <- runTtest(example.subset, labels=marty.type.num, typeFDR="FDR-BH", plot=FALSE)

Run the code above in your browser using DataLab