object is included
in newdata, the data frame is partitioned according to the
grouping factor levels; else, newdata is repeated for all
lm components. The predictions and, optionally, the standard
errors for the predictions, are obtained for each lm
component of object, using the corresponding element of the
partitioned newdata, and arranged into a list with as many
components as object, or combined into a single vector or data
frame (if se.fit=TRUE).## S3 method for class 'lmList':
predict(object, newdata, subset, pool, asList, se.fit, \dots)lmList, representing
a list of lm objects with a common model.object model formula
must be present in the data frame. If missing, the same data frame
used to produce object is used.lm components of object from which the predictions
are to be extracted. Default is NULL, in which case all
components are used.TRUE, the returned
object is a list with the predictions split by groups; else the
returned value is a vector. Defaults to FALSE.attr(object, "pool").FALSE.lm
component of object, a vector with the predictions from all
lm components of object, or a data frame with columns
given by the predictions and their corresponding standard errors.lmList, predict.lmfm1 <- lmList(distance ~ age | Subject, Orthodont)
predict(fm1, se.fit = TRUE)Run the code above in your browser using DataLab