bspline_basis_expansion: B-splines basis expansion for functional variable data

bspline_basis_expansionR Documentation

B-splines basis expansion for functional variable data

Description

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)

Usage

bspline_basis_expansion(object, n_splines, bs_degree)

## S4 method for signature 'functional_variable,integer'
bspline_basis_expansion(object, n_splines, bs_degree)

Arguments

object

a functional_variable class object.

n_splines

the number of splines, equal to k+p+1. See df in bs.

bs_degree

the degree of the piecewise polynomial of the b-splines. See degree in bs.

Value

Returns a numeric matrix, (b_{ik})_{n\times p}, where b_{ik} = \int_\Omega f(t)\rho_k(t) dt.

Author(s)

Heyang Ji


MECfda documentation built on April 3, 2025, 10:07 p.m.