kfolds2Pressind: Computes individual PRESS for k-fold cross validated partial...

Description Usage Arguments Value Note Author(s) References See Also Examples

View source: R/kfolds2Pressind.R

Description

This function computes individual PRESS for k-fold cross validated partial least squares regression models.

Usage

1
kfolds2Pressind(pls_kfolds)

Arguments

pls_kfolds

a k-fold cross validated partial least squares regression model

Value

list

Individual Press vs number of components for the first group partition

list()

...

list

Individual Press vs number of components for the last group partition

Note

Use cv.plsR to create k-fold cross validated partial least squares regression models.

Author(s)

Frédéric Bertrand
frederic.bertrand@math.unistra.fr
https://fbertran.github.io/homepage/

References

Nicolas Meyer, Myriam Maumy-Bertrand et Frédéric Bertrand (2010). Comparing the linear and the logistic PLS regression with qualitative predictors: application to allelotyping data. Journal de la Societe Francaise de Statistique, 151(2), pages 1-18. http://publications-sfds.math.cnrs.fr/index.php/J-SFdS/article/view/47

See Also

kfolds2coeff, kfolds2Press, kfolds2Mclassedind and kfolds2Mclassed to extract and transforms results from k-fold cross validation.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
data(Cornell)
XCornell<-Cornell[,1:7]
yCornell<-Cornell[,8]
kfolds2Pressind(cv.plsR(dataY=yCornell,dataX=data.frame(scale(as.matrix(XCornell))[,]),
nt=6,K=12,NK=1))
kfolds2Pressind(cv.plsR(dataY=yCornell,dataX=data.frame(scale(as.matrix(XCornell))[,]),
nt=6,K=6,NK=1))
rm(list=c("XCornell","yCornell"))


data(pine)
Xpine<-pine[,1:10]
ypine<-pine[,11]
kfolds2Pressind(cv.plsR(dataY=ypine,dataX=Xpine,nt=10,NK=1,verbose=FALSE))
kfolds2Pressind(cv.plsR(dataY=ypine,dataX=Xpine,nt=10,NK=2,verbose=FALSE))

XpineNAX21 <- Xpine
XpineNAX21[1,2] <- NA
kfolds2Pressind(cv.plsR(dataY=ypine,dataX=XpineNAX21,nt=10,NK=1,verbose=FALSE))
kfolds2Pressind(cv.plsR(dataY=ypine,dataX=XpineNAX21,nt=10,NK=2,verbose=FALSE))
rm(list=c("Xpine","XpineNAX21","ypine"))

plsRglm documentation built on March 16, 2021, 1:08 a.m.