bsx {cuRe} | R Documentation |
Polynomial B-splines with eXtensions
Description
Generate the B-spline basis matrix for a polynomial spline with derivative restrictions at the boundary knots.
Usage
bsx(
x,
df = NULL,
knots = NULL,
degree = 3,
intercept = FALSE,
Boundary.knots = range(x),
deriv = NULL
)
Arguments
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-NA data).
If both |
deriv |
an integer vector of length 2 with values between 0 and |
Value
A matrix with containing the basis functions evaluated in x
.