Usage
mvr_dcv(formula, ncomp, data, subset, na.action, method = c("kernelpls", "widekernelpls", "simpls", "oscorespls", "svdpc"), scale = FALSE, repl = 100, sdfact = 2, segments0 = 4, segment0.type = c("random", "consecutive", "interleaved"), length.seg0, segments = 10, segment.type = c("random", "consecutive", "interleaved"), length.seg, trace = FALSE, plot.opt = FALSE, selstrat = "hastie", ...)
Arguments
formula
formula, like y~X, i.e., dependent~response variables
ncomp
number of PLS components
data
data frame to be analyzed
subset
optional vector to define a subset
na.action
a function which indicates what should happen when the data
contain missing values
method
the multivariate regression method to be used, see
mvr
scale
numeric vector, or logical. If numeric vector, X is scaled
by dividing each variable with the corresponding element of
'scale'. If 'scale' is 'TRUE', X is scaled by dividing each
variable by its sample standard deviation. If
cross-validation is selected, scaling by the standard
deviation is done for every segment.
repl
Number of replicattion for the double-CV
sdfact
factor for the multiplication of the standard deviation for
the determination of the optimal number of components
segments0
the number of segments to use for splitting into training and test
data, or a list with segments (see mvrCv
) segment0.type
the type of segments to use. Ignored if 'segments0' is a list
length.seg0
Positive integer. The length of the segments to use. If
specified, it overrides 'segments' unless 'segments0' is a list
segments
the number of segments to use for selecting the optimal number if
components, or a list with segments (see mvrCv
) segment.type
the type of segments to use. Ignored if 'segments' is a list
length.seg
Positive integer. The length of the segments to use. If
specified, it overrides 'segments' unless 'segments' is a list
trace
logical; if 'TRUE', the segment number is printed for each segment
plot.opt
if TRUE a plot will be generated that shows the selection of the
optimal number of components for each step of the CV
selstrat
method that defines how the optimal number of components is
selected, should be one of "diffnext", "hastie", "relchange"; see details