\HeaderA{predict.lqs}{Predict from an lqs Fit}{predict.lqs}
\keyword{models}{predict.lqs}
\begin{Description}\relax
Predict from an resistant regression fitted by \code{lqs}.
\end{Description}
\begin{Usage}
\begin{verbatim}
## S3 method for class 'lqs':
predict(object, newdata, na.action = na.pass, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] object inheriting from class \code{"lqs"}

\item[\code{newdata}] matrix or data frame of cases to be predicted or, if \code{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 \code{newdata} is missing, an attempt will be
made to retrieve the data used to fit the \code{lqs} object.

\item[\code{na.action}] function determining what should be done with missing
values in \code{newdata}.  The default is to predict \code{NA}.
\item[\code{...}] arguments to be passed from or to other methods.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This function is a method for the generic function
\code{predict()} for class \code{lqs}.
It can be invoked by calling \code{predict(x)} for an
object \code{x} of the appropriate class, or directly by
calling \code{predict.lqs(x)} regardless of the
class of the object.

Missing values in \code{newdata} are handled by returning \code{NA} if the
linear fit cannot be evaluated. If \code{newdata} is omitted and
the \code{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}\relax
B.D. Ripley
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{lqs}{lqs}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
set.seed(123)
fm <- lqs(stack.loss ~ ., data = stackloss, method = "S", nsamp = "exact")
predict(fm, stackloss)
\end{ExampleCode}
\end{Examples}

