Description Usage Arguments Details Creating Objects Slots Methods Author(s) References See Also Examples
Compute rowbyrow means and variances for a data matrix whose columns belong to two different groups of interest.
1 2 3 4 5 6 7 8 9 10 11  TwoGroupStats(data, classes, name=comparison, name1=A, name2=B)
## S4 method for signature 'TwoGroupStats'
as.data.frame(x, row.names=NULL, optional=FALSE)
## S4 method for signature 'TwoGroupStats'
summary(object, ...)
## S4 method for signature 'TwoGroupStats'
print(x, ...)
## S4 method for signature 'TwoGroupStats'
show(object)
## S4 method for signature 'TwoGroupStats,missing'
plot(x, main=x@name, useLog=FALSE, ...)

data 
Either a data frame or matrix with numeric values or an

classes 
If 
name 
A character string; the name of this object 
name1 
A character string; the name of the first group 
name2 
A character string; the name of the second group 
x 
A 
row.names 
See the base version of 
optional 
See the base version of 
object 
A 
main 
Plot title 
useLog 
a logical flag; should the values be logtransformed before plotting? 
... 
The usual extra arguments to generic functions 
This class was one of the earliest developments in our suite of tools to analyze microarrays. Its main purpose is to segregate out the preliminary computation of summary statistics on a rowbyrow basis, along with a set of plots that could be generated automatically and used for quality control.
Although objects of the class can be created by a direct call to
new, the preferred method is to use the
TwoGroupStats
generator. The inputs to this
function are the same as those used for rowbyrow statistical tests
throughout the ClassComparison package; a detailed description can be
found in the MultiTtest
class.
One should note that this class serves as the front end to the
SmoothTtest
class, providing it with an interface that
accepts ExpressionSet
objects compatible with the other statistical tests in the
ClassComparison package.
mean1
:numeric vector of means in the first group
mean2
:numeric vector of means in the second group
overallMean
:numeric vector of overall row means
var1
:numeric vector of variances in the first group
var2
:numeric vector of variances in the second group
overallVar
:numeric vector of variances assuming the two groups have the same mean
pooledVar
:numeric vector of rowbyrow pooled variances, assuming the two groups have the same variance but different means
n1
:numeric scalar specifying number of items in the first group
n2
:numeric scalar specifying number of items in the second group
name1
:character string specifying name of the first group
name2
:character string specifying name of the second group
name
:character string specifying name of the object
Collect the numeric vectors from the object into a single dat fame, suitable for printing or exporting.
Write out a summary of the object.
Print the object. (Actually, it only prints a
summary, since the whole object is almost always more than you
really want to see. If you insist on printing everything, use
as.data.frame
.)
Print the object (same as print method).)
This function
actually produces six different plots of the data, so it is
usually wrapped by a graphical layout command like
par(mfrow=c(2,3))
. The first two plots show the relation
between the mean and standard deviation for the two groups
separately; the third plot does the same for the overall mean and
variance. The fourth plot is a BlandAltman plot of the difference
between the means against the overall mean. (In the microarray
world, this is usually called an MvsA plot.) A loess fit is
overlaid on the scatter plot, and points outside confidence bounds
based on the fit are printed in a different color to flag them as
highly variable. The fifth plot shows a loess fit (with confidence
bounds) of the difference as a function of the row index (which
often is related to the geometric position of spots on a
microarray). Thus, this plot gives a possible indication of regions
of an array where unusual things happen. The final plot compares
the overall variances to the pooled variances.
Kevin R. Coombes krc@silicovore.com
Altman DG, Bland JM.
Measurement in Medicine: the Analysis of Method Comparison Studies.
The Statistician, 1983; 32: 307317.
1 2 3 4 5 6 7 8 9 10 11 
Loading required package: oompaBase
Class "TwoGroupStats" [package "ClassComparison"]
Slots:
Name: mean1 mean2 overallMean var1 var2 overallVar
Class: numeric numeric numeric numeric numeric numeric
Name: pooledVar n1 n2 name1 name2 name
Class: numeric numeric numeric character character character
first group: 15 second group: 15
mean1 mean2 overallMean var1
Min. : 5.718 Min. : 5.280 Min. :5.965 Min. : 2.069
1st Qu.: 7.469 1st Qu.: 7.500 1st Qu.:7.620 1st Qu.: 6.589
Median : 7.977 Median : 7.974 Median :7.989 Median : 8.531
Mean : 8.002 Mean : 7.992 Mean :7.997 Mean : 8.988
3rd Qu.: 8.510 3rd Qu.: 8.522 3rd Qu.:8.378 3rd Qu.:11.146
Max. :10.815 Max. :10.371 Max. :9.475 Max. :24.170
var2 overallVar pooledVar
Min. : 2.030 Min. : 3.128 Min. : 2.866
1st Qu.: 6.679 1st Qu.: 7.351 1st Qu.: 7.359
Median : 8.815 Median : 8.750 Median : 8.774
Mean : 9.143 Mean : 9.043 Mean : 9.065
3rd Qu.:11.267 3rd Qu.:10.604 3rd Qu.:10.589
Max. :30.089 Max. :21.169 Max. :21.874
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.