getPCA.test | R Documentation |
This function is used to compute the functional principal component scores of a test sample based on outputs obtained from getPCA
.
getPCA.test(object, data)
object |
An output object of |
data |
An |
See getPCA
for details.
A matrix of principal component scores for the functional data.
Ufuk Beyaztas and Han Lin Shang
sim.data <- generate.ff.data(n.pred = 5, n.curve = 200, n.gp = 101)
Y <- sim.data$Y
Y.train <- Y[1:100,]
Y.test <- Y[101:200,]
gpY = seq(0, 1, length.out = 101) # grid points
rob.fpca <- getPCA(data = Y.train, nbasis = 20, ncomp = 4,
gp = gpY, emodel = "robust")
rob.fpca.test <- getPCA.test(object = rob.fpca, data = Y.test)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.