ncompopt: Determine the optimal number of components to include in the...

Description Usage Arguments Details Value See Also Examples

Description

The function ncompopt determines the optimal number of components to include the model.

Usage

1

Arguments

x

RMSECV values calculated by the partial least squares regression

Details

If ncomp = "auto", the number of components with the minimum RMSECV is selected. If the selected n-th component with the minimum RMSECV does not improve the RMSECV by at least 2 percent, then (n-1)th compoment is selected and so forth.

Value

the optimal number of components

See Also

rowpeak

Examples

1
2
3
data(peach)
peach.pls <- plsr(Brix ~ NIR, ncomp = 15, data = peach, validation = "CV")
ncompopt(RMSEP(peach.pls)$val[2,,])

uwadaira/plsropt documentation built on May 3, 2019, 2:39 p.m.