\HeaderA{pair.compare}{Pairwise comparisons of factor levels within GlobalAncova}{pair.compare}
\keyword{models}{pair.compare}
\begin{Description}\relax
Pairwise comparisons of gene expression in different levels of a factor by GlobalAncova tests.
The method uses the reduction in residual sum of squares obtained when two respective factor levels are set to the same level.
Holm-adjusted permutation-based p-values are given.
\end{Description}
\begin{Usage}
\begin{verbatim}
pair.compare(xx, formula, group, model.dat = NULL, test.genes = NULL, perm = 10000)\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{xx}] Matrix of gene expression data, where columns correspond to samples
and rows to genes. The data should be properly normalized beforehand
(and log- or otherwise transformed). Missing values are not allowed.
Gene and sample names can be included as the row and column
names of \code{xx}.
\item[\code{formula}] Model formula for the linear model.
\item[\code{group}] Factor for which pairwise comparisons shall be calculated.
\item[\code{model.dat}] Data frame that contains all the variable information for each sample.
\item[\code{test.genes}] Vector of gene names or a list where each element is a vector of gene names.
\item[\code{perm}] Number of permutations to be used for the permutation approach. The default is 10,000.
\end{ldescription}
\end{Arguments}
\begin{Value}
An ANOVA table, or list of ANOVA tables for each gene set, for the pairwise comparisons.
\end{Value}
\begin{Note}\relax
This work was supported by the NGFN project 01 GR 0459, BMBF, Germany.
\end{Note}
\begin{Author}\relax
Ramona Scheufele \email{ramona.scheufele@charite.de} \\
Reinhard Meister \email{meister@tfh-berlin.de}\\
Manuela Hummel \email{hummel@ibe.med.uni-muenchen.de} \\
Urlich Mansmann \email{mansmann@ibe.med.uni-muenchen.de}
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{GlobalAncova}{GlobalAncova}}, \code{\LinkA{GlobalAncova.decomp}{GlobalAncova.decomp}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(vantVeer)
data(phenodata)
data(pathways)

pair.compare(xx = vantVeer, formula = ~ grade, group = "grade", model.dat = phenodata, test.genes = pathways[1:3], perm = 100)
\end{ExampleCode}
\end{Examples}

