Learn R Programming

nlme (version 3.1-144)

fitted.lmList: Extract lmList Fitted Values

Description

The fitted values are extracted from each lm component of object and arranged into a list with as many components as object, or combined into a single vector.

Usage

# S3 method for lmList
fitted(object, subset, asList, …)

Arguments

object

an object inheriting from class "lmList", representing a list of lm objects with a common model.

subset

an optional character or integer vector naming the lm components of object from which the fitted values are to be extracted. Default is NULL, in which case all components are used.

asList

an optional logical value. If TRUE, the returned object is a list with the fitted values split by groups; else the returned value is a vector. Defaults to FALSE.

some methods for this generic require additional arguments. None are used in this method.

Value

a list with components given by the fitted values of each lm component of object, or a vector with the fitted values for all lm components of object.

See Also

lmList, residuals.lmList

Examples

Run this code
# NOT RUN {
fm1 <- lmList(distance ~ age | Subject, Orthodont)
fitted(fm1)
# }

Run the code above in your browser using DataLab