bspline {multisensi} | R Documentation |
function to evaluate B-spline basis functions
Description
The bspline
function evaluates ith B-spline basis function of order m at the values in x, given knot locations in k
Usage
bspline(x = seq(0, 1, len = 101), k = knots, i = 1, m = 2)
Arguments
x |
vector or scalar, coordinate where to calculate the B-spline functions |
k |
vector of knot locations |
i |
integer; from 0 to length(knots)+1-m |
m |
integer, degree of the B-Splines |
Details
B-splines are defined by recursion :
b_{i,0}(x) = 1
if k_j \leq x < k_{j+1}
; 0 else.
b_{i,m}(x) = \frac{x-k_i}{k_{i+m}-k_i} b_{i,m-1}(x) + \frac{k_{i+m+1}-x}{k_{i+m+1}-k_{i+1}} b_{i+1,m-1}(x)
Value
values in x of the ith B-spline basis function of order m
Note
This is essentially an internal function for the multisensi package
References
Wood Simon, 2006. Generalized Additive Models: An Introduction with R Chapman and Hall/CRC.
[Package multisensi version 2.1-1 Index]