# NOT RUN {
data("sailsim")
f.basis <- function(i) splines::bs(i, degree = 3)
library(doParallel)
cl <- makeCluster(2)
registerDoParallel(cl)
cvfit <- cv.sail(x = sailsim$x, y = sailsim$y, e = sailsim$e,
parallel = TRUE, nlambda = 10,
maxit = 100, basis = f.basis,
nfolds = 3, dfmax = 10)
stopCluster(cl)
plot(cvfit)
# }
Run the code above in your browser using DataLab