cc01-0-MultiTtest-class: Class "MultiTtest"

Description Usage Arguments Value Creating objects Slots Methods Author(s) See Also Examples

Description

Class to perform row-by-row t-tests on microarray or proteomics data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
MultiTtest(data, classes, na.rm=TRUE)
## S4 method for signature 'MultiTtest'
summary(object, ...)
## S4 method for signature 'MultiTtest'
as.data.frame(x, row.names=NULL, optional=FALSE, ...)
## S4 method for signature 'MultiTtest'
hist(x, xlab='T Statistics', main=NULL, ...)
## S4 method for signature 'MultiTtest,missing'
plot(x, y, ylab='T Statistics', ...)
## S4 method for signature 'MultiTtest,ANY'
plot(x, y, xlab='T Statistics', ylab=deparse(substitute(y)), ...)

Arguments

data

either a data frame or matrix with numeric values, or an ExpressionSet as defined in the BioConductor tools for analyzing microarray data

classes

If data is a data frame or matrix, then classes must be either a logical vector or a factor. If data is an ExpressionSet, then classes can be a character string that names one of the factor columns in the associated phenoData subobject.

na.rm

logical scalar. If TRUE, compute t-statistics after omitting NA values from individual rows of the data matrix

object

object of class MultiTtest

x

object of class MultiTtest

y

numeric vector

xlab

character string specifying the label for the x axis

ylab

character string specifying the label for the y axis

main

character string specifying the plot title

row.names

see the base version

optional

see the base version

...

extra arguments for generic or plotting routines

Value

The graphical routines invisibly return the object against which they were invoked.

Creating objects

Although objects can be created using new, the preferred method is to use the MultiTtest generator. In the simplest case, you simply pass in a data matrix and a logical vector assigning classes to the columns, and the constructor performs row-by-row two-sample t-tests and computes the associated (single test) p-values. To adjust for multiple testing, you can pass the p-values on to the Bum class.

If you use a factor instead of a logical vector, then the t-test compares the first level of the factor to everything else. To handle the case of multiple classes, see the MultiLinearModel class.

As with other class comparison functions that are part of the OOMPA, we can also perform statistical tests on ExpressionSet objects from the BioConductor libraries. In this case, we pass in an ExpressionSet object along with the name of a factor to use for splitting the data.

Slots

t.statistics:

Object of class numeric containing the computed t-statistics.

p.values:

Object of class numeric containing the computed p-values.

df:

Numeric vector of the degrees of freedom per gene. Introduced to allow for missing data.

groups:

Object of class character containing the names of the classes being compared.

call:

Object of class call containing the function call that created the object.

Methods

summary(object, ...)

Write out a summary of the object.

hist(x, xlab='T Statistics', main=NULL, ...)

Produce a histogram of the t-statistics.

plot(x)

Produces a scatter plot of the t-statistics against their index.

plot(x,y)

Produces a scatter plot of the t-statistics in the object x against the numeric vector y.

Author(s)

Kevin R. Coombes krc@silicovore.com

See Also

matrixT, Bum, Dudoit, MultiLinearModel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
showClass("MultiTtest")
ng <- 10000
ns <- 50
dat <- matrix(rnorm(ng*ns), ncol=ns)
cla <- factor(rep(c('A', 'B'), each=25))
res <- MultiTtest(dat, cla)
summary(res)
hist(res, breaks=101)
plot(res)
plot(res, res@p.values)
hist(res@p.values, breaks=101)

dat[1,1] <- NA
mm <- matrixMean(dat, na.rm=TRUE)
vv <- matrixVar(dat, mm, na.rm=TRUE)
tt <- matrixT(dat, cla, na.rm=TRUE)
mtt <- MultiTtest(dat,cla)

Example output

Loading required package: oompaBase
Class "MultiTtest" [package "ClassComparison"]

Slots:
                                                                       
Name:  t.statistics     p.values           df       groups         call
Class:      numeric      numeric      numeric    character         call

Known Subclasses: "Dudoit", "MultiTtestPaired", "MultiTtestUnequal"
Row-by-row two-sample t-tests with 10000 rows
Positive sign indicates an increase in class: A 

Call: MultiTtest(data = dat, classes = cla) 

T-statistics:
     Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
-4.044723 -0.690665 -0.006479 -0.001559  0.684854  3.666768 

P-values:
     Min.   1st Qu.    Median      Mean   3rd Qu.      Max. 
0.0001892 0.2460818 0.4956192 0.4972294 0.7507269 0.9999624 

ClassComparison documentation built on May 6, 2019, 5:02 p.m.