Rev 6561 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File nlme/man/fitted.lme.Rd% Part of the nlme package for R% Distributed under GPL 2 or later: see nlme/LICENCE.note\name{fitted.lme}\title{Extract lme Fitted Values}\usage{\method{fitted}{lme}(object, level, asList, \dots)}\alias{fitted.lme}\arguments{\item{object}{an object inheriting from class \code{"\link{lme}"}, representinga fitted linear mixed-effects model.}\item{level}{an optional integer vector giving the level(s) of groupingto be used in extracting the fitted values from \code{object}. Levelvalues increase from outermost to innermost grouping, withlevel zero corresponding to the population fitted values. Defaults tothe highest or innermost level of grouping.}\item{asList}{an optional logical value. If \code{TRUE} and a singlevalue is given in \code{level}, the returned object is a list withthe fitted values split by groups; else the returned value iseither a vector or a data frame, according to the length of\code{level}. Defaults to \code{FALSE}.}\item{\dots}{some methods for this generic require additionalarguments. None are used in this method.}}\description{The fitted values at level \eqn{i} are obtained by adding together thepopulation fitted values (based only on the fixed effects estimates)and the estimated contributions of the random effects to the fittedvalues at grouping levels less or equal to \eqn{i}. The resultingvalues estimate the best linear unbiased predictions (BLUPs) at level\eqn{i}.}\value{If a single level of grouping is specified in \code{level}, thereturned value is either a list with the fitted values split by groups(\code{asList = TRUE}) or a vector with the fitted values(\code{asList = FALSE}); else, when multiple grouping levels arespecified in \code{level}, the returned object is a data frame withcolumns given by the fitted values at different levels and thegrouping factors. For a vector or data frame result the\code{\link{napredict}} method is applied.}\references{Bates, D.M. and Pinheiro, J.C. (1998) "Computational methods formultilevel models" available in PostScript or PDF formats athttp://nlme.stat.wisc.edu/pub/NLME/Pinheiro, J.C., and Bates, D.M. (2000) "Mixed-Effects Modelsin S and S-PLUS", Springer, esp. pp. 235, 397.}\author{José Pinheiro and Douglas Bates \email{bates@stat.wisc.edu}}\seealso{\code{\link{lme}}, \code{\link{residuals.lme}} }\examples{fm1 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1)fitted(fm1, level = 0:1)}\keyword{models}