bspline: function to evaluate B-spline basis functions

Description Usage Arguments Details Value Note References

Description

The bspline function evaluates ith B-spline basis function of order m at the values in x, given knot locations in k

Usage

1
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 <= x < k_{j+1} ; 0 else.

b_{i,m}(x) = (x-k_i)/(k_{i+m}-k_i) b_{i,m-1}(x) + (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.


multisensi documentation built on May 2, 2019, 2:14 p.m.