\Header{predict.lqs}{Predict from an lqs Fit}
\keyword{models}{predict.lqs}
\begin{Usage}
\begin{verbatim}
predict.lqs(object, newdata)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{object}] object inheriting from class \texttt{lqs}

\item[\texttt{newdata}] matrix or data frame of cases to be predicted or, if object
has a formula, a data frame with columns of the same names as the
variables used. A vector will be interpreted
as a row vector.  If \texttt{newdata} is missing, an attempt will be
made to retrieve the data used to fit the \texttt{lqs} object.

\end{ldescription}
\end{Arguments}
\begin{Description}
Predict from an resistant regression fitted by \texttt{lqs}.\end{Description}
\begin{Details}
This function is a method for the generic function
\texttt{predict()} for class \texttt{lqs}.
It can be invoked by calling \texttt{predict(x)} for an
object \texttt{x} of the appropriate class, or directly by
calling \texttt{predict.lqs(x)} regardless of the
class of the object.

Missing values in \texttt{newdata} are handled by returning \texttt{NA} if the
linear discriminants cannot be evaluated. If \texttt{newdata} is omitted and
the \texttt{na.action} of the fit omitted cases, these will be omitted on the
prediction.\end{Details}
\begin{Value}
A vector of predictions.\end{Value}
\begin{Author}
B.D. Ripley\end{Author}
\begin{SeeAlso}
\texttt{\Link{lqs}}\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(stackloss)
.Random.seed <- 1:4
fm <- lqs(stack.loss ~ ., data=stackloss, method="S", nsamp="exact")
predict(fm, stackloss)
\end{ExampleCode}
\end{Examples}

