example_data <- simulate_spareg_data(n = 100, p = 2000, ntest = 100)
spar_res <- spareg(example_data$x, example_data$y, xval = example_data$xtest,
yval = example_data$ytest, nummods=c(5, 10))
summary(coef(spar_res))
summary(coef(spar_res, aggregate = "none"))
Run the code above in your browser using DataLab