\Header{oneway}{Fit One-way Model}
\keyword{dplot}{oneway}
\begin{Description}\relax
Fits a One-way model to univariate data grouped by a factor, the
result often being displayed using \code{rfs}
\end{Description}
\begin{Usage}
\begin{verbatim}
oneway(formula, data, location=mean, spread=function(x) sqrt(var(x)))
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{formula}] formula of the form \code{y \textasciitilde{} x} where \code{y} is the
numeric response and \code{x} is the grouping factor

\item[\code{data}] data frame in which the model is to be evaluated 
\item[\code{location}] function or numeric giving the location statistic to
be used for centering the observations, e.g. \code{median}, 0 (to
avoid centering).

\item[\code{spread}] function or numeric giving the spread statistic to
be used for scaling the observations, e.g. \code{sd}, 1 (to
avoid scaling).

\end{ldescription}
\end{Arguments}
\begin{Value}
A list with components
\begin{ldescription}
\item[\code{location}] vector of locations for each group.
\item[\code{spread}] vector of spreads for each group.
\item[\code{fitted.values}] vector of locations for each observation.
\item[\code{residuals}] residuals (\code{y - fitted.values}).
\item[\code{scaled.residuals}] residuals scaled by \code{spread} for their
group
\end{ldescription}
\end{Value}
\begin{Author}\relax
Deepayan Sarkar \email{deepayan@stat.wisc.edu}
\end{Author}
\begin{SeeAlso}\relax
\code{\Link{rfs}}, \code{\Link{Lattice}}
\end{SeeAlso}

