Description Usage Arguments Details Value Note Author(s) References See Also Examples
Calculate crossvalidated predictions for LSPLS models.
1 2 3 
formula 
model formula. See Details. 
ncomp 
list or vector of positive integers, giving the number of components to use for each PLS matrix. See Details. 
data 
an optional data frame with the data to fit the model from. 
subset 
an optional vector specifying a subset of observations to be used in the fitting process. 
na.action 
a function which indicates what should happen when the data contain missing values. 
segments 
the number of segments to use, or a list with segments (see Details). 
segment.type 
the type of segments to use. Ignored if

length.seg 
Positive integer. The length of the segments to
use. If specified, it overrides 
model 
logical. If 
... 
additional arguments, passed to the underlying
crossvalidation function (currently 
The function performs a crossvalidation, using the model and segments
specified in the call. It returns an object of class
"lsplsCv"
, which has a plot method (see
plot.lsplsCv
). See lsplspackage for typical
usage and more about LSPLS models.
See lspls
for details about specifying the model
with formula
and ncomp
. Note that lsplsCv
crossvalidates models with from 0 components to the numbers of
components specified with ncomp
.
If segments
is a list, the arguments segment.type
and
length.seg
are ignored. The elements of the list should be
integer vectors specifying the indices of the segments. See
cvsegments
for details.
Otherwise, segments of type segment.type
are generated. How
many segments to generate is selected by specifying the number of
segments in segments
, or giving the segment length in
length.seg
. If both are specified, segments
is
ignored.
An object of class "lsplsCv"
, with components
pred 
the crossvalidated predictions. An array with one dimension for the observations, one for the responses, and one for each of the PLS matrices. 
segments 
the list of segments used in the crossvalidation. 
na.action 
if observations with missing values were removed,

ncomp 
the list of number of components used in the model. 
call 
the function call. 
terms 
the model terms. 
model 
if 
Currently, lsplsCv
handles the formula and the data, and calls
orthlsplsCv
for the actual crossvalidation. The
formula interface is experimental, and might change in future versions.
BjørnHelge Mevik
Jørgensen, K., Segtnan, V. H., Thyholt, K., Næs, T. (2004) A Comparison of Methods for Analysing Regression Models with Both Spectral and Designed Variables. Journal of Chemometrics, 18(10), 451–464.
Jørgensen, K., Mevik, B.H., Næs, T. Combining Designed Experiments with Several Blocks of Spectroscopic Data. (Submitted)
Mevik, B.H., Jørgensen, K., Måge, I., Næs, T. LSPLS: Combining Categorical Design Variables with Blocks of Spectroscopic Measurements. (Submitted)
lspls
, plot.lsplsCv
,
cvsegments
, orthlsplsCv
,
lsplspackage
1  ##FIXME

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.