\HeaderA{stat.ChurSap}{Apply Sapir and Churchills single slide method}{stat.ChurSap}
\keyword{models}{stat.ChurSap}
\begin{Description}\relax
Applies Sapirs and Churchills single slide method.
\end{Description}
\begin{Usage}
\begin{verbatim}
stat.ChurSap(RG,layout,pp=0.95,norm="p", pout=TRUE, image.id=1,...)

\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{RG}] a list with 4 elements, each represents a matrix with p rows for p
genes and n columns for n slides. \\
The first element "R" contains the raw red intensities from slide
i=1,...,n .\\
Similarly, the second element "G" contains the raw green
intensities. \\
The third element "Rb"  contains the background red intensities and \\
the fourth element "Gb" contains the  background green intensities.\\
This list structure can be generated by the interactive function
\code{\LinkA{init.data}{init.data}}. 
\item[\code{layout}] a list specifying the dimensions of the spot matrix and the grid
matrix.  This can be generated by calling \code{\LinkA{init.grid}{init.grid}}.
\item[\code{pp}] Posterior probability of being differentially
expressed. Defaults to 0.95
\item[\code{image.id}] Specifies image to which Chen's method will be applied.
\item[\code{norm}] Character string, one of "n", "m", "l", "p" or "s".  This
argument specifies the type of normalization method to be performed:
"n" no normalization between the 2 channels; "m"
\code{\LinkA{median}{median}} normalization, which sets the median of log
intensity ratios to zero; "l" global \code{\LinkA{lowess}{lowess}}
normalization; "p" print-tip group lowess normalization and "s"
scaled print-tip group lowess normalization. The default method is
set to print-tip normalization.
\item[\code{pout}] if TRUE, an M vs. A plot will be produced with limits due
to Churchill and Sapir at the specified posterior probability level. If FALSE, return a list with pertinant information
\item[\code{...}] additional graphical parameters
\end{ldescription}
\end{Arguments}
\begin{Value}
List containing the following components:

\begin{ldescription}
\item[\code{limits}] the positive value of the limit at the posterior
probability value of pp
\item[\code{theta}] parameters estimated by EM algorithm, specifically a
mixing proportion and a variance
\item[\code{pp}] Posterior probabilities of being differentially expressed
given observed data for each gene.
\end{ldescription}
\end{Value}
\begin{Author}\relax
Ben Bolstad, \email{bolstad@stat.berkeley.edu}
\end{Author}
\begin{References}\relax
Sapir and Churchill(2000), Estimating the posterior probability of
differential gene expression from microarray data . \url{http://www.jax.org/research/churchill/}
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{stat.Chen}{stat.Chen}},\code{\LinkA{stat.Newton}{stat.Newton}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(MouseArray)
##mouse.setup <- init.grid() 
##mouse.data <- init.data() ## see \emph{init.data}
stat.ChurSap(mouse.data,mouse.setup,pp=0.95,image.id=3)
\end{ExampleCode}
\end{Examples}

