calcfunpca: Do dimensional reduction using functional pca.

View source: R/calcfunpca.R

calcfunpcaR Documentation

Do dimensional reduction using functional pca.

Description

Do dimensional reduction using functional pca.

Usage

calcfunpca(cross, pheno.cols, n.max = 4, criteria = 0.9, nbasis, nn = 0)

Arguments

cross

An object of class "cross". See the read.cross for details.

pheno.cols

Columns in the phenotype matrix to be used as the phenotype.

n.max

The number of maximum reduced dimension.

criteria

how much of variance explained.

nbasis

The number of basis to use.

nn

The number of exact reduced dimension

Value

It gives a list, Y is a matrix that each column have principal components. eigf is a eigen function object from functional PCA using fda package.

Author(s)

Il-Youp Kwak, <email: ikwak2@stat.wisc.edu>

See Also

scanoneM

Examples

data(exd)
exd <- calc.genoprob(exd, step=2)
cvout <- cvfold(exd, basisset = 4:7, fold = 10)
cvout # basis number 5 have the smallest sse. So we take nbasis = 5.
Y <- calcfunpca(exd, criteria=0.9, nbasis = 5)$Y
out1 <- scanoneM(exd, Y, method = "hk")

ikwak2/funqtl documentation built on April 20, 2022, 3:58 a.m.