Chapter 4 Bulid Functional Data Objects

object of the functional data class fd in R

An object of fd combines the coefficients with the basis system. In the previous post, we learned that create.bspline.basis entable one create a system of bsplines. The object class is fdbasis.

add coefficients to the fdbasis to obtain a functional data object fd.

Use the function fd() in R.

1
tempfd = fd(coefmat,bspline_temp)

Note that adding coefficients in is different from evaluate a bspline system at a given time point $t$. Suppose $f(x)$ is approximated by a bspline system with basis functions denoted by $\phi_i(x)$. That is,

Thus, evaluating $f(t)$ means that given $t = t_0$ compute $f(t_0)$, which is essentially a vector. Each element in the vector stands for the basis function value when $t = t_0$, i.e., $\phi_i(t_0)$. On the other hand, supply coefficients into the bspline system amounts to given the value of $\beta_i$. Once the coefficients are given, one can evaluate the smoothing system as a single function given $t=t_0$ using R function eval.fd().

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
unitRng = c(0,1)
bspl2 = create.bspline.basis(unitRng, norder=2)
tstFn1 = fd(c(-1, 2), bspl2)
t0 = seq(0,1,by=0.2)
eval.fd(t0,tstFn1)
     reps 1
[1,]   -1.0
[2,]   -0.4
[3,]    0.2
[4,]    0.8
[5,]    1.4
[6,]    2.0
> eval.fd(t0,tstFn1,1) # evaluate the function data object tstFn1 first derivative. 
     reps 1
[1,]      3
[2,]      3
[3,]      3
[4,]      3
[5,]      3
[6,]      0

Linear Differential Operator or Lfd Class

The notation $Lx$ refers to the application of a linear differential operator L to a function $x$. In general,