make_basis | R Documentation |
This function creates the basis function of a second-order (linear) splines at a user-specific set of break points.
make_basis(
x,
xname = "x",
internal = NULL,
boundary = range(x),
degree = 1L,
warn = TRUE
)
x |
numeric vector |
xname |
predictor name. Default is |
internal |
a vector of internal knots, excluding boundary knots |
boundary |
vector of external knots |
degree |
the degree of the spline. The broken stick model
requires linear splines, so the default is |
warn |
a logical indicating whether warnings from |
A matrix with length(x)
rows and length(breaks)
columns, with some extra attributes described by bs()
.
Before version 0.54, it was standard practice that the knots
array always included boundary[1L]
.
Stef van Buuren 2023
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.