Rev 6562 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File nlme/man/augPred.Rd% Part of the nlme package for R% Distributed under GPL 2 or later: see nlme/LICENCE.note\name{augPred}\title{Augmented Predictions}\usage{augPred(object, primary, minimum, maximum, length.out, \dots)%% extra argument 'level':\S3method{augPred}{lme}(object, primary = NULL,minimum = min(primary), maximum = max(primary),length.out = 51, level = Q, \dots)}\alias{augPred}\alias{augPred.gls}\alias{augPred.lme}\alias{augPred.lmList}\arguments{\item{object}{a fitted model object from which predictions can beextracted, using a \code{predict} method.}\item{primary}{an optional one-sided formula specifying the primarycovariate to be used to generate the augmented predictions. Bydefault, if a covariate can be extracted from the data used to generate\code{object} (using \code{getCovariate}), it will be used as\code{primary}.}\item{minimum}{an optional lower limit for the primarycovariate. Defaults to \code{min(primary)}.}\item{maximum}{an optional upper limit for the primarycovariate. Defaults to \code{max(primary)}.}\item{length.out}{an optional integer with the number of primarycovariate values at which to evaluate the predictions. Defaults to51.}\item{level}{an optional integer vector specifying the desiredprediction levels. Levels increase from outermost to innermostgrouping, with level 0 representing the population (fixed effects)predictions. Defaults to the innermost level.}\item{\dots}{some methods for the generic may require additionalarguments.}}\description{Predicted values are obtained at the specified values of\code{primary}. If \code{object} has a grouping structure(i.e. \code{getGroups(object)} is not \code{NULL}), predicted valuesare obtained for each group. If \code{level} has more than oneelement, predictions are obtained for each level of the\code{max(level)} grouping factor. If other covariates besides\code{primary} are used in the prediction model, their average(numeric covariates) or most frequent value (categorical covariates)are used to obtain the predicted values. The original observationsare also included in the returned object.}\value{a data frame with four columns representing, respectively, the valuesof the primary covariate, the groups (if \code{object} does not have agrouping structure, all elements will be \code{1}), the predicted orobserved values, and the type of value in the third column:\code{original} for the observed values and \code{predicted} (singleor no grouping factor) or \code{predict.groupVar} (multiple levels ofgrouping), with \code{groupVar} replaced by the actual groupingvariable name (\code{fixed} is used for population predictions). Thereturned object inherits from class \code{"augPred"}.}\references{Pinheiro, J. C. and Bates, D. M. (2000), \emph{Mixed-Effects Models in Sand S-PLUS}, Springer, New York.}\author{José Pinheiro and Douglas Bates \email{bates@stat.wisc.edu}}\note{This function is generic; method functions can be written to handlespecific classes of objects. Classes which already have methods forthis function include: \code{gls}, \code{lme}, and \code{lmList}.}\seealso{\code{\link{plot.augPred}}, \code{\link{getGroups}},\code{\link{predict}}}\examples{fm1 <- lme(Orthodont, random = ~1)augPred(fm1, length.out = 2, level = c(0,1))}\keyword{models}