ibs {ibs} | R Documentation |
Integratal of a B-spline function
Description
Calculate the integral of a B-spline function.
Usage
ibs(x, knots, ord=4, coef = rep(1, length(knots) - ord))
Arguments
x |
Numerical value or vector. The value(s) at which to evaluate the
integral of the B-spline; must be in the interval bewteen the
smallest knot to the |
knots |
Numerical vector. The knot positions/sites of the B-spline function to be integrated. |
ord |
An integer >=1. The order of the B-spline integrand function to be integrated. Equals degree plus 1. |
coef |
A numerical vector. The coefficients (de Boor points) defining the B-spline integrand function. |
Details
The function returns the integral(s) of the B-spline function
specified by knots knots
, order ord
, and coefficients
coef
, from the minimum knot position to each x
value. The evaluation is based on a closed form expression of the
integral in terms of higher order B-splines, given on page 128 of de
Boor (2001).
Value
A numerical equal to the integral(s).
Author(s)
Feng Chen <feng.chen@unsw.edu.au>
References
de Boor, C (2001) A Practical Guide to Splines. Revised Edition. Springer: New York.
See Also
Examples
kns <- c(rep(0,4),1:4*0.2,rep(1,4))
co <- rnorm(length(kns)-3)
integrate(bspline,knots=kns,ord=3,coef=co,0,0.95)
integrate(function(x)bsbases(x,kns,3) %*% co,0,0.95)
ibs(0.95,kns,3,co)