cvfold | R Documentation |
Do cross validation to decide the number of basis function to use in smoothing.
cvfold(cross, pheno.cols, basisset, fold = 10, random = TRUE)
cross |
An object of class |
pheno.cols |
Columns in the phenotype matrix to be used as the phenotype. |
basisset |
The set of basis numbers to evaluate. |
fold |
The number of folder in cross validation. |
random |
randomly divide folder on times if TRUE and select folders equily spaced time points if FALSE. |
It gives a vector of sum of squared erros for each basis set.
Il-Youp Kwak, <email: ikwak2@stat.wisc.edu>
calcfunpca
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.