powered by
The function generates a B-spline design matrix with equidistant knots for given degree of the splines and number of basis functions.
bs.design(x, xl, xr, spline.degree, nbasis, comp = NULL)
The B-spline design matrix is returned.
the positions where spline to be evaluated.
lower intervall boundary where spline functions are relevant.
upper intervall boundary where spline functions are relevant.
(polynomial) degree of the B-splines.
number of basis functions used.
Specify if only specific columns of the B-spline design matrix should be returned. Default is NULL and the whole B-spline design matrix is returned.
Andreas Groll groll@math.lmu.de
pencoxfrail
x <- rnorm(100) B <- bs.design(x=x, xl=min(x), xr=max(x), spline.degree=3, nbasis=5)
Run the code above in your browser using DataLab