Generate a Basis Matrix for Natural Cubic Splines
This function just calls bs()
from the
splines
package.
bs(x, df = NULL, knots = NULL, degree = 3, intercept = FALSE, Boundary.knots = range(x))
x |
the predictor variable. Missing values are allowed. |
df |
degrees of freedom; one can specify |
knots |
the internal breakpoints that define the
spline. The default is |
degree |
degree of the piecewise polynomial—default is |
intercept |
if |
Boundary.knots |
boundary points at which to anchor the B-spline
basis (default the range of the non- |
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.