the predictor variable. Missing values are allowed.
df
degrees of freedom; one can specify df rather than knots; the function chooses df-2 inner knots at suitable quantile of x (which will ignore missing values). The default, NULL, corresponds to one inner knots, i.e. df=3.
knots
the internal breakpoints that define the spline. The default is NULL, which corresponds the median for one knot, quantiles for more knots.
Boundary.knots
boundary points at which to anchor the B-spline basis (default the range of the non-NA data).
References
Hastie, T. J. (1992) Generalized additive models. Chapter 7 of Statistical Models in S eds J. M. Chambers and T. J. Hastie, Wadsworth & Brooks/Cole.
# NOT RUN {require(stats)
basis <- b_spline(women$height, df = 5)
newX <- seq(58, 72, length.out = 51)
# evaluate the basis at the new datapredict(basis, newX)
# }