bbasis | R Documentation |
Construct a B-spline basis of degree deg
with ndx-
1 equally-spaced internal knots (ndx
segments) on range [x1
,xr
].
Code copied from Eilers & Marx 2010, WIR: Comp Stat 2, 637-653.
bbasis(x, xl, xr, ndx, deg)
x |
A vector. Data values for spline. |
xl |
A numeric value. Lower bound for data (lower external knot). |
xr |
A numeric value. Upper bound for data (upper external knot). |
ndx |
A numeric value. Number of divisions for x range (equal to number of segments = number of internal knots + 1) |
deg |
A numeric value. Degree of the polynomial spline. |
Not yet amended to coerce values that should be zero to zero!
A matrix with columns holding the P-spline for each value of x.
Matrix has ndx+deg
columns and length(x)
rows.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.