Description Usage Arguments Value References Examples

KFPCA for non-Gaussian functional data with sparse design or longitudinal data.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |

`Lt` |
A |

`Ly` |
A |

`interval` |
A |

`dataType` |
A |

`nK` |
An integer denoting the number of FPCs. |

`kern` |
A |

`bw` |
A scalar denoting the bandwidth for the Nadaraya-Watson estimators. |

`kernK` |
A |

`bwK` |
The bandwidth for the estimation of the Kendall's tau function. If |

`kernmean` |
A |

`bwmean` |
The bandwidth for the estimation of the mean function. If |

`nRegGrid` |
An integer denoting the number of equally spaced time points in the supporting interval. The eigenfunctions and mean function are estimated at these equally spaced time points. |

`fdParobj` |
A functional parameter object for the smoothing of the eigenfunctions. For more detail, see |

`more` |
Logical; If |

A `list`

containing the following components:

`ObsGrid` |
A |

`RegGrid` |
A |

`bwmean` |
A scalar denoting the bandwidth for the mean function estimate. |

`kernmean` |
A |

`bwK` |
A scalar denoting the bandwidth for the Kendall's tau function estimate. |

`kernK` |
A |

`mean` |
A |

`KendFun` |
A |

`FPC_dis` |
A |

`FPC_smooth` |
A functional data object for the eigenfunction estimates. |

`score` |
A |

`X_fd` |
A functional data object for the prediction of trajectories. The results are returned when |

`Xest_ind` |
A |

`Lt` |
The input 'Lt'. |

`Ly` |
The input 'Ly'. |

`CompTime` |
A scalar denoting the computation time. |

Rou Zhong, Shishi Liu, Haocheng Li, Jingxiao Zhang (2021). "Robust Functional Principal Component Analysis for Non-Gaussian Longitudinal Data." Journal of Multivariate Analysis, https://doi.org/10.1016/j.jmva.2021.104864.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ```
# Generate data
n <- 100
interval <- c(0, 10)
lambda_1 <- 9 #the first eigenvalue
lambda_2 <- 1.5 #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 = 6:8, regular = FALSE,
meanfun = function(x){0}, score = score,
eigfun = eigfun, sd = sqrt(0.1))
basis <- fda::create.bspline.basis(interval, nbasis = 13, norder = 4,
breaks = seq(0, 10, length.out = 11))
# KFPCA
Klist <- KFPCA(DataNew$Lt, DataNew$Ly, interval, nK = 2, bw = 1,
nRegGrid = 51, fdParobj = basis)
plot(Klist$FPC_smooth)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.