Cross Validation of a Lasso Fit

Share:

Description

Calculation of cross validation for a lassogrp object.

Usage

1
2
3
cv.lasso(object, blocks = 10, trace = FALSE,
  control = lassoControl(trace = 0), env = globalenv(),
  plot.it = NULL, se = TRUE, ...)

Arguments

object

a lassogrp object

blocks

number of blocks to be used in block crossvalidation, or name of variable defining the blocks

trace

logical: Should completion of each cross validation cycle be indicated?

control

see ?lassoControl

env

environment for getting blocks

plot.it

logical: should results be plotted?

se

logical: should cross validation standard errors be plotted?

...

further arguments passed to plot

Details

If the blocks are determined by a factor which appears in the model, ...

Value

rmse
rmse.see
rmse.blocks
fitted
lambda
blocksinmodel

Author(s)

Werner Stahel, stahel@stat.math.ethz.ch

See Also

cv.lars in package lars

Examples

1
2
3
data(asphalt)
rr <- lasso(log10(RUT)~log10(VISC)+ASPH+BASE+FINES+VOIDS+RUN, data=asphalt)
cv.lasso(rr)