\HeaderA{designANOVA}{Function to construct design an contrasts matrices for ANOVA models}{designANOVA}
\keyword{methods}{designANOVA}
\begin{Description}\relax
This function takes an object of class \code{\LinkA{maiges}{maiges}} together
with other arguments and construct the matrices of design and
contrasts for adjusting ANOVA models. The design matrix are generated
using the function \code{\LinkA{model.matrix}{model.matrix}}.
\end{Description}
\begin{Usage}
\begin{verbatim}
designANOVA(data=NULL, factors=names(data@Slabels), model=NULL,
            contrasts=NULL, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{data}] object of class \code{\LinkA{maiges}{maiges}}.
\item[\code{factors}] vector of character strings specifying the sample
labels IDs to be used as factors in the models.
\item[\code{model}] a formula specifying the model to be fitted.
\item[\code{contrasts}] character vector specifying the contrasts to be
done. This is done by the function \code{\LinkA{makeContrasts}{makeContrasts}}
from package \emph{limma}. Pay attention that we use the
treatment-control parametrisation.
\item[\code{...}] additional parameters for function \code{\LinkA{model.matrix}{model.matrix}}.
\end{ldescription}
\end{Arguments}
\begin{Value}
The result of this function is an object of class \code{\LinkA{maigesANOVA}{maigesANOVA}}.
\end{Value}
\begin{Author}\relax
Gustavo H. Esteves <\email{gesteves@vision.ime.usp.br}>
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{model.matrix}{model.matrix}}, \code{\LinkA{makeContrasts}{makeContrasts}},
\code{\LinkA{deGenesANOVA}{deGenesANOVA}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## Loading the dataset
data(gastro)

## Constructing a maigesANOVA object for the 'Tissue' sample label using
## default model (simple linear model with intercept) and contrasts (all
## parameters are equal between themselves)
gastro.ANOVA = designANOVA(gastro.summ, factors="Tissue")
gastro.ANOVA
\end{ExampleCode}
\end{Examples}

