I have applied the R function stabs::stabsel
to the same data twice: one with fitfun = lars.lasso
and the second time with fitfun = glmnet.lasso
. With all else held constant (same PFER, cut-off, sampling type), why should the results (selected predictors) differ? I thought lars and glmnet only differ in optimization algorithm (least angle vs descent). Does that make the difference, or something else?
Another question: Is there a way to figure out which lambda values were considered? I see only step.
The following example isn't great (numerical differences not really leading to different selections as opposed to on own data), but its readily available:
data("bodyfat", package = "TH.data")
stab.glmnet <- stabsel(x = bodyfat[, -2], y = bodyfat[,2],
fitfun = glmnet.lasso,
args.fitfun = list(type = "conservative"),
cutoff = 0.75, PFER = 1)
stab.glmnet$max
stab.lars <- stabsel(x = bodyfat[, -2], y = bodyfat[,2],
fitfun = lars.lasso, cutoff = 0.75,
PFER = 1)
stab.lars$max