This function generates the B-spline basis matrix for a polynomial spline.
bSpline(x, df = NULL, knots = NULL, degree = 3L, intercept = FALSE, Boundary.knots = range(x, na.rm = TRUE), ...)
The predictor variable. Missing values are allowed and will be returned as they were.
Degrees of freedom. One can specify
The internal breakpoints that define the spline. The default
Non-negative integer degree of the piecewise polynomial. The
default value is 3 for cubic splines. Zero degree is allowed for this
function, which is the only difference compared with
Boundary points at which to anchor the B-spline basis.
By default, they are the range of the non-
Optional arguments for future usage.
A matrix of dimension
df = degree + length(knots) (plus one if intercept is included).
Attributes that correspond to the arguments specified are returned
for usage of other functions in this package.
It is an augmented function of
bs in package
splines for B-spline basis that allows piecewise constant (close on
the left, open on the right) spline basis with zero degree. When the
degree is greater than zero, it internally calls
bs and generates a basis matrix for representing the
family of piecewise polynomials with the specified interior knots and
degree, evaluated at the values of
x. The function has the same
bs for ease usage.