getPCA.test {robflreg} | R Documentation |
Get the functional principal component scores for a given test sample
Description
This function is used to compute the functional principal component scores of a test sample based on outputs obtained from getPCA
.
Usage
getPCA.test(object, data)
Arguments
object |
An output object of |
data |
An |
Details
See getPCA
for details.
Value
A matrix of principal component scores for the functional data.
Author(s)
Ufuk Beyaztas and Han Lin Shang
Examples
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)
[Package robflreg version 1.2 Index]