Description Usage Arguments Details Value Author(s) References Examples
A “stand alone” crossvalidation function for groc
objects.
1 2  grocCrossval(object, segments = 10, segment.type = c("random",
"consecutive","interleaved"), length.seg, trace = 15, ...)

object 
a 
segments 
the number of segments to use, or a list with segments (see below). 
segment.type 
the type of segments to use. 
length.seg 
Positive integer. The length of the segments to use. 
trace 
if 
... 
additional arguments, sent to the underlying fit function. 
This function performs crossvalidation on a model fit by groc
.
It can handle models such as groc(Y ~ X, ...)
.
Note that to use grocCrossval
, the data must be specified
with a data
argument when fitting object
.
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.
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.
When tracing is turned on, the segment number is printed for each segment.
The supplied object
is returned, with an additional component
validation
, which is a list with components
method 
equals 
pred 
an array with the crossvalidated predictions. 
PRESS 
a matrix of PRESS values for models with 1, ...,

PREMAD 
a matrix of PREMAD values for models with 1, ...,

RMSEP 
a matrix of sqrt(PRESS/nobj) values for models with 1, ...,

segments 
the list of segments used in the crossvalidation. 
ncomp 
the number of components. 
Martin Bilodeau (bilodeau@dms.umontreal.ca) and Pierre Lafaye de Micheaux (lafaye@dms.umontreal.ca)
Martin Bilodeau, Pierre Lafaye de Micheaux, Smail Mahdi (2015), The R
Package groc for Generalized Regression on Orthogonal Components,
Journal of Statistical Software, 65(1), 129,
http://www.jstatsoft.org/v65/i01/
1 2 3 4 5 6 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.