EVOLUTION-MANAGER
Edit File: predict.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: Model 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 predict {stats}"><tr><td>predict {stats}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Model Predictions</h2> <h3>Description</h3> <p><code>predict</code> is a generic function for predictions from the results of various model fitting functions. The function invokes particular <em>methods</em> which depend on the <code><a href="../../base/html/class.html">class</a></code> of the first argument. </p> <h3>Usage</h3> <pre> predict (object, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>object</code></td> <td> <p>a model object for which prediction is desired.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>additional arguments affecting the predictions produced.</p> </td></tr> </table> <h3>Details</h3> <p>Most prediction methods which are similar to those for linear models have an argument <code>newdata</code> specifying the first place to look for explanatory variables to be used for prediction. Some considerable attempts are made to match up the columns in <code>newdata</code> to those used for fitting, for example that they are of comparable types and that any factors have the same level set in the same order (or can be transformed to be so). </p> <p>Time series prediction methods in package <span class="pkg">stats</span> have an argument <code>n.ahead</code> specifying how many time steps ahead to predict. </p> <p>Many methods have a logical argument <code>se.fit</code> saying if standard errors are to returned. </p> <h3>Value</h3> <p>The form of the value returned by <code>predict</code> depends on the class of its argument. See the documentation of the particular methods for details of what is produced by that method. </p> <h3>References</h3> <p>Chambers, J. M. and Hastie, T. J. (1992) <em>Statistical Models in S</em>. Wadsworth & Brooks/Cole. </p> <h3>See Also</h3> <p><code><a href="predict.glm.html">predict.glm</a></code>, <code><a href="predict.lm.html">predict.lm</a></code>, <code><a href="predict.loess.html">predict.loess</a></code>, <code><a href="predict.nls.html">predict.nls</a></code>, <code><a href="poly.html">predict.poly</a></code>, <code><a href="princomp.html">predict.princomp</a></code>, <code><a href="predict.smooth.spline.html">predict.smooth.spline</a></code>. </p> <p><a href="makepredictcall.html">SafePrediction</a> for prediction from (univariable) polynomial and spline fits. </p> <p>For time-series prediction, <code><a href="ar.html">predict.ar</a></code>, <code><a href="predict.arima.html">predict.Arima</a></code>, <code><a href="arima0.html">predict.arima0</a></code>, <code><a href="predict.HoltWinters.html">predict.HoltWinters</a></code>, <code><a href="StructTS.html">predict.StructTS</a></code>. </p> <h3>Examples</h3> <pre> require(utils) ## All the "predict" methods found ## NB most of the methods in the standard packages are hidden. ## Output will depend on what namespaces are (or have been) loaded. ## IGNORE_RDIFF_BEGIN for(fn in methods("predict")) try({ f <- eval(substitute(getAnywhere(fn)$objs[[1]], list(fn = fn))) cat(fn, ":\n\t", deparse(args(f)), "\n") }, silent = TRUE) ## IGNORE_RDIFF_END </pre> <hr /><div style="text-align: center;">[Package <em>stats</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>