For a function \(f(t), t\in\Omega\), and a basis function sequence \(\{\rho_k\}_{k\in\kappa}\), basis expansion is to compute \(\int_\Omega f(t)\rho_k(t) dt\). Here we do basis expansion for all \(f_i(t), t\in\Omega = [t_0,t_0+T]\) in functional variable data, \(i=1,\dots,n\). We compute a matrix \((b_{ik})_{n\times p}\), where \(b_{ik} = \int_\Omega f(t)\rho_k(t) dt\). The basis used here is the b-splines basis, \(\{B_{i,p}(x)\}_{i=-p}^{k}\), \(x\in[t_0,t_{k+1}]\), where \(t_{k+1} = t_0+T\) and \(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)$$
bspline_basis_expansion(object, n_splines, bs_degree)# S4 method for functional_variable,integer
bspline_basis_expansion(object, n_splines, bs_degree)
Returns a numeric matrix, \((b_{ik})_{n\times p}\), where \(b_{ik} = \int_\Omega f(t)\rho_k(t) dt\).
Heyang Ji