EVOLUTION-MANAGER
Edit File: predict.bs.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: Evaluate a Spline Basis</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.bs {splines}"><tr><td>predict.bs {splines}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Evaluate a Spline Basis</h2> <h3>Description</h3> <p>Evaluate a predefined spline basis at given values. </p> <h3>Usage</h3> <pre> ## S3 method for class 'bs' predict(object, newx, ...) ## S3 method for class 'ns' predict(object, newx, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>object</code></td> <td> <p>the result of a call to <code><a href="bs.html">bs</a></code> or <code><a href="ns.html">ns</a></code> having attributes describing <code>knots</code>, <code>degree</code>, etc.</p> </td></tr> <tr valign="top"><td><code>newx</code></td> <td> <p>the <code>x</code> values at which evaluations are required.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Optional additional arguments. At present no additional arguments are used.</p> </td></tr> </table> <h3>Value</h3> <p>An object just like <code>object</code>, except evaluated at the new values of <code>x</code>. </p> <p>These are methods for the generic function <code><a href="../../stats/html/predict.html">predict</a></code> for objects inheriting from classes <code>"bs"</code> or <code>"ns"</code>. See <code><a href="../../stats/html/predict.html">predict</a></code> for the general behavior of this function. </p> <h3>See Also</h3> <p><code><a href="bs.html">bs</a></code>, <code><a href="ns.html">ns</a></code>, <code><a href="../../stats/html/poly.html">poly</a></code>. </p> <h3>Examples</h3> <pre> require(stats) basis <- ns(women$height, df = 5) newX <- seq(58, 72, length.out = 51) # evaluate the basis at the new data predict(basis, newX) </pre> <hr /><div style="text-align: center;">[Package <em>splines</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>