This function just calls bs() from the
splines
package.
bs(x, df = NULL, knots = NULL, degree = 3, intercept = FALSE,
Boundary.knots = range(x), warn.outside = TRUE)the predictor variable. Missing values are allowed.
degrees of freedom; one can specify df rather than
knots; bs() then chooses df-degree (minus one
if there is an intercept) knots at suitable quantiles of x
(which will ignore missing values). The default, NULL,
takes the number of inner knots as length(knots). If that is
zero as per default, that corresponds to df = degree - intercept.
the internal breakpoints that define the
spline. The default is NULL, which results in a basis for
ordinary polynomial regression. Typical values are the mean or
median for one knot, quantiles for more knots. See also
Boundary.knots.
degree of the piecewise polynomial---default is 3 for
cubic splines.
if TRUE, an intercept is included in the
basis; default is FALSE.
boundary points at which to anchor the B-spline
basis (default the range of the non-NA data). If both
knots and Boundary.knots are supplied, the basis
parameters do not depend on x. Data can extend beyond
Boundary.knots.
logical indicating if a
warning should be signalled in case some x values
are outside the boundary knots.