knotave | R Documentation |
Calculates the knot averages of a B-spline basis.
knotave(knots, d)
knots |
Knot Vector (with d+1 coincident knots on the boundaries). |
d |
Degree of the B-spline basis. |
Numeric containing knot averages
Bjoern Bornkamp
Bornkamp, B. and Ickstadt, K. (2009). A Note on B-Splines for Semiparametric Elicitation. The American Statistician, 63, 373–377
Dierckx, P. (1993), Curve and Surface Fitting with Splines, Clarendon Press
SEL
## Example for calculation of a control polygon
knts <- c(rep(0, 4), rep(1, 4))
cf <- c(-1, -1, 1/2, 0)
sq <- seq(0, 1, length = 101)
N <- splineDesign(sq, knots = knts, ord = 4)
res <- colSums(t(N)*cf)
plot(sq, res, type = "l", ylim = c(-1, 0.6))
kntAv <- knotave(knts, 3)
lines(kntAv, cf, col = "red") # add control polygon
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.