In mathematics, a general principle for studying an object is always from the study of the object itself to the study of the relationship between objects. In functional data analysis, the most important part for studying of the object itself, i.e. one functional data set, is functional principal component analysis (FPCA). And for the study of the relationship between two functional data sets, one popular way is various types of regression analysis. For this post, I only focus on the FPCA. The central idea of FPCA is dimension reduction by means of a spectral decomposition of the covariance operator, which yields functional principal components as coefficient vectors to represent the random curves in the sample.
First of all, let’s define what’s the FPCA. Suppose we observe functions . We want to find an orthonormal basis such that
is minimized. Once such a basis is found, we can replace each curve by to a good approximation. This means instead of working with infinitely dimensional curves , we can work with $K-$dimensional vectors . And the functions are called collectively optimal empirical orthonormal basis, or empirical functional principal components. Note that once we got the functional principal components, we can get the so called FPC scores to approximate the curves.
For FPCA, we usually adopt the so called “smooth-first-then-estimate” approach, namely,we first pre-process the discrete observations to get smoothed functional data by smoothing and then use the empirical estimators of the mean and covariance based on the smoothed functional data to conduct FPCA.
For the smoothing step, we have to consider individual by individual. For each realization, we can use basis expansion (Polynomial basis is unstable; Fourier basis is suitable for periodic functions; B-spline basis is flexible and useful), smoothing penalties (which lead to smoothing splines by the Smoothing Spline Theorem), as well as local polynomial smoothing:
- Basis expansion: by assuming one realization of the underlying true process , where are the basis functions, we have the estimation
- Smoothing penalties: , where is a measure for the roughness of functions.
- Local linear smoothing: assume at point , we have , then we have estimated by the following
Once we have the smoothed functional data, denoted as , we can have the empirical estimator of the mean and covariance as
And then we can have the empirical functional principal components as the eigenfunctions of the above sample covariance operator (for the proof, refer to the book “Inference for Functional Data with Applications” page 39). Note that the above estimation procedure of the mean function and the covariance function need to have more dense functional data, since otherwise the smoothing step will be not stable. Thus people are also proposing some other estimators of mean function and covariance function, such as the local linear estimator for the mean function and the covariance function proposed by Professor Yehua Li from ISU, which has an advantage that they can cover all types of functional data, sparse (i.e. longitudinal), dense, or in-between. Now the problem is that how to conduct FPCA based on in practice. Actually it’s the following classic mathematical problem:
where is the integral operator with a symmetric kernel . This is a well-studied problem in computing the eigenvalues and eigenfunctions of an integral operator with a symmetric kernel in applied mathematics. So people can refer to those numerical methods to solve the above problem.
However, two common methods used in Statistics are described in Section 8.4 in the fundamental functional data analysis book written by Professors J. O. Ramsay and B. W. Silverman. One is the discretizing method and the other is the basis function method. For the discretizing method, essentially, we just discretize the smoothed functions to a fine grid of equally spaced values that span the interval, and then use the traditional PCA, followed by some interpolation method for other points not belonging to be selected grid points. Now for the basis function method, we illustrate it by assuming the mean function equal to 0:
- Basis expansion: , and then , where and ;
- Covariance function: ;
- Eigenfunction expansion: assume the eigenfunction ;
- Problem Simplification: The above basis expansions lead to
where and . Hence the eigen problem boils down to , which is equivalent to
Note that the assumptions for the eigenfunctions to be orthonormal are equivalent to . Let , and then we have the above problem as
which is a traditional eigen problem for symmetric matrix .
Two special cases deserve particular attention. One is orthonormal basis which leads to . And the other is taking the smoothed functional data as the basis function which leads to .
Note that the empirical functional principal components are proved to be the eigenfunctions of the sample covariance operator. This fact connects the FPCA with the so called Karhunen-Love expansion:
where are uncorrelated random variables with mean 0 and variance $\lambda_k$ where . For simplicity we assume . Then we can easily see the connection between KL expansion and FPCA. is the series of orthonormal basis functions, and are those FPC scores.
So far, we only have discussed how to get the empirical functional principal components, i.e. eigenfunctions/orthonormal basis functions. But to represent the functional data, we have to get those coefficients, which are called FPC scores . The simplest way is by numerical integration:
Note that for the above estimation of the FPC scores via numerical integration, we first need the smoothed functional data . So if we only have sparsely observed functional data, this method will not provide reasonable approximations. Professor Fang Yao et al. proposed the so called PACE (principal component analysis through conditional expectation) to deal with such longitudinal data.