\HeaderA{modelEntry}{Specify a minimum model for step-wise model fitting}{modelEntry}
\keyword{models}{modelEntry}
\begin{Description}\relax
This function allows specification of a minimum model for
the step-wise model fitting procedure in the \pkg{Envisage} GUI. This
can 'force' terms of interest to always be considered in the model for
each gene.
\end{Description}
\begin{Usage}
\begin{verbatim}
  modelEntry(pData, Mentry, useParams, labParams, MEorINT, glm.formula) 
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{pData}] An object of class
\code{\LinkA{phenoData}{phenoData}} containing the
phenotypic information for the experiment.
\item[\code{Mentry}] Object of class \code{tkentry} containing the model
entry field from the \pkg{Envisage} GUI. This is used if the
starting model is specified in the GUI.
\item[\code{useParams}] Character vector containing the variable names to be
used in the model fitting procedure.
\item[\code{labParams}] Output from function
\code{\LinkA{labelParams}{labelParams}}, containing the indices of the
labelling parameters for the
\code{\LinkA{phenoData}{phenoData}} object \code{pData}.
\item[\code{MEorINT}] Character string indicating whether to look at main
effect terms only ('\code{ME}') or main effect and interaction terms
('\code{INT}').
\item[\code{glm.formula}] Object of class \code{formula} containing the
minimal model for the step-wise model fitting procedure.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The \pkg{Envisage} package contains methods allowing the use of 
linear models (LMs) for analysing significantly changing genes in 
experiments with a variety of sources of variation, be they
experimentally controlled variables such as drug treatment or time, or
non-controlled sources of confounding variation such as phenotypic or
environmental differences. This allows all sources of variation to be
considered when analysing for significant differential expression,
ensuring resulting genes are biologically relevent to the experimental
question. 

The function \code{\LinkA{modelEntry}{modelEntry}} is used to set up the
maximum and minimum models for the \pkg{Envisage} step-wise model
fitting procedure. This can be done in one of two ways. If using the
command line interface to \code{\LinkA{envisage}{envisage}}, the model
can be explicitly stated in the command line in the form 
'X ~ var1 + var2:var3 + etc.'. However, if
using the GUI (\code{widget=TRUE}), users can specify the model in
terms of the variable labels (of the form \code{p1}, \code{p2},
\code{p3}, etc. (e.g. \code{p1+p3+p5:p6}). This function processes
these values to give the minimum model for the analysis.

\code{\LinkA{modelEntry}{modelEntry}} is an internal function and is not
designed to be accessed by users.
\end{Details}
\begin{Value}
A list is returned with the followig slots:

\begin{ldescription}
\item[\code{startingModel}] An object of class \code{formula} giving the
minimum model for the the step-wise model fitting procedure.
\item[\code{intPos}] An internal object used to identify the location of
interaction terms within the minimum model.
\end{ldescription}
\end{Value}
\begin{Author}\relax
Sam Robson \email{S.C.Robson@warwick.ac.uk}
\end{Author}
\begin{References}\relax
Robson, S. C., Hunter, E., Bird, H., Turner, H. (2008) 
\emph{Envisage: model-based significance analysis of microarray gene
expression data}, manuscript in preparation
\end{References}
\begin{SeeAlso}\relax
For the main \pkg{Envisage} method, see
\code{\LinkA{envisage}{envisage}}.
\end{SeeAlso}

