fregre.pls.cv(fdataobj, y, kmax=8, criteria = "SICc",...)fdata class object.n.fregre.plskmax components.pls.opt components.pls.optwith minimum MSC criteria by stepwise regression usingfregre.plsin each step.pls.opt.fregre.pls.
The criteria selection is done by cross-validation (CV) or Model Selection Criteria (MSC).
criteria=``CV''criteria=``SIC'' (by default)
$p_n=\frac{log(n)}{n-k_n-2}$,criteria=``SICc''
$p_n=2$,criteria=``AIC''
$p_n=\frac{2n}{n-k_n-2}$,criteria=``AICc''criteria is an argument that controls the type of validation used in the selection of the smoothing parameter kmax$=k_n$.
criteria=``CV'' is not recommended: time-consuming.fregre.pls, summary.fregre.fd and predict.fregre.fd.
Alternative method: fregre.pc, fregre.basis and fregre.np.data(tecator)
x<-tecator$absorp.fdata[1:129]
y<-tecator$y$Fat[1:129]
fregre.pls.cv(x,y,8)Run the code above in your browser using DataLab