EVOLUTION-MANAGER
Edit File: augPred.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Augmented Predictions</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for augPred {nlme}"><tr><td>augPred {nlme}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Augmented Predictions</h2> <h3>Description</h3> <p>Predicted values are obtained at the specified values of <code>primary</code>. If <code>object</code> has a grouping structure (i.e. <code>getGroups(object)</code> is not <code>NULL</code>), predicted values are obtained for each group. If <code>level</code> has more than one element, predictions are obtained for each level of the <code>max(level)</code> grouping factor. If other covariates besides <code>primary</code> 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 observations are also included in the returned object. </p> <h3>Usage</h3> <pre> augPred(object, primary, minimum, maximum, length.out, ...) ## S3 method for class 'lme' augPred(object, primary = NULL, minimum = min(primary), maximum = max(primary), length.out = 51, level = Q, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>object</code></td> <td> <p>a fitted model object from which predictions can be extracted, using a <code>predict</code> method.</p> </td></tr> <tr valign="top"><td><code>primary</code></td> <td> <p>an optional one-sided formula specifying the primary covariate to be used to generate the augmented predictions. By default, if a covariate can be extracted from the data used to generate <code>object</code> (using <code>getCovariate</code>), it will be used as <code>primary</code>.</p> </td></tr> <tr valign="top"><td><code>minimum</code></td> <td> <p>an optional lower limit for the primary covariate. Defaults to <code>min(primary)</code>.</p> </td></tr> <tr valign="top"><td><code>maximum</code></td> <td> <p>an optional upper limit for the primary covariate. Defaults to <code>max(primary)</code>.</p> </td></tr> <tr valign="top"><td><code>length.out</code></td> <td> <p>an optional integer with the number of primary covariate values at which to evaluate the predictions. Defaults to 51.</p> </td></tr> <tr valign="top"><td><code>level</code></td> <td> <p>an optional integer vector specifying the desired prediction levels. Levels increase from outermost to innermost grouping, with level 0 representing the population (fixed effects) predictions. Defaults to the innermost level.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>some methods for the generic may require additional arguments.</p> </td></tr> </table> <h3>Value</h3> <p>a data frame with four columns representing, respectively, the values of the primary covariate, the groups (if <code>object</code> does not have a grouping structure, all elements will be <code>1</code>), the predicted or observed values, and the type of value in the third column: <code>original</code> for the observed values and <code>predicted</code> (single or no grouping factor) or <code>predict.groupVar</code> (multiple levels of grouping), with <code>groupVar</code> replaced by the actual grouping variable name (<code>fixed</code> is used for population predictions). The returned object inherits from class <code>"augPred"</code>. </p> <h3>Note</h3> <p>This function is generic; method functions can be written to handle specific classes of objects. Classes which already have methods for this function include: <code>gls</code>, <code>lme</code>, and <code>lmList</code>. </p> <h3>Author(s)</h3> <p>José Pinheiro and Douglas Bates <a href="mailto:bates@stat.wisc.edu">bates@stat.wisc.edu</a></p> <h3>References</h3> <p>Pinheiro, J. C. and Bates, D. M. (2000), <em>Mixed-Effects Models in S and S-PLUS</em>, Springer, New York. </p> <h3>See Also</h3> <p><code><a href="plot.augPred.html">plot.augPred</a></code>, <code><a href="getGroups.html">getGroups</a></code>, <code><a href="../../stats/html/predict.html">predict</a></code></p> <h3>Examples</h3> <pre> fm1 <- lme(Orthodont, random = ~1) augPred(fm1, length.out = 2, level = c(0,1)) </pre> <hr /><div style="text-align: center;">[Package <em>nlme</em> version 3.1-139 <a href="00Index.html">Index</a>]</div> </body></html>