Chapter 3 fdaWithRMat
create bspline basis functions
There are normally four relevant arguments that defines a bspline basis system.
- rangeval: gives the range of the bspline functions
- nbasis: the number of basis functions in total
- norder: the order of the bspline, which equals one plus the degree. the default is set to be 4, i.e., cubic splines
- breaks: the breaking points. It must satisfy that the first and last breaks are the boundary of the rangeval. For example, the code below specifies a bspline system with 13 basis functions. Each basis function is a cubic polynomial function.
- In fact, one only needs to gives breaks and norder, then the function will know the nbasis, since nbasis = order + number of internal knots.
1
|
|
- one property of bspline basis system is that the sum of B-spline basis function at any given time t sum up to 1.
evaluate bspline system at given time points
Once the bspline system is created, one might be interested in checking each basis function values at a given time t. This can be achieved by eval.basis
function in R. It also computes derivatives when a third argument Lfdobj
is given. In R, predict
function can also do the same thing.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|