fregre.ppc.cv(fdataobj, y, kmax=8, lambda = 0, P = c(0, 0, 1),
criteria = "SIC", ...)
fregre.ppls.cv(fdataobj, y, kmax=8, lambda = 0, P = c(0, 0, 1),
criteria = "SIC", ...)
fdata
class object.n
.lambda=TRUE
the algorithm computes a sequence of lambda values.P
is a vector: P
are coefficients to define the penalty matrix object. By default P=c(0,0,1)
penalize the second derivative (curvature) or acceleration.
If P
is a matrix: P is the penalty matrix ofregre.ppc
or fregre.ppls
pc.opt
or pls.opt
) components.kmax
components.pc.opt
or pls.opt
) components.pc.opt
orpls.opt
) with minimum MSC criteria by stepwise regression usingfregre.ppc
orfregre.ppls
in each step.pls.opt
.fregre.ppc
or fregre.ppls
.
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''
$p_n=\frac{2log(log(n))}{n}$,criteria
=``HQIC''
criteria
is an argument that controls the type of validation used in the selection of the smoothing parameter kmax
$=k_n$ and penalized parameter lambda
$=\lambda$.
criteria=``CV''
is not recommended: time-consuming.fregre.ppls
and fregre.ppc
.data(tecator)
x<-tecator$absorp.fdata[1:129]
y<-tecator$y$Fat[1:129]
# fregre.ppls.cv(x,y,8)
# fregre.ppls.cv(x,y,8,lambda=TRUE)
Run the code above in your browser using DataLab