data(sp500)
attach(sp500)
x <- sp500.percent[,3: (dim(sp500.percent)[2])]
y <- sp500.percent[,1]
object <- plus(x,y,method="mc+")
## extract coefficients for the first 10 values of lam.path at values in x
extracted.values <- predict(object, lam = sort(object$lam.path[1:10],decreasing=TRUE), newx=object$x)
extracted.coef <- coef(object, lam = sort(object$lam.path[1:10],decreasing=TRUE))
detach(sp500)
Run the code above in your browser using DataLab