Rev 6562 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File nlme/man/predict.lmList.Rd% Part of the nlme package for R% Distributed under GPL 2 or later: see nlme/LICENCE.note\name{predict.lmList}\title{Predictions from an lmList Object}\usage{\method{predict}{lmList}(object, newdata, subset, pool, asList, se.fit, \dots)}\alias{predict.lmList}\arguments{\item{object}{an object inheriting from class \code{"\link{lmList}"}, representinga list of \code{lm} objects with a common model.}\item{newdata}{an optional data frame to be used for obtaining thepredictions. All variables used in the \code{object} model formulamust be present in the data frame. If missing, the same data frameused to produce \code{object} is used.}\item{subset}{an optional character or integer vector naming the\code{lm} components of \code{object} from which the predictionsare to be extracted. Default is \code{NULL}, in which case allcomponents are used.}\item{asList}{an optional logical value. If \code{TRUE}, the returnedobject is a list with the predictions split by groups; else thereturned value is a vector. Defaults to \code{FALSE}.}\item{pool}{an optional logical value indicating whether a pooledestimate of the residual standard error should be used. Default is\code{attr(object, "pool")}.}\item{se.fit}{an optional logical value indicating whether pointwisestandard errors should be computed along with thepredictions. Default is \code{FALSE}.}\item{\dots}{some methods for this generic require additionalarguments. None are used in this method.}}\description{If the grouping factor corresponding to \code{object} is includedin \code{newdata}, the data frame is partitioned according to thegrouping factor levels; else, \code{newdata} is repeated for all\code{lm} components. The predictions and, optionally, the standarderrors for the predictions, are obtained for each \code{lm}component of \code{object}, using the corresponding element of thepartitioned \code{newdata}, and arranged into a list with as manycomponents as \code{object}, or combined into a single vector or dataframe (if \code{se.fit=TRUE}).}\value{a list with components given by the predictions (and, optionally, thestandard 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 columnsgiven by the predictions and their corresponding standard errors.}\author{José Pinheiro and Douglas Bates \email{bates@stat.wisc.edu}}\seealso{\code{\link{lmList}}, \code{\link{predict.lm}}}\examples{fm1 <- lmList(distance ~ age | Subject, Orthodont)predict(fm1, se.fit = TRUE)}\keyword{models}