Available Examples in the package:

1) example.m:

Example file for how to use FPCA.m.
Random design, 200 subjects with 1 to 4 measurements on each subject.
Time interval is [0,10]. The number of measurements for each subject is
uniformly distributed on {1,2,3,4}. The timepoints for each subject
are uniformly distributed on [0,10].

In this example, the goal is to predict the trajectories.
 

2) exampleDer.m:

Example file for how to use FPCder.m
Random design, 200 subjects with 1 to 8 measurements on each subject.
Time interval is [0,1]. The number of measurements for each subject
is uniformly distributed on {1,2,...,8}. The timepoints for each subject
are distributed as Beta(0.4,0.3).
In this example, the goal is to predict trajectories and their first two derivatives.


3) exampleReg_2.m

Example file for how to use FPCreg.m for predictor function X and response function Y.
Dense regular design, 80 subjects with 21 regularly spaced measurements for X on [0,10]
and for Y on [0,5]. Select 50 for training set and 30 for test set.

4) exampleReg_0.m

Example file for how to use FPCreg.m for predictor function X and response function Y.
Random design, 300 subjects with 2 to 5 irregularly spaced measurements for X on [0,10] and
for Y on [0,5]. The time points for each subject are uniformly distributed on the domain.
Select 200 for training set and 100 for test set.

5) exampleReg_scal.m

Example file for how to use FPCreg.m for predictor function X and a continuous scalar
response Y.
Dense regular design, 80 subjects with 21 regularly spaced measurements for X on [0,10].
Select 50 for training set and 30 for test set.

6) example_grm.m

Example file for how to use FPCgrm.m for generalized repeated measurement.
Random design, 200 subjects with 2 to 5 irregularly spaced measurements on each subject.
Time interval is [0,10]. The number of measurements for each subject is uniformly distributed
on {2,3,4,5}. The time points for each subject are uniformly distributed on [0,10].


In this example, the goal is to recover the latent Gaussina process and its functional principal
component scores and to predict generalized repeated response, such as Binary or Poisson data.
 

7) example_SVD.m:

Example file for how to use FSVD.m for prediction function X and response function Y.
Random design, 200 subjects with 3 to 5 irregularly spaced measurements for X on [0,10] and
for Y on [0,5]. The time points for each subject are uniformly distributed on the domain.

The goal is to obtain an estimate of the functional correlation.

 

8) example_WFPCA.m:

Example file for how to use WFPCA.m.
Dense regular design, 50 subjects with 20 regularly spaced measurements for X on [0,1].
Curves are generated by warping the normal density function.
Gaussian noise is added at each measurement.

The goal is to align the time-warped curves and to estimate the time warping functions.
 

9) example_GFLM.m:

Example file for how to use iterGFLM.m.
Predictors are balanced data simulated from

X_i(t) = \sum_{k=1}^4 r_{ik} \phi_k(t)  

where i = 1, ..., 100. Each predictor trajectory is sampled at 20
equally-spaced time points in [0,1], r_{ik} are distributed as N(0, \lambda_k) with
variance \lambda_k equal to 1, 0.5, 0.25, 0.125 and \phi_k, k = 1, ..., 4 are chosen
from the first four elements of the Fourier basis. Responses are generated according to Y_i ~ binomial(1, \pi), where
logit(\pi) = 1 + \int \beta * X_i and \beta is a linear combination of the \phi_k. The program iterGFLM.m can be used to
estimate \beta and \pi. It makes use of the SPQR (Semi-parameter Quasi-likelihood Regression) algorithm.

10) exampFAM.m: Example for FPCfam.m for fitting the functional additive model.

 The goal is to predict response for new predictor observations.
 Both response Y and predictor X are functional with dense observations in time domain [0,10].
 The number of observations for each subject is selected uniformly from {30,...,40}.
 100 subjects are used for estimation and another 100 subjects for prediction.  

11) exampleFVP.m: Example for FVP.m for how to use FVP.m for extracting functional variance process from the response function Y.

 The goal is to obtain an estimate of the functional variance process and plot the fitted process along with the true one.
 Random design, 200 subjects with 21 regularly equal-spaced measurements for Y on [0,10].  

12) exampleQuadReg.m: Example file for how to use FPCQuadReg.m for predictor function X and response function Y.

13) example_FQR.m: Example for FQR.m for how to use Functional Quasi-Likelihood Regression.  

14) exampleDiffEq.m:

Example file for estimating an empirical first order stochastic ordinary differential equation with time-varying coefficients
and for identifying the smooth residual drift process.

15) exampleFPCquantile.m: Example file for how to use FPCquantile.m for predictor function X and response function Y.

16) exampleStringing.m:

Example file to perform stringing on the p dimensional predictor first to get stringed x,
and then to use functional regression to predict response Y. The mean squared error are computed.

17) example_Mani.m: Example file for how to use ManiMDS.m to perform nonlinear dimension reduction via ISOMAP or Penalized-ISOMAP.

18) example_FSIM.m: Example file for how to use FSIM.m to estimate a new single-index model that reflects the time-dynamic effects
of the single index for longitudinal and functional response data.

19) example_stick.m:

Example file for how to use stick.m.
Sparse, irregular, random design, 80 subjects, 21 measurements on each subject.
Curves are generated each by 3 FPCs generated from independent Gaussian, with s.d. 3, 2, and 1, respectively.
Gaussian noise is added at each measurement with s.d. 0.5.

The goal is to calculate the functional correlation coefficient (named `stickiness coefficient') of two sparseily observed realizations of functional data.

20) example_nonlindyn.m:

Example file for how to apply nonlindyn.m on a simple dynamic case.

Fixed, regular and dense design, 50 subjects with 51 measurements with equal distances on [0,10] from each subject.
Each trajectory is genertaed by the true dynamic y`(t)^2=1-y(t)^2 (quadratic), along with a Gaussian noise with s.d. 0.1.

The aim of this function is to recover the first order dynamics of functional data in a nonlinear/nonparametric manner,
when realizations of the functional data are densely sampled.

21) example_repf.m:

Example file for how to apply repfFPCA.m for mortality data in a regular dense case.
The goal is to estimate eigenfunctions and functional principal component scores.

22) example_kcfc_growth.m:

Example file for how to apply kCFC.m for k-center functional clustering on Berkeley growth data.
The goal is to separate the growth data into clusters.