Usage
cv.ncvreg(X, y, ..., cluster, nfolds=10, seed, cv.ind, returnY=FALSE,
trace=FALSE)
Arguments
X
The design matrix, without an intercept, as in
ncvreg
.
y
The response vector, as in ncvreg
.
...
Additional arguments to ncvreg
.
cluster
cv.ncvreg
can be run in parallel across a
cluster using the parallel
package. The cluster must be set
up in advance using the makeCluster
function from that
pacakge. The cluster must then be passed to cv.ncvreg
(see
example).
nfolds
The number of cross-validation folds. Default is 10.
cv.ind
Which fold each observation belongs to. By default the
observations are randomly assigned by cv.ncvreg
.
seed
You may set the seed of the random number generator in
order to obtain reproducible results.
returnY
Should cv.ncvreg
return the fitted values from
the cross-validation folds? Default is FALSE; if TRUE, this will
return a matrix in which the element for row i, column j is the
fitted value for observation i from the fold in which observation i
was excluded from the fit, at the jth value of lambda.
trace
If set to TRUE, cv.ncvreg will inform the user of its
progress by announcing the beginning of each CV fold. Default is
FALSE.