\HeaderA{ma2D}{Stratified bivariate robust local regression}{ma2D}
\keyword{smooth}{ma2D}
\begin{Description}\relax
This function performs robust local regression of a variable \code{z} on predictor variables \code{x} and \code{y}, separately within values of a fourth variable \code{g}. It is used by \code{\LinkA{maNorm2D}{maNorm2D}} for 2D spatial location normalization.
\end{Description}
\begin{Usage}
\begin{verbatim}
ma2D(x, y, z, g, w=NULL, subset=TRUE, span=0.4, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] A numeric vector of predictor variables.
\item[\code{y}] A numeric vector of predictor variables.
\item[\code{z}] A numeric vector of responses.
\item[\code{g}] Variables used to stratify the data.
\item[\code{w}] An optional numeric vector of weights.
\item[\code{subset}] A "logical" or "numeric" vector indicating the subset of points used to compute the fits. 
\item[\code{span}] The argument \code{span} which controls the degree of
smoothing in the  \code{\LinkA{loess}{loess}} function.
\item[\code{...}] Misc arguments
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{z} is regressed on \code{x} and \code{y}, separately within values of \code{g} using the \code{\LinkA{loess}{loess}} function.
\end{Details}
\begin{Value}
A numeric vector of fitted values.
\end{Value}
\begin{Author}\relax
Sandrine Dudoit, \url{http://www.stat.berkeley.edu/~sandrine}.
\end{Author}
\begin{References}\relax
S. Dudoit and Y. H. Yang. (2002). Bioconductor R packages for exploratory analysis and normalization of cDNA microarray data. In G. Parmigiani, E. S. Garrett, R. A. Irizarry and S. L. Zeger, editors, \emph{The Analysis of Gene Expression Data: Methods and Software}, Springer, New York.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{maNormMain}{maNormMain}}, \code{\LinkA{maNorm2D}{maNorm2D}}, \code{\LinkA{loess}{loess}}.
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
# See examples for maNormMain.
\end{ExampleCode}
\end{Examples}


