Rev 15720 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% file lqs/man//predict.lqs.Rd% copyright (C) 1999 B. D. Ripley%\name{predict.lqs}\alias{predict.lqs}\title{Predict from an lqs Fit}\description{Predict from an resistant regression fitted by \code{lqs}.}\usage{\method{predict}{lqs}(object, newdata, \dots)}\arguments{\item{object}{object inheriting from class \code{"lqs"}}\item{newdata}{matrix or data frame of cases to be predicted or, if objecthas a formula, a data frame with columns of the same names as thevariables used. A vector will be interpretedas a row vector. If \code{newdata} is missing, an attempt will bemade to retrieve the data used to fit the \code{lqs} object.}\item{\dots}{arguments to be passed from or to other methods.}}\value{A vector of predictions.}\details{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 anobject \code{x} of the appropriate class, or directly bycalling \code{predict.lqs(x)} regardless of theclass of the object.Missing values in \code{newdata} are handled by returning \code{NA} if thelinear discriminants cannot be evaluated. If \code{newdata} is omitted andthe \code{na.action} of the fit omitted cases, these will be omitted on theprediction.}\author{B.D. Ripley}\seealso{\code{\link{lqs}}}\examples{data(stackloss)set.seed(123)fm <- lqs(stack.loss ~ ., data = stackloss, method = "S", nsamp = "exact")predict(fm, stackloss)}\keyword{models}