SandBar | R Documentation |
Compute order-m
derivative penalty matrix \bm{S}
or its sparse "root" \bm{K}
such that \bm{K'K} = \bm{S}
.
SandBar(xt, d, m)
xt |
full knot sequence for ordinary B-splines ( |
d |
B-spline order ( |
m |
order of the derivative penalty ( |
Build \bm{\bar{S}}
in the sandwich formula \bm{S} = \bm{D'\bar{S}D}
.
A sparse matrice of "dsCMatrix" (when m < d - 1
) or "ddiMatrix" (when m = d - 1
) class.
Zheyuan Li zheyuan.li@bath.edu
require(gps.mgcv)
## example with ordinary B-splines
xt <- c(0, 0, 0, 0, 1, 3, 4, 4, 4, 4)
SandBar(xt, d = 4, m = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.