# \donttest{
example_data <- simulate_spareg_data(n = 100, p = 400, ntest = 100)
spar_res <- spar.cv(example_data$x, example_data$y, nfolds = 3L,
screencoef = screen_cor(), rp = rp_gaussian(), nummods = c(5, 10))
plot(spar_res)
plot(spar_res, plot_type = "val_measure", plot_along = "nummod", nu = 0)
plot(spar_res, plot_type = "val_measure", plot_along = "nu", nummod = 10)
plot(spar_res, plot_type = "val_numactive", plot_along = "nummod", nu = 0)
plot(spar_res, plot_type = "val_numactive", plot_along = "nu", nummod = 10)
plot(spar_res, plot_type = "res_vs_fitted", xfit = example_data$xtest,
yfit = example_data$ytest, opt_par = "1se")
plot(spar_res, "coefs", prange = c(1, 400))
# }
Run the code above in your browser using DataLab