\Header{predict.lmList}{Predictions from an lmList Object}
\keyword{models}{predict.lmList}
\begin{Description}\relax
If the grouping factor corresponding to \code{object} is included
in \code{newdata}, the data frame is partitioned according to the
grouping factor levels; else, \code{newdata} is repeated for all
\code{lm} components. The predictions and, optionally, the standard
errors for the predictions, are obtained for each \code{lm}
component of \code{object}, using the corresponding element of the
partitioned \code{newdata}, and arranged into a list with as many
components as \code{object}, or combined into a single vector or data
frame (if \code{se.fit=TRUE}).\end{Description}
\begin{Usage}
\begin{verbatim}
## S3 method for class 'lmList':
predict(object, newdata, subset, pool, asList, se.fit, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] an object inheriting from class \code{lmList}, representing
a list of \code{lm} objects with a common model.

\item[\code{newdata}] an optional data frame to be used for obtaining the
predictions. All variables used in the \code{object} model formula
must be present in the data frame. If missing, the same data frame
used to produce \code{object} is used.

\item[\code{subset}] an optional character or integer vector naming the
\code{lm} components of \code{object} from which the predictions
are to be extracted. Default is \code{NULL}, in which case all
components are used.

\item[\code{asList}] an optional logical value. If \code{TRUE}, the returned
object is a list with the predictions split by groups; else the
returned value is a vector. Defaults to \code{FALSE}.

\item[\code{pool}] an optional logical value indicating whether a pooled
estimate of the residual standard error should be used. Default is
\code{attr(object, "pool")}.

\item[\code{se.fit}] an optional logical value indicating whether pointwise
standard errors should be computed along with the
predictions. Default is \code{FALSE}.

\item[\code{...}] some methods for this generic require additional
arguments.  None are used in this method.
\end{ldescription}
\end{Arguments}
\begin{Value}
a list with components given by the predictions (and, optionally, the
standard errors for the predictions) from each \code{lm}
component of \code{object},  a vector with the predictions from all 
\code{lm} components of \code{object}, or a data frame with columns
given by the predictions and their corresponding standard errors.\end{Value}
\begin{Author}\relax
Jose Pinheiro \email{Jose.Pinheiro@pharma.novartis.com} and Douglas Bates \email{bates@stat.wisc.edu}\end{Author}
\begin{SeeAlso}\relax
\code{\Link{lmList}}, \code{\Link{predict.lm}}\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(Orthodont)
fm1 <- lmList(distance ~ age | Subject, Orthodont)
predict(fm1, se.fit = TRUE)
\end{ExampleCode}
\end{Examples}

