Extract a regression fits from a lasso fit (table).
1 2 3 4 
object, x 
an object of class 
i 
a single index for 
lambda 
alternatively to specifying 
data 
the data originally used which must still be available. (The latter restriction will possibly be relaxed in the future.). By default it is found in the environment. 
fitfun 
fitting function that determines the structure of the
return value. Note that coefficients and more will be taken from

... 
additional arguments passed to 
extract.lassogrp
generates an object of a regression class
like lm
or regr
. This is useful for applying the
respective plot and print methods to the lasso fit.
The result of an unpenalized fit to the “selected” model
(terms with nonzero coefficients) is available as 'fit.unpen'
component of the result.
extract.lassogrp
: object of class lassofit
inheriting from
the class specified by fitfun
.
$fit.unpen
: The result of fitting the model (by codefitfun)
to the reduced model.
x[i]
: an object of class lassogrp
containing only the specified
fits, i.e. all the information corresponding to these fits.
Werner Stahel, stahel@stat.math.ethz.ch
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  data(asphalt)
rr < lasso(log10(RUT) ~ log10(VISC) + ASPH+BASE+FINES+VOIDS+RUN,
data=asphalt, adaptive=TRUE)
## Extract results for three lambda's:
rr[c(1,19,20)]
extract.lassogrp(rr, 19)
## The above relies on finding the original data;
## it does not work otherwise
d.a < asphalt
rm(asphalt)
try(extract.lassogrp(rr, lambda=2.5)) # > error: cannot find 'asphalt'
## it works if you can specify the data :
extract.lassogrp(rr, lambda=2.5, data=d.a)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.