A function passed to boot
to perform bootstrap.
coefs.plsRnp(dataRepYtt, ind, nt, modele, maxcoefvalues, wwetoile, ifbootfail)
dataRepYtt | components' coordinates to bootstrap |
---|---|
ind | indices for resampling |
nt | number of components to use |
modele | type of modele to use, see plsRglm |
maxcoefvalues | maximum values allowed for the estimates of the coefficients to discard those coming from singular bootstrap samples |
wwetoile | values of the Wstar matrix in the original fit |
ifbootfail | value to return if the estimation fails on a bootstrap sample |
estimates on a bootstrap sample or ifbootfail
value if the
bootstrap computation fails.
See also bootpls
Frédéric Bertrand
frederic.bertrand@utt.fr
https://fbertran.github.io/homepage/
data(Cornell) XCornell<-Cornell[,1:7] yCornell<-Cornell[,8] # Lazraq-Cleroux PLS (Y,X) bootstrap # statistic=coefs.plsR is the default for (Y,X) resampling of PLSR models. set.seed(250) modpls <- plsR(yCornell,XCornell,1)#> ____************************************************____ #> ____Component____ 1 ____ #> ____Predicting X without NA neither in X nor in Y____ #> ****________________________________________________**** #>Cornell.bootYT <- bootpls(modpls, R=250, typeboot="fmodel_np", statistic=coefs.plsRnp, verbose=FALSE)