KFPCA_reg {KFPCA} | R Documentation |
Kendall Functional Principal Component Analysis (KFPCA) for dense and regular design
Description
KFPCA for non-Gaussian functional data with dense and regular design.
Usage
KFPCA_reg(Lt, Ly, nGrid, nK, fdParobj)
Arguments
Lt |
A |
Ly |
A |
nGrid |
An integer denoting the number of observation time for each subject. |
nK |
An integer denoting the number of FPCs. |
fdParobj |
A functional parameter object for the smoothing of mean function and eigenfunctions. For more detail, see |
Value
A list
containing the following components:
meanfd |
A functional data object for the mean function estimates. |
FPC_list |
A |
score |
A n by |
CompTime |
A scalar denoting the computation time. |
References
Rou Zhong, Shishi Liu, Haocheng Li, Jingxiao Zhang (2021). "Functional principal component analysis estimator for non-Gaussian data." <arXiv: https://arxiv.org/abs/2102.01286>.
Examples
# Generate data
n <- 100
interval <- c(0, 10)
lambda_1 <- 16 #the first eigenvalue
lambda_2 <- 9 #the second eigenvalue
eigfun <- list()
eigfun[[1]] <- function(x){cos(pi * x/10)/sqrt(5)}
eigfun[[2]] <- function(x){sin(pi * x/10)/sqrt(5)}
score <- cbind(rnorm(n, 0, sqrt(lambda_1)), rnorm(n, 0, sqrt(lambda_2)))
DataNew <- GenDataKL(n, interval = interval, sparse = 51, regular = TRUE,
meanfun = function(x){0}, score = score,
eigfun = eigfun, sd = sqrt(0.25))
basis <- fda::create.bspline.basis(interval, nbasis = 13, norder = 4,
breaks = seq(0, 10, length.out = 11))
#KFPCA
Klist <- KFPCA_reg(DataNew$Lt, DataNew$Ly, nGrid = 51, nK = 2, fdParobj = basis)
plot(Klist$FPC_list[[1]])
plot(Klist$FPC_list[[2]])