bspline_basis-class {MECfda} | R Documentation |
b-spline basis
Description
A s4 class that represents a b-spline basis \{B_{i,p}(x)\}_{i=-p}^{k}
on the interval [t_0,t_{k+1}]
,
where B_{i,p}(x)
is defined as
B_{i,0}(x) = \left\{
\begin{aligned}
&I_{(t_i,t_{i+1}]}(x), & i = 0,1,\dots,k\\
&0, &i<0\ or\ i>k
\end{aligned}
\right.
B_{i,r}(x) = \frac{x - t_{i}}{t_{i+r}-t_{i}} B_{i,r-1}(x) + \frac{t_{i+r+1} - x}
{t_{i+r+1} - t_{i+1}}B_{i+1,r-1}(x)
For all the discontinuity points of B_{i,r}
(r>0
) in the interval (t_0,t_k)
,
let the value equals its limit, which means
B_{i,r}(x) = \lim_{t\to x} B_{i,r}(t)
Slots
Boundary.knots
boundary of the domain of the splines (start and end), which is
t_0
andt_{k+1}
. Default is[0,1]
. SeeBoundary.knots
inbs
.knots
knots of the splines, which is
(t_1,\dots,t_k)
, equally spaced sequence is chosen by the function automatically with equal space (t_j = t_0 + j\cdot\frac{t_{k+1}-t_0}{k+1}
) when not assigned. Seeknots
inbs
.intercept
Whether an intercept is included in the basis, default value is TRUE, and must be TRUE. See
intercept
bs
.df
degree of freedom of the basis, which is the number of the splines, equal to
p+k+1
. By defaultk = 0
, anddf
= p+1
. Seedf
bs
.degree
degree of the splines, which is the degree of piecewise polynomials
p
, default value is 3. Seedegree
inbs
.
Author(s)
Heyang Ji
Examples
bsb = bspline_basis(
Boundary.knots = c(0,24),
intercept = TRUE,
df = NULL,
degree = 3
)